KDevelop API Documentation

parts/abbrev/addtemplatedlgbase.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 './addtemplatedlgbase.ui' 00005 ** 00006 ** Created: Tue Oct 19 07:48: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 "addtemplatedlgbase.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qlabel.h> 00018 #include <qlineedit.h> 00019 #include <qcombobox.h> 00020 #include <qlayout.h> 00021 #include <qtooltip.h> 00022 #include <qwhatsthis.h> 00023 00024 /* 00025 * Constructs a AddTemplateDialogBase as a child of 'parent', with the 00026 * name 'name' and widget flags set to 'f'. 00027 * 00028 * The dialog will by default be modeless, unless you set 'modal' to 00029 * TRUE to construct a modal dialog. 00030 */ 00031 AddTemplateDialogBase::AddTemplateDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00032 : QDialog( parent, name, modal, fl ) 00033 { 00034 if ( !name ) 00035 setName( "AddTemplateDialog" ); 00036 setSizeGripEnabled( FALSE ); 00037 AddTemplateDialogLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AddTemplateDialogLayout"); 00038 00039 Layout1 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "Layout1"); 00040 Horizontal_Spacing2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00041 Layout1->addItem( Horizontal_Spacing2 ); 00042 00043 buttonOk = new QPushButton( this, "buttonOk" ); 00044 buttonOk->setAutoDefault( TRUE ); 00045 buttonOk->setDefault( TRUE ); 00046 Layout1->addWidget( buttonOk ); 00047 00048 buttonCancel = new QPushButton( this, "buttonCancel" ); 00049 buttonCancel->setAutoDefault( TRUE ); 00050 Layout1->addWidget( buttonCancel ); 00051 00052 AddTemplateDialogLayout->addMultiCellLayout( Layout1, 4, 4, 0, 1 ); 00053 00054 TextLabel3 = new QLabel( this, "TextLabel3" ); 00055 00056 AddTemplateDialogLayout->addWidget( TextLabel3, 0, 0 ); 00057 00058 TextLabel4 = new QLabel( this, "TextLabel4" ); 00059 00060 AddTemplateDialogLayout->addWidget( TextLabel4, 1, 0 ); 00061 00062 editTemplate = new QLineEdit( this, "editTemplate" ); 00063 00064 AddTemplateDialogLayout->addWidget( editTemplate, 0, 1 ); 00065 00066 editDescription = new QLineEdit( this, "editDescription" ); 00067 00068 AddTemplateDialogLayout->addWidget( editDescription, 1, 1 ); 00069 Spacer4 = new QSpacerItem( 20, 10, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ); 00070 AddTemplateDialogLayout->addItem( Spacer4, 3, 1 ); 00071 00072 comboSuffixes = new QComboBox( FALSE, this, "comboSuffixes" ); 00073 00074 AddTemplateDialogLayout->addWidget( comboSuffixes, 2, 1 ); 00075 00076 labelSuffixes = new QLabel( this, "labelSuffixes" ); 00077 00078 AddTemplateDialogLayout->addWidget( labelSuffixes, 2, 0 ); 00079 languageChange(); 00080 resize( QSize(348, 161).expandedTo(minimumSizeHint()) ); 00081 clearWState( WState_Polished ); 00082 00083 // signals and slots connections 00084 connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00085 connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00086 00087 // tab order 00088 setTabOrder( editTemplate, editDescription ); 00089 setTabOrder( editDescription, comboSuffixes ); 00090 setTabOrder( comboSuffixes, buttonOk ); 00091 setTabOrder( buttonOk, buttonCancel ); 00092 00093 // buddies 00094 TextLabel3->setBuddy( editTemplate ); 00095 TextLabel4->setBuddy( editDescription ); 00096 labelSuffixes->setBuddy( comboSuffixes ); 00097 } 00098 00099 /* 00100 * Destroys the object and frees any allocated resources 00101 */ 00102 AddTemplateDialogBase::~AddTemplateDialogBase() 00103 { 00104 // no need to delete child widgets, Qt does it all for us 00105 } 00106 00107 /* 00108 * Sets the strings of the subwidgets using the current 00109 * language. 00110 */ 00111 void AddTemplateDialogBase::languageChange() 00112 { 00113 setCaption( tr2i18n( "Add Code Template" ) ); 00114 buttonOk->setText( tr2i18n( "&OK" ) ); 00115 buttonCancel->setText( tr2i18n( "&Cancel" ) ); 00116 TextLabel3->setText( tr2i18n( "&Template:" ) ); 00117 TextLabel4->setText( tr2i18n( "&Description:" ) ); 00118 labelSuffixes->setText( tr2i18n( "&Suffixes:" ) ); 00119 } 00120 00121 #include "addtemplatedlgbase.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:49 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003