KDevelop API Documentation

languages/ada/addclassdlg.cpp

Go to the documentation of this file.
00001 #include <kdialog.h> 00002 #include <klocale.h> 00003 /**************************************************************************** 00004 ** Form implementation generated from reading ui file './addclassdlg.ui' 00005 ** 00006 ** Created: Tue Oct 19 07:52:46 2004 00007 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) 00008 ** 00009 ** WARNING! All changes made in this file will be lost! 00010 ****************************************************************************/ 00011 00012 #include "addclassdlg.h" 00013 00014 #include <qvariant.h> 00015 #include <keditlistbox.h> 00016 #include <kcombobox.h> 00017 #include <klineedit.h> 00018 #include <kdialog.h> 00019 #include <qpushbutton.h> 00020 #include <qgroupbox.h> 00021 #include <qcheckbox.h> 00022 #include <qlabel.h> 00023 #include <qbuttongroup.h> 00024 #include <qradiobutton.h> 00025 #include <qtextedit.h> 00026 #include <qframe.h> 00027 #include <qlayout.h> 00028 #include <qtooltip.h> 00029 #include <qwhatsthis.h> 00030 00031 /* 00032 * Constructs a AddClassDlg as a child of 'parent', with the 00033 * name 'name' and widget flags set to 'f'. 00034 * 00035 * The dialog will by default be modeless, unless you set 'modal' to 00036 * TRUE to construct a modal dialog. 00037 */ 00038 AddClassDlg::AddClassDlg( QWidget* parent, const char* name, bool modal, WFlags fl ) 00039 : QDialog( parent, name, modal, fl ) 00040 { 00041 if ( !name ) 00042 setName( "AddClassDlg" ); 00043 AddClassDlgLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AddClassDlgLayout"); 00044 00045 Implements = new KEditListBox( this, "Implements" ); 00046 Implements->setLineWidth( 1 ); 00047 00048 AddClassDlgLayout->addMultiCellWidget( Implements, 1, 1, 0, 3 ); 00049 00050 GroupBox1 = new QGroupBox( this, "GroupBox1" ); 00051 GroupBox1->setColumnLayout(0, Qt::Vertical ); 00052 GroupBox1->layout()->setSpacing( KDialog::spacingHint() ); 00053 GroupBox1->layout()->setMargin( KDialog::marginHint() ); 00054 GroupBox1Layout = new QGridLayout( GroupBox1->layout() ); 00055 GroupBox1Layout->setAlignment( Qt::AlignTop ); 00056 00057 Extends = new KComboBox( FALSE, GroupBox1, "Extends" ); 00058 Extends->setEditable( TRUE ); 00059 Extends->setAutoCompletion( FALSE ); 00060 00061 GroupBox1Layout->addMultiCellWidget( Extends, 2, 2, 1, 5 ); 00062 Spacer2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00063 GroupBox1Layout->addMultiCell( Spacer2, 4, 4, 4, 5 ); 00064 00065 Abstract = new QCheckBox( GroupBox1, "Abstract" ); 00066 00067 GroupBox1Layout->addWidget( Abstract, 3, 2 ); 00068 00069 Interface = new QCheckBox( GroupBox1, "Interface" ); 00070 00071 GroupBox1Layout->addWidget( Interface, 3, 1 ); 00072 00073 TextLabel1 = new QLabel( GroupBox1, "TextLabel1" ); 00074 00075 GroupBox1Layout->addWidget( TextLabel1, 1, 0 ); 00076 00077 ButtonGroup1 = new QButtonGroup( GroupBox1, "ButtonGroup1" ); 00078 ButtonGroup1->setLineWidth( 0 ); 00079 ButtonGroup1->setColumnLayout(0, Qt::Vertical ); 00080 ButtonGroup1->layout()->setSpacing( KDialog::spacingHint() ); 00081 ButtonGroup1->layout()->setMargin( 0 ); 00082 ButtonGroup1Layout = new QHBoxLayout( ButtonGroup1->layout() ); 00083 ButtonGroup1Layout->setAlignment( Qt::AlignTop ); 00084 00085 Public = new QRadioButton( ButtonGroup1, "Public" ); 00086 Public->setChecked( TRUE ); 00087 ButtonGroup1Layout->addWidget( Public ); 00088 00089 Protected = new QRadioButton( ButtonGroup1, "Protected" ); 00090 ButtonGroup1Layout->addWidget( Protected ); 00091 00092 Private = new QRadioButton( ButtonGroup1, "Private" ); 00093 ButtonGroup1Layout->addWidget( Private ); 00094 00095 GroupBox1Layout->addMultiCellWidget( ButtonGroup1, 4, 4, 1, 3 ); 00096 00097 Final = new QCheckBox( GroupBox1, "Final" ); 00098 00099 GroupBox1Layout->addWidget( Final, 3, 3 ); 00100 00101 ClassName = new KLineEdit( GroupBox1, "ClassName" ); 00102 00103 GroupBox1Layout->addMultiCellWidget( ClassName, 1, 1, 1, 5 ); 00104 Spacer1 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00105 GroupBox1Layout->addMultiCell( Spacer1, 3, 3, 4, 5 ); 00106 00107 TextLabel2 = new QLabel( GroupBox1, "TextLabel2" ); 00108 00109 GroupBox1Layout->addWidget( TextLabel2, 2, 0 ); 00110 00111 BrowseSourcePath = new QPushButton( GroupBox1, "BrowseSourcePath" ); 00112 BrowseSourcePath->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, BrowseSourcePath->sizePolicy().hasHeightForWidth() ) ); 00113 00114 GroupBox1Layout->addWidget( BrowseSourcePath, 0, 5 ); 00115 00116 SourcePath = new KLineEdit( GroupBox1, "SourcePath" ); 00117 00118 GroupBox1Layout->addMultiCellWidget( SourcePath, 0, 0, 1, 4 ); 00119 00120 TextLabel1_2 = new QLabel( GroupBox1, "TextLabel1_2" ); 00121 00122 GroupBox1Layout->addWidget( TextLabel1_2, 0, 0 ); 00123 00124 AddClassDlgLayout->addMultiCellWidget( GroupBox1, 0, 0, 0, 3 ); 00125 00126 GroupBox3 = new QGroupBox( this, "GroupBox3" ); 00127 GroupBox3->setColumnLayout(0, Qt::Vertical ); 00128 GroupBox3->layout()->setSpacing( KDialog::spacingHint() ); 00129 GroupBox3->layout()->setMargin( KDialog::marginHint() ); 00130 GroupBox3Layout = new QHBoxLayout( GroupBox3->layout() ); 00131 GroupBox3Layout->setAlignment( Qt::AlignTop ); 00132 00133 Constructor = new QCheckBox( GroupBox3, "Constructor" ); 00134 Constructor->setChecked( TRUE ); 00135 GroupBox3Layout->addWidget( Constructor ); 00136 00137 Main = new QCheckBox( GroupBox3, "Main" ); 00138 GroupBox3Layout->addWidget( Main ); 00139 00140 AddClassDlgLayout->addMultiCellWidget( GroupBox3, 2, 2, 0, 3 ); 00141 00142 GroupBox4 = new QGroupBox( this, "GroupBox4" ); 00143 GroupBox4->setColumnLayout(0, Qt::Vertical ); 00144 GroupBox4->layout()->setSpacing( KDialog::spacingHint() ); 00145 GroupBox4->layout()->setMargin( KDialog::marginHint() ); 00146 GroupBox4Layout = new QGridLayout( GroupBox4->layout() ); 00147 GroupBox4Layout->setAlignment( Qt::AlignTop ); 00148 00149 TextLabel5 = new QLabel( GroupBox4, "TextLabel5" ); 00150 00151 GroupBox4Layout->addWidget( TextLabel5, 1, 0 ); 00152 00153 License = new KComboBox( FALSE, GroupBox4, "License" ); 00154 License->setEditable( TRUE ); 00155 00156 GroupBox4Layout->addWidget( License, 1, 1 ); 00157 00158 Documentation = new QTextEdit( GroupBox4, "Documentation" ); 00159 00160 GroupBox4Layout->addMultiCellWidget( Documentation, 0, 0, 0, 2 ); 00161 Spacer4 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00162 GroupBox4Layout->addItem( Spacer4, 1, 2 ); 00163 00164 AddClassDlgLayout->addMultiCellWidget( GroupBox4, 3, 3, 0, 3 ); 00165 00166 Line1 = new QFrame( this, "Line1" ); 00167 Line1->setFrameShape( QFrame::HLine ); 00168 Line1->setFrameShadow( QFrame::Sunken ); 00169 Line1->setFrameShape( QFrame::HLine ); 00170 00171 AddClassDlgLayout->addMultiCellWidget( Line1, 4, 4, 0, 3 ); 00172 00173 PushButton1 = new QPushButton( this, "PushButton1" ); 00174 PushButton1->setDefault( TRUE ); 00175 00176 AddClassDlgLayout->addWidget( PushButton1, 5, 0 ); 00177 00178 PushButton2 = new QPushButton( this, "PushButton2" ); 00179 00180 AddClassDlgLayout->addWidget( PushButton2, 5, 1 ); 00181 Spacer5 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00182 AddClassDlgLayout->addItem( Spacer5, 5, 2 ); 00183 00184 PushButton3 = new QPushButton( this, "PushButton3" ); 00185 00186 AddClassDlgLayout->addWidget( PushButton3, 5, 3 ); 00187 languageChange(); 00188 resize( QSize(656, 684).expandedTo(minimumSizeHint()) ); 00189 clearWState( WState_Polished ); 00190 00191 // signals and slots connections 00192 connect( Interface, SIGNAL( toggled(bool) ), Abstract, SLOT( setDisabled(bool) ) ); 00193 connect( Interface, SIGNAL( toggled(bool) ), Final, SLOT( setDisabled(bool) ) ); 00194 connect( PushButton1, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00195 connect( PushButton2, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00196 connect( Interface, SIGNAL( toggled(bool) ), Constructor, SLOT( setDisabled(bool) ) ); 00197 connect( Interface, SIGNAL( toggled(bool) ), Main, SLOT( setDisabled(bool) ) ); 00198 connect( Interface, SIGNAL( toggled(bool) ), Implements, SLOT( setDisabled(bool) ) ); 00199 00200 // tab order 00201 setTabOrder( SourcePath, BrowseSourcePath ); 00202 setTabOrder( BrowseSourcePath, ClassName ); 00203 setTabOrder( ClassName, Extends ); 00204 setTabOrder( Extends, Interface ); 00205 setTabOrder( Interface, Abstract ); 00206 setTabOrder( Abstract, Final ); 00207 setTabOrder( Final, Public ); 00208 setTabOrder( Public, Protected ); 00209 setTabOrder( Protected, Private ); 00210 setTabOrder( Private, Constructor ); 00211 setTabOrder( Constructor, Main ); 00212 setTabOrder( Main, License ); 00213 setTabOrder( License, PushButton1 ); 00214 setTabOrder( PushButton1, PushButton2 ); 00215 setTabOrder( PushButton2, PushButton3 ); 00216 00217 // buddies 00218 TextLabel1->setBuddy( ClassName ); 00219 TextLabel2->setBuddy( Extends ); 00220 TextLabel1_2->setBuddy( SourcePath ); 00221 TextLabel5->setBuddy( License ); 00222 } 00223 00224 /* 00225 * Destroys the object and frees any allocated resources 00226 */ 00227 AddClassDlg::~AddClassDlg() 00228 { 00229 // no need to delete child widgets, Qt does it all for us 00230 } 00231 00232 /* 00233 * Sets the strings of the subwidgets using the current 00234 * language. 00235 */ 00236 void AddClassDlg::languageChange() 00237 { 00238 setCaption( tr2i18n( "Add Class" ) ); 00239 Implements->setTitle( tr2i18n( "&Implements" ) ); 00240 GroupBox1->setTitle( tr2i18n( "&Class" ) ); 00241 Abstract->setText( tr2i18n( "&Abstract" ) ); 00242 Interface->setText( tr2i18n( "&Interface" ) ); 00243 TextLabel1->setText( tr2i18n( "&Name:" ) ); 00244 ButtonGroup1->setTitle( QString::null ); 00245 Public->setText( tr2i18n( "&Public" ) ); 00246 Protected->setText( tr2i18n( "P&rotected" ) ); 00247 Private->setText( tr2i18n( "Pri&vate" ) ); 00248 Final->setText( tr2i18n( "&Final" ) ); 00249 TextLabel2->setText( tr2i18n( "&Extends:" ) ); 00250 BrowseSourcePath->setText( tr2i18n( "..." ) ); 00251 TextLabel1_2->setText( tr2i18n( "&Source path:" ) ); 00252 GroupBox3->setTitle( tr2i18n( "&Options" ) ); 00253 Constructor->setText( tr2i18n( "&Create default constructor" ) ); 00254 Main->setText( tr2i18n( "Create &main method" ) ); 00255 GroupBox4->setTitle( tr2i18n( "&Documentation" ) ); 00256 TextLabel5->setText( tr2i18n( "&License:" ) ); 00257 License->clear(); 00258 License->insertItem( tr2i18n( "LGPL" ) ); 00259 License->insertItem( tr2i18n( "GPL" ) ); 00260 License->insertItem( tr2i18n( "QPL" ) ); 00261 PushButton1->setText( tr2i18n( "&Add" ) ); 00262 PushButton2->setText( tr2i18n( "&Cancel" ) ); 00263 PushButton3->setText( tr2i18n( "&Help" ) ); 00264 } 00265 00266 void AddClassDlg::Public_toggled(bool) 00267 { 00268 qWarning( "AddClassDlg::Public_toggled(bool): Not implemented yet" ); 00269 } 00270 00271 #include "addclassdlg.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.0.4.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Oct 19 08:01:41 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003