umbrello API Documentation

cppcodegenerationformbase.cpp

00001 #include <kdialog.h>
00002 #include <klocale.h>
00003 /****************************************************************************
00004 ** Form implementation generated from reading ui file '/home/kellogg/kdesdk-3.5-branch/umbrello/umbrello/codegenerators/cppcodegenerationformbase.ui'
00005 **
00006 ** Created: Mi Mai 9 20:21:39 2007
00007 **      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.4   edited Nov 24 2003 $)
00008 **
00009 ** WARNING! All changes made in this file will be lost!
00010 ****************************************************************************/
00011 
00012 #include "cppcodegenerationformbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <qpushbutton.h>
00016 #include <qgroupbox.h>
00017 #include <qcombobox.h>
00018 #include <qlabel.h>
00019 #include <qtabwidget.h>
00020 #include <qheader.h>
00021 #include <qlistview.h>
00022 #include <kcombobox.h>
00023 #include <qcheckbox.h>
00024 #include <qlayout.h>
00025 #include <qtooltip.h>
00026 #include <qwhatsthis.h>
00027 
00028 /*
00029  *  Constructs a CPPCodeGenerationFormBase as a child of 'parent', with the
00030  *  name 'name' and widget flags set to 'f'.
00031  */
00032 CPPCodeGenerationFormBase::CPPCodeGenerationFormBase( QWidget* parent, const char* name, WFlags fl )
00033     : QWidget( parent, name, fl )
00034 {
00035     if ( !name )
00036     setName( "CPPCodeGenerationFormBase" );
00037 
00038     groupBox1 = new QGroupBox( this, "groupBox1" );
00039     groupBox1->setGeometry( QRect( 11, 44, 436, 72 ) );
00040     groupBox1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, groupBox1->sizePolicy().hasHeightForWidth() ) );
00041     groupBox1->setColumnLayout(0, Qt::Vertical );
00042     groupBox1->layout()->setSpacing( 6 );
00043     groupBox1->layout()->setMargin( 11 );
00044     groupBox1Layout = new QGridLayout( groupBox1->layout() );
00045     groupBox1Layout->setAlignment( Qt::AlignTop );
00046 
00047     layout4 = new QGridLayout( 0, 1, 1, 0, 6, "layout4"); 
00048 
00049     m_SelectCommentStyle = new QComboBox( FALSE, groupBox1, "m_SelectCommentStyle" );
00050 
00051     layout4->addWidget( m_SelectCommentStyle, 0, 1 );
00052 
00053     textLabel1 = new QLabel( groupBox1, "textLabel1" );
00054 
00055     layout4->addWidget( textLabel1, 0, 0 );
00056 
00057     groupBox1Layout->addLayout( layout4, 0, 0 );
00058 
00059     textLabel1_2 = new QLabel( this, "textLabel1_2" );
00060     textLabel1_2->setGeometry( QRect( 11, 11, 436, 27 ) );
00061     textLabel1_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)4, 0, 0, textLabel1_2->sizePolicy().hasHeightForWidth() ) );
00062 
00063     tabWidget2 = new QTabWidget( this, "tabWidget2" );
00064     tabWidget2->setGeometry( QRect( 10, 120, 436, 305 ) );
00065 
00066     tab = new QWidget( tabWidget2, "tab" );
00067     tabLayout = new QVBoxLayout( tab, 11, 6, "tabLayout"); 
00068 
00069     GeneralOptionsListView = new QListView( tab, "GeneralOptionsListView" );
00070     tabLayout->addWidget( GeneralOptionsListView );
00071     tabWidget2->insertTab( tab, QString::fromLatin1("") );
00072 
00073     tab_2 = new QWidget( tabWidget2, "tab_2" );
00074     tabLayout_2 = new QGridLayout( tab_2, 1, 1, 11, 6, "tabLayout_2"); 
00075     spacer4 = new QSpacerItem( 410, 113, QSizePolicy::Minimum, QSizePolicy::Expanding );
00076     tabLayout_2->addItem( spacer4, 2, 0 );
00077 
00078     textLabel2_2_2_2 = new QLabel( tab_2, "textLabel2_2_2_2" );
00079 
00080     tabLayout_2->addWidget( textLabel2_2_2_2, 0, 0 );
00081 
00082     layout17 = new QGridLayout( 0, 1, 1, 0, 6, "layout17"); 
00083 
00084     m_listClassHCombo = new KHistoryCombo( tab_2, "m_listClassHCombo" );
00085     m_listClassHCombo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, m_listClassHCombo->sizePolicy().hasHeightForWidth() ) );
00086     m_listClassHCombo->setEditable( FALSE );
00087     m_listClassHCombo->setInsertionPolicy( KHistoryCombo::NoInsertion );
00088     m_listClassHCombo->setDuplicatesEnabled( FALSE );
00089     QStringList m_listClassHCombo_stringlist;
00090     m_listClassHCombo_stringlist << "QPtrList";
00091     m_listClassHCombo_stringlist << "vector";
00092     m_listClassHCombo->setHistoryItems( m_listClassHCombo_stringlist );
00093 
00094     layout17->addMultiCellWidget( m_listClassHCombo, 1, 1, 1, 2 );
00095 
00096     textLabel1_3_2_2_2 = new QLabel( tab_2, "textLabel1_3_2_2_2" );
00097 
00098     layout17->addMultiCellWidget( textLabel1_3_2_2_2, 0, 0, 0, 1 );
00099 
00100     m_browseStringButton = new QPushButton( tab_2, "m_browseStringButton" );
00101     m_browseStringButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, m_browseStringButton->sizePolicy().hasHeightForWidth() ) );
00102     m_browseStringButton->setMaximumSize( QSize( 32, 32767 ) );
00103 
00104     layout17->addMultiCellWidget( m_browseStringButton, 2, 2, 4, 5 );
00105 
00106     m_globalStringCheckBox = new QCheckBox( tab_2, "m_globalStringCheckBox" );
00107     m_globalStringCheckBox->setChecked( TRUE );
00108 
00109     layout17->addWidget( m_globalStringCheckBox, 2, 7 );
00110 
00111     m_stringClassHCombo = new KHistoryCombo( tab_2, "m_stringClassHCombo" );
00112     m_stringClassHCombo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, m_stringClassHCombo->sizePolicy().hasHeightForWidth() ) );
00113     m_stringClassHCombo->setEditable( FALSE );
00114     m_stringClassHCombo->setInsertionPolicy( KHistoryCombo::NoInsertion );
00115     m_stringClassHCombo->setDuplicatesEnabled( FALSE );
00116     QStringList m_stringClassHCombo_stringlist;
00117     m_stringClassHCombo_stringlist << "QString";
00118     m_stringClassHCombo_stringlist << "string";
00119     m_stringClassHCombo->setHistoryItems( m_stringClassHCombo_stringlist );
00120 
00121     layout17->addMultiCellWidget( m_stringClassHCombo, 2, 2, 1, 2 );
00122     spacer2_2_2_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00123     layout17->addItem( spacer2_2_2_2, 2, 6 );
00124     spacer1_2_2_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum );
00125     layout17->addItem( spacer1_2_2_2, 1, 6 );
00126 
00127     stringClassTextLabel = new QLabel( tab_2, "stringClassTextLabel" );
00128     stringClassTextLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, stringClassTextLabel->sizePolicy().hasHeightForWidth() ) );
00129 
00130     layout17->addWidget( stringClassTextLabel, 2, 0 );
00131 
00132     listClassTextLabel = new QLabel( tab_2, "listClassTextLabel" );
00133     listClassTextLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, listClassTextLabel->sizePolicy().hasHeightForWidth() ) );
00134 
00135     layout17->addWidget( listClassTextLabel, 1, 0 );
00136 
00137     m_listIncludeFileHistoryCombo = new KHistoryCombo( tab_2, "m_listIncludeFileHistoryCombo" );
00138     m_listIncludeFileHistoryCombo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, m_listIncludeFileHistoryCombo->sizePolicy().hasHeightForWidth() ) );
00139     m_listIncludeFileHistoryCombo->setInsertionPolicy( KHistoryCombo::AtTop );
00140     QStringList m_listIncludeFileHistoryCombo_stringlist;
00141     m_listIncludeFileHistoryCombo_stringlist << "qptrlist.h";
00142     m_listIncludeFileHistoryCombo_stringlist << "vector";
00143     m_listIncludeFileHistoryCombo->setHistoryItems( m_listIncludeFileHistoryCombo_stringlist );
00144 
00145     layout17->addWidget( m_listIncludeFileHistoryCombo, 1, 3 );
00146 
00147     textLabel4_2_2_2 = new QLabel( tab_2, "textLabel4_2_2_2" );
00148 
00149     layout17->addMultiCellWidget( textLabel4_2_2_2, 0, 0, 5, 7 );
00150 
00151     m_stringIncludeFileHistoryCombo = new KHistoryCombo( tab_2, "m_stringIncludeFileHistoryCombo" );
00152     m_stringIncludeFileHistoryCombo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, m_stringIncludeFileHistoryCombo->sizePolicy().hasHeightForWidth() ) );
00153     m_stringIncludeFileHistoryCombo->setInsertionPolicy( KHistoryCombo::AtTop );
00154     QStringList m_stringIncludeFileHistoryCombo_stringlist;
00155     m_stringIncludeFileHistoryCombo_stringlist << "qstring.h";
00156     m_stringIncludeFileHistoryCombo_stringlist << "string";
00157     m_stringIncludeFileHistoryCombo->setHistoryItems( m_stringIncludeFileHistoryCombo_stringlist );
00158 
00159     layout17->addWidget( m_stringIncludeFileHistoryCombo, 2, 3 );
00160 
00161     m_globalListCheckBox = new QCheckBox( tab_2, "m_globalListCheckBox" );
00162     m_globalListCheckBox->setChecked( TRUE );
00163 
00164     layout17->addWidget( m_globalListCheckBox, 1, 7 );
00165 
00166     textLabel3_2_2 = new QLabel( tab_2, "textLabel3_2_2" );
00167 
00168     layout17->addWidget( textLabel3_2_2, 0, 2 );
00169 
00170     m_browseListButton = new QPushButton( tab_2, "m_browseListButton" );
00171     m_browseListButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)0, 0, 0, m_browseListButton->sizePolicy().hasHeightForWidth() ) );
00172     m_browseListButton->setMaximumSize( QSize( 32, 32767 ) );
00173 
00174     layout17->addMultiCellWidget( m_browseListButton, 1, 1, 4, 5 );
00175 
00176     textLabel5_2_2_2 = new QLabel( tab_2, "textLabel5_2_2_2" );
00177 
00178     layout17->addMultiCellWidget( textLabel5_2_2_2, 0, 0, 3, 4 );
00179 
00180     tabLayout_2->addLayout( layout17, 1, 0 );
00181     tabWidget2->insertTab( tab_2, QString::fromLatin1("") );
00182     languageChange();
00183     resize( QSize(648, 549).expandedTo(minimumSizeHint()) );
00184     clearWState( WState_Polished );
00185 
00186     // signals and slots connections
00187     connect( m_browseListButton, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
00188     connect( m_browseStringButton, SIGNAL( clicked() ), this, SLOT( browseClicked() ) );
00189 }
00190 
00191 /*
00192  *  Destroys the object and frees any allocated resources
00193  */
00194 CPPCodeGenerationFormBase::~CPPCodeGenerationFormBase()
00195 {
00196     // no need to delete child widgets, Qt does it all for us
00197 }
00198 
00199 /*
00200  *  Sets the strings of the subwidgets using the current
00201  *  language.
00202  */
00203 void CPPCodeGenerationFormBase::languageChange()
00204 {
00205     groupBox1->setTitle( tr2i18n( "Documentation" ) );
00206     m_SelectCommentStyle->clear();
00207     m_SelectCommentStyle->insertItem( tr2i18n( "Slash-Slash (//)" ) );
00208     m_SelectCommentStyle->insertItem( tr2i18n( "Slash-Star (/**  */)" ) );
00209     textLabel1->setText( tr2i18n( "Style:" ) );
00210     textLabel1_2->setText( tr2i18n( "<p align=\"center\">C++ Code Generation</p>" ) );
00211     tabWidget2->changeTab( tab, tr2i18n( "General" ) );
00212     textLabel2_2_2_2->setText( tr2i18n( "Use following for classes in generated code:" ) );
00213     m_listClassHCombo->setCurrentItem( 0 );
00214     textLabel1_3_2_2_2->setText( tr2i18n( "<b>Variable</b>" ) );
00215     m_browseStringButton->setText( tr2i18n( "..." ) );
00216     m_globalStringCheckBox->setText( QString::null );
00217     m_stringClassHCombo->setCurrentItem( 0 );
00218     stringClassTextLabel->setText( tr2i18n( "<p align=\"center\">String</p>" ) );
00219     listClassTextLabel->setText( tr2i18n( "<p align=\"center\">List</p>" ) );
00220     m_listIncludeFileHistoryCombo->setCurrentItem( 0 );
00221     textLabel4_2_2_2->setText( tr2i18n( "<i>global?</i>" ) );
00222     m_stringIncludeFileHistoryCombo->setCurrentItem( 0 );
00223     m_globalListCheckBox->setText( QString::null );
00224     textLabel3_2_2->setText( tr2i18n( "Class name" ) );
00225     m_browseListButton->setText( tr2i18n( "..." ) );
00226     textLabel5_2_2_2->setText( tr2i18n( "<i><p align=\"center\">Include file</p></i>" ) );
00227     tabWidget2->changeTab( tab_2, tr2i18n( "Method Body Generation" ) );
00228 }
00229 
00230 void CPPCodeGenerationFormBase::browseClicked()
00231 {
00232     qWarning( "CPPCodeGenerationFormBase::browseClicked(): Not implemented yet" );
00233 }
00234 
00235 #include "cppcodegenerationformbase.moc"
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:07:55 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003