KDevelop API Documentation

languages/cpp/subclassingdlgbase.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 './subclassingdlgbase.ui' 00005 ** 00006 ** Created: Wed Oct 6 17:29:29 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 "subclassingdlgbase.h" 00013 00014 #include <qvariant.h> 00015 #include <kdialog.h> 00016 #include <qpushbutton.h> 00017 #include <qgroupbox.h> 00018 #include <qlabel.h> 00019 #include <qlineedit.h> 00020 #include <qheader.h> 00021 #include <qlistview.h> 00022 #include <qcheckbox.h> 00023 #include <qlayout.h> 00024 #include <qtooltip.h> 00025 #include <qwhatsthis.h> 00026 00027 /* 00028 * Constructs a SubclassingDlgBase as a child of 'parent', with the 00029 * name 'name' and widget flags set to 'f'. 00030 * 00031 * The dialog will by default be modeless, unless you set 'modal' to 00032 * TRUE to construct a modal dialog. 00033 */ 00034 SubclassingDlgBase::SubclassingDlgBase( QWidget* parent, const char* name, bool modal, WFlags fl ) 00035 : QDialog( parent, name, modal, fl ) 00036 { 00037 if ( !name ) 00038 setName( "SubclassingDlgBase" ); 00039 SubclassingDlgBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "SubclassingDlgBaseLayout"); 00040 00041 groupBox1 = new QGroupBox( this, "groupBox1" ); 00042 groupBox1->setColumnLayout(0, Qt::Vertical ); 00043 groupBox1->layout()->setSpacing( KDialog::spacingHint() ); 00044 groupBox1->layout()->setMargin( KDialog::marginHint() ); 00045 groupBox1Layout = new QGridLayout( groupBox1->layout() ); 00046 groupBox1Layout->setAlignment( Qt::AlignTop ); 00047 00048 textLabel1 = new QLabel( groupBox1, "textLabel1" ); 00049 00050 groupBox1Layout->addMultiCellWidget( textLabel1, 2, 2, 0, 2 ); 00051 00052 m_edClassName = new QLineEdit( groupBox1, "m_edClassName" ); 00053 00054 groupBox1Layout->addMultiCellWidget( m_edClassName, 0, 0, 1, 2 ); 00055 00056 textLabel2 = new QLabel( groupBox1, "textLabel2" ); 00057 textLabel2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, textLabel2->sizePolicy().hasHeightForWidth() ) ); 00058 00059 groupBox1Layout->addWidget( textLabel2, 0, 0 ); 00060 00061 textLabel3 = new QLabel( groupBox1, "textLabel3" ); 00062 textLabel3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) ); 00063 00064 groupBox1Layout->addWidget( textLabel3, 1, 0 ); 00065 00066 m_edFileName = new QLineEdit( groupBox1, "m_edFileName" ); 00067 00068 groupBox1Layout->addMultiCellWidget( m_edFileName, 1, 1, 1, 2 ); 00069 00070 m_slotView = new QListView( groupBox1, "m_slotView" ); 00071 m_slotView->addColumn( tr2i18n( "Method" ) ); 00072 m_slotView->addColumn( tr2i18n( "Access" ) ); 00073 m_slotView->addColumn( tr2i18n( "Specifier" ) ); 00074 m_slotView->addColumn( tr2i18n( "Return Type" ) ); 00075 m_slotView->addColumn( tr2i18n( "Type" ) ); 00076 00077 groupBox1Layout->addMultiCellWidget( m_slotView, 3, 3, 0, 2 ); 00078 00079 reformat_box = new QCheckBox( groupBox1, "reformat_box" ); 00080 00081 groupBox1Layout->addMultiCellWidget( reformat_box, 4, 4, 0, 1 ); 00082 00083 reformatDefault_box = new QCheckBox( groupBox1, "reformatDefault_box" ); 00084 reformatDefault_box->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, reformatDefault_box->sizePolicy().hasHeightForWidth() ) ); 00085 00086 groupBox1Layout->addWidget( reformatDefault_box, 4, 2 ); 00087 00088 SubclassingDlgBaseLayout->addMultiCellWidget( groupBox1, 0, 0, 0, 2 ); 00089 00090 m_btnOk = new QPushButton( this, "m_btnOk" ); 00091 m_btnOk->setDefault( TRUE ); 00092 00093 SubclassingDlgBaseLayout->addWidget( m_btnOk, 1, 1 ); 00094 00095 m_btnCancel = new QPushButton( this, "m_btnCancel" ); 00096 00097 SubclassingDlgBaseLayout->addWidget( m_btnCancel, 1, 2 ); 00098 spacer1 = new QSpacerItem( 110, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); 00099 SubclassingDlgBaseLayout->addItem( spacer1, 1, 0 ); 00100 languageChange(); 00101 resize( QSize(588, 493).expandedTo(minimumSizeHint()) ); 00102 clearWState( WState_Polished ); 00103 00104 // signals and slots connections 00105 connect( m_btnOk, SIGNAL( clicked() ), this, SLOT( accept() ) ); 00106 connect( m_btnCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); 00107 connect( m_edClassName, SIGNAL( textChanged(const QString&) ), this, SLOT( onChangedClassName() ) ); 00108 00109 // buddies 00110 textLabel1->setBuddy( m_slotView ); 00111 textLabel2->setBuddy( m_edClassName ); 00112 textLabel3->setBuddy( m_edFileName ); 00113 } 00114 00115 /* 00116 * Destroys the object and frees any allocated resources 00117 */ 00118 SubclassingDlgBase::~SubclassingDlgBase() 00119 { 00120 // no need to delete child widgets, Qt does it all for us 00121 } 00122 00123 /* 00124 * Sets the strings of the subwidgets using the current 00125 * language. 00126 */ 00127 void SubclassingDlgBase::languageChange() 00128 { 00129 setCaption( tr2i18n( "Create Subclass" ) ); 00130 groupBox1->setTitle( tr2i18n( "Subclass Properties" ) ); 00131 textLabel1->setText( tr2i18n( "&Specialize following slots:" ) ); 00132 textLabel2->setText( tr2i18n( "C&lass name:" ) ); 00133 textLabel3->setText( tr2i18n( "F&ile name:" ) ); 00134 m_slotView->header()->setLabel( 0, tr2i18n( "Method" ) ); 00135 m_slotView->header()->setLabel( 1, tr2i18n( "Access" ) ); 00136 m_slotView->header()->setLabel( 2, tr2i18n( "Specifier" ) ); 00137 m_slotView->header()->setLabel( 3, tr2i18n( "Return Type" ) ); 00138 m_slotView->header()->setLabel( 4, tr2i18n( "Type" ) ); 00139 reformat_box->setText( tr2i18n( "Re&format source" ) ); 00140 reformatDefault_box->setText( tr2i18n( "Reformat source by &default" ) ); 00141 m_btnOk->setText( tr2i18n( "C&reate" ) ); 00142 m_btnCancel->setText( tr2i18n( "&Cancel" ) ); 00143 } 00144 00145 void SubclassingDlgBase::onChangedClassName() 00146 { 00147 qWarning( "SubclassingDlgBase::onChangedClassName(): Not implemented yet" ); 00148 } 00149 00150 #include "subclassingdlgbase.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 Wed Oct 6 17:39:02 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003