00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "rubycodegenerationformbase.h"
00013
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qcheckbox.h>
00018 #include <qcombobox.h>
00019 #include <qlabel.h>
00020 #include <qlayout.h>
00021 #include <qtooltip.h>
00022 #include <qwhatsthis.h>
00023
00024
00025
00026
00027
00028 RubyCodeGenerationFormBase::RubyCodeGenerationFormBase( QWidget* parent, const char* name, WFlags fl )
00029 : QWidget( parent, name, fl )
00030 {
00031 if ( !name )
00032 setName( "Form1" );
00033 Form1Layout = new QGridLayout( this, 1, 1, 11, 6, "Form1Layout");
00034
00035 layout6 = new QGridLayout( 0, 1, 1, 0, 6, "layout6");
00036
00037 groupBox2 = new QGroupBox( this, "groupBox2" );
00038 groupBox2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, groupBox2->sizePolicy().hasHeightForWidth() ) );
00039 groupBox2->setColumnLayout(0, Qt::Vertical );
00040 groupBox2->layout()->setSpacing( 6 );
00041 groupBox2->layout()->setMargin( 11 );
00042 groupBox2Layout = new QGridLayout( groupBox2->layout() );
00043 groupBox2Layout->setAlignment( Qt::AlignTop );
00044
00045 layout2 = new QGridLayout( 0, 1, 1, 0, 6, "layout2");
00046
00047 m_generateConstructors = new QCheckBox( groupBox2, "m_generateConstructors" );
00048 m_generateConstructors->setChecked( FALSE );
00049
00050 layout2->addWidget( m_generateConstructors, 0, 0 );
00051
00052 m_generateAssocAccessors = new QCheckBox( groupBox2, "m_generateAssocAccessors" );
00053 m_generateAssocAccessors->setChecked( TRUE );
00054
00055 layout2->addWidget( m_generateAssocAccessors, 2, 0 );
00056
00057 m_generateAttribAccessors = new QCheckBox( groupBox2, "m_generateAttribAccessors" );
00058 m_generateAttribAccessors->setChecked( TRUE );
00059
00060 layout2->addWidget( m_generateAttribAccessors, 1, 0 );
00061
00062 groupBox2Layout->addLayout( layout2, 0, 0 );
00063
00064 layout4 = new QGridLayout( 0, 1, 1, 0, 6, "layout4");
00065
00066 m_accessorScopeCB = new QComboBox( FALSE, groupBox2, "m_accessorScopeCB" );
00067
00068 layout4->addWidget( m_accessorScopeCB, 0, 1 );
00069
00070 textLabel1_3 = new QLabel( groupBox2, "textLabel1_3" );
00071
00072 layout4->addWidget( textLabel1_3, 0, 0 );
00073
00074 groupBox2Layout->addLayout( layout4, 1, 0 );
00075
00076 layout4_2 = new QGridLayout( 0, 1, 1, 0, 6, "layout4_2");
00077
00078 textLabel1_3_2 = new QLabel( groupBox2, "textLabel1_3_2" );
00079
00080 layout4_2->addWidget( textLabel1_3_2, 0, 0 );
00081
00082 m_assocFieldScopeCB = new QComboBox( FALSE, groupBox2, "m_assocFieldScopeCB" );
00083
00084 layout4_2->addWidget( m_assocFieldScopeCB, 0, 1 );
00085
00086 groupBox2Layout->addLayout( layout4_2, 2, 0 );
00087
00088 layout6->addWidget( groupBox2, 2, 0 );
00089
00090 groupBox1 = new QGroupBox( this, "groupBox1" );
00091 groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
00092 groupBox1->setColumnLayout(0, Qt::Vertical );
00093 groupBox1->layout()->setSpacing( 6 );
00094 groupBox1->layout()->setMargin( 11 );
00095 groupBox1Layout = new QHBoxLayout( groupBox1->layout() );
00096 groupBox1Layout->setAlignment( Qt::AlignTop );
00097
00098 textLabel1 = new QLabel( groupBox1, "textLabel1" );
00099 groupBox1Layout->addWidget( textLabel1 );
00100
00101 m_SelectCommentStyle = new QComboBox( FALSE, groupBox1, "m_SelectCommentStyle" );
00102 groupBox1Layout->addWidget( m_SelectCommentStyle );
00103
00104 layout6->addWidget( groupBox1, 1, 0 );
00105
00106 textLabel1_2 = new QLabel( this, "textLabel1_2" );
00107 textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
00108
00109 layout6->addWidget( textLabel1_2, 0, 0 );
00110
00111 Form1Layout->addLayout( layout6, 0, 0 );
00112 languageChange();
00113 resize( QSize(462, 376).expandedTo(minimumSizeHint()) );
00114 clearWState( WState_Polished );
00115 }
00116
00117
00118
00119
00120 RubyCodeGenerationFormBase::~RubyCodeGenerationFormBase()
00121 {
00122
00123 }
00124
00125
00126
00127
00128
00129 void RubyCodeGenerationFormBase::languageChange()
00130 {
00131 groupBox2->setTitle( tr2i18n( "Auto-Generate Methods" ) );
00132 m_generateConstructors->setText( tr2i18n( "Empty constructor methods" ) );
00133 m_generateAssocAccessors->setText( tr2i18n( "Association accessor methods" ) );
00134 m_generateAttribAccessors->setText( tr2i18n( "Attribute accessor methods" ) );
00135 m_accessorScopeCB->clear();
00136 m_accessorScopeCB->insertItem( tr2i18n( "Public" ) );
00137 m_accessorScopeCB->insertItem( tr2i18n( "Private" ) );
00138 m_accessorScopeCB->insertItem( tr2i18n( "Protected" ) );
00139 m_accessorScopeCB->insertItem( tr2i18n( "From Parent Object" ) );
00140 m_accessorScopeCB->setCurrentItem( 3 );
00141 textLabel1_3->setText( tr2i18n( "Default attribute accessor scope:" ) );
00142 textLabel1_3_2->setText( tr2i18n( "Default association field scope:" ) );
00143 m_assocFieldScopeCB->clear();
00144 m_assocFieldScopeCB->insertItem( tr2i18n( "Public" ) );
00145 m_assocFieldScopeCB->insertItem( tr2i18n( "Private" ) );
00146 m_assocFieldScopeCB->insertItem( tr2i18n( "Protected" ) );
00147 m_assocFieldScopeCB->insertItem( tr2i18n( "From Parent Role" ) );
00148 m_assocFieldScopeCB->setCurrentItem( 3 );
00149 groupBox1->setTitle( tr2i18n( "Documentation" ) );
00150 textLabel1->setText( tr2i18n( "Style:" ) );
00151 m_SelectCommentStyle->clear();
00152 m_SelectCommentStyle->insertItem( tr2i18n( "Hash (#)" ) );
00153 m_SelectCommentStyle->insertItem( tr2i18n( "Begin-End (=begin =end)" ) );
00154 textLabel1_2->setText( tr2i18n( "<p align=\"center\">Ruby Code Generation</p>" ) );
00155 }
00156
00157 #include "rubycodegenerationformbase.moc"