KDevelop API Documentation

pascalproject_optionsdlgbase.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 './pascalproject_optionsdlgbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:57:35 2005
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 "pascalproject_optionsdlgbase.h"
00013 
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qlabel.h>
00017 #include <qcombobox.h>
00018 #include <qpushbutton.h>
00019 #include <qlineedit.h>
00020 #include <qframe.h>
00021 #include <kurlrequester.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a PascalProjectOptionsDlgBase as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 PascalProjectOptionsDlgBase::PascalProjectOptionsDlgBase( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "PascalProjectOptionsDlgBase" );
00035     setEnabled( TRUE );
00036     PascalProjectOptionsDlgBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "PascalProjectOptionsDlgBaseLayout"); 
00037 
00038     configuration_layout = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "configuration_layout"); 
00039 
00040     config_label = new QLabel( this, "config_label" );
00041     config_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, config_label->sizePolicy().hasHeightForWidth() ) );
00042     configuration_layout->addWidget( config_label );
00043 
00044     config_combo = new QComboBox( FALSE, this, "config_combo" );
00045     config_combo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, config_combo->sizePolicy().hasHeightForWidth() ) );
00046     config_combo->setEditable( TRUE );
00047     configuration_layout->addWidget( config_combo );
00048     Spacer17_2 = new QSpacerItem( 20, 8, QSizePolicy::Fixed, QSizePolicy::Minimum );
00049     configuration_layout->addItem( Spacer17_2 );
00050 
00051     addconfig_button = new QPushButton( this, "addconfig_button" );
00052     configuration_layout->addWidget( addconfig_button );
00053 
00054     removeconfig_button = new QPushButton( this, "removeconfig_button" );
00055     configuration_layout->addWidget( removeconfig_button );
00056     Spacer18_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00057     configuration_layout->addItem( Spacer18_2 );
00058 
00059     PascalProjectOptionsDlgBaseLayout->addMultiCellLayout( configuration_layout, 0, 0, 0, 4 );
00060 
00061     options_button = new QPushButton( this, "options_button" );
00062     options_button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, options_button->sizePolicy().hasHeightForWidth() ) );
00063     options_button->setMaximumSize( QSize( 30, 32767 ) );
00064 
00065     PascalProjectOptionsDlgBaseLayout->addWidget( options_button, 6, 4 );
00066 
00067     options_label = new QLabel( this, "options_label" );
00068     options_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, options_label->sizePolicy().hasHeightForWidth() ) );
00069 
00070     PascalProjectOptionsDlgBaseLayout->addWidget( options_label, 6, 0 );
00071 
00072     compiler_label = new QLabel( this, "compiler_label" );
00073     compiler_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, compiler_label->sizePolicy().hasHeightForWidth() ) );
00074 
00075     PascalProjectOptionsDlgBaseLayout->addWidget( compiler_label, 2, 0 );
00076 
00077     exec_edit = new QLineEdit( this, "exec_edit" );
00078 
00079     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( exec_edit, 4, 4, 1, 3 );
00080 
00081     options_edit = new QLineEdit( this, "options_edit" );
00082 
00083     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( options_edit, 6, 6, 1, 3 );
00084 
00085     compiler_box = new QComboBox( FALSE, this, "compiler_box" );
00086 
00087     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( compiler_box, 2, 2, 1, 3 );
00088 
00089     exec_label = new QLabel( this, "exec_label" );
00090     exec_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, exec_label->sizePolicy().hasHeightForWidth() ) );
00091 
00092     PascalProjectOptionsDlgBaseLayout->addWidget( exec_label, 4, 0 );
00093 
00094     configuration_line = new QFrame( this, "configuration_line" );
00095     configuration_line->setFrameShape( QFrame::HLine );
00096     configuration_line->setFrameShadow( QFrame::Sunken );
00097     configuration_line->setFrameShape( QFrame::HLine );
00098 
00099     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( configuration_line, 1, 1, 0, 4 );
00100     spacer11 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00101     PascalProjectOptionsDlgBaseLayout->addItem( spacer11, 3, 1 );
00102     spacer12 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00103     PascalProjectOptionsDlgBaseLayout->addItem( spacer12, 5, 3 );
00104     spacer13 = new QSpacerItem( 20, 30, QSizePolicy::Minimum, QSizePolicy::Fixed );
00105     PascalProjectOptionsDlgBaseLayout->addItem( spacer13, 8, 2 );
00106     spacer7 = new QSpacerItem( 400, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00107     PascalProjectOptionsDlgBaseLayout->addMultiCell( spacer7, 7, 7, 0, 2 );
00108 
00109     defaultopts_button = new QPushButton( this, "defaultopts_button" );
00110 
00111     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( defaultopts_button, 7, 7, 3, 4 );
00112 
00113     mainSourceUrl = new KURLRequester( this, "mainSourceUrl" );
00114     mainSourceUrl->setMinimumSize( QSize( 0, 26 ) );
00115     mainSourceUrl->setFocusPolicy( KURLRequester::WheelFocus );
00116 
00117     PascalProjectOptionsDlgBaseLayout->addMultiCellWidget( mainSourceUrl, 9, 9, 1, 4 );
00118 
00119     mainSourceLabel = new QLabel( this, "mainSourceLabel" );
00120     mainSourceLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, mainSourceLabel->sizePolicy().hasHeightForWidth() ) );
00121 
00122     PascalProjectOptionsDlgBaseLayout->addWidget( mainSourceLabel, 9, 0 );
00123     spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
00124     PascalProjectOptionsDlgBaseLayout->addItem( spacer1, 12, 1 );
00125     languageChange();
00126     resize( QSize(600, 480).expandedTo(minimumSizeHint()) );
00127     clearWState( WState_Polished );
00128 
00129     // signals and slots connections
00130     connect( compiler_box, SIGNAL( activated(const QString&) ), this, SLOT( compiler_box_activated(const QString&) ) );
00131     connect( removeconfig_button, SIGNAL( clicked() ), this, SLOT( configRemoved() ) );
00132     connect( config_combo, SIGNAL( textChanged(const QString&) ), this, SLOT( configComboTextChanged(const QString&) ) );
00133     connect( config_combo, SIGNAL( activated(const QString&) ), this, SLOT( configChanged(const QString&) ) );
00134     connect( addconfig_button, SIGNAL( clicked() ), this, SLOT( configAdded() ) );
00135     connect( options_button, SIGNAL( clicked() ), this, SLOT( optionsButtonClicked() ) );
00136     connect( exec_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( setDirty() ) );
00137     connect( options_edit, SIGNAL( textChanged(const QString&) ), this, SLOT( setDirty() ) );
00138     connect( mainSourceUrl, SIGNAL( textChanged(const QString&) ), this, SLOT( setDirty() ) );
00139     connect( mainSourceUrl, SIGNAL( urlSelected(const QString&) ), this, SLOT( setDirty() ) );
00140     connect( compiler_box, SIGNAL( activated(const QString&) ), this, SLOT( setDirty() ) );
00141     connect( compiler_box, SIGNAL( textChanged(const QString&) ), this, SLOT( setDirty() ) );
00142     connect( defaultopts_button, SIGNAL( clicked() ), this, SLOT( setDefaultOptions() ) );
00143     connect( defaultopts_button, SIGNAL( clicked() ), this, SLOT( setDirty() ) );
00144 
00145     // tab order
00146     setTabOrder( compiler_box, exec_edit );
00147     setTabOrder( exec_edit, options_edit );
00148     setTabOrder( options_edit, options_button );
00149     setTabOrder( options_button, defaultopts_button );
00150     setTabOrder( defaultopts_button, mainSourceUrl );
00151     setTabOrder( mainSourceUrl, config_combo );
00152     setTabOrder( config_combo, addconfig_button );
00153     setTabOrder( addconfig_button, removeconfig_button );
00154 
00155     // buddies
00156     config_label->setBuddy( config_combo );
00157     options_label->setBuddy( compiler_box );
00158     compiler_label->setBuddy( compiler_box );
00159     exec_label->setBuddy( compiler_box );
00160     mainSourceLabel->setBuddy( compiler_box );
00161 }
00162 
00163 /*
00164  *  Destroys the object and frees any allocated resources
00165  */
00166 PascalProjectOptionsDlgBase::~PascalProjectOptionsDlgBase()
00167 {
00168     // no need to delete child widgets, Qt does it all for us
00169 }
00170 
00171 /*
00172  *  Sets the strings of the subwidgets using the current
00173  *  language.
00174  */
00175 void PascalProjectOptionsDlgBase::languageChange()
00176 {
00177     setCaption( tr2i18n( "Pascal Compiler" ) );
00178     config_label->setText( tr2i18n( "Con&figuration:" ) );
00179     addconfig_button->setText( tr2i18n( "&Add" ) );
00180     removeconfig_button->setText( tr2i18n( "&Remove" ) );
00181     options_button->setText( tr2i18n( "..." ) );
00182     options_label->setText( tr2i18n( "Compiler op&tions:" ) );
00183     compiler_label->setText( tr2i18n( "&Pascal compiler:" ) );
00184     exec_label->setText( tr2i18n( "Compiler co&mmand:" ) );
00185     defaultopts_button->setText( tr2i18n( "Load &Default Compiler Options" ) );
00186     mainSourceLabel->setText( tr2i18n( "Main &source file:" ) );
00187 }
00188 
00189 void PascalProjectOptionsDlgBase::compiler_box_activated(const QString&)
00190 {
00191     qWarning( "PascalProjectOptionsDlgBase::compiler_box_activated(const QString&): Not implemented yet" );
00192 }
00193 
00194 void PascalProjectOptionsDlgBase::addconfig_button_clicked()
00195 {
00196     qWarning( "PascalProjectOptionsDlgBase::addconfig_button_clicked(): Not implemented yet" );
00197 }
00198 
00199 void PascalProjectOptionsDlgBase::configRemoved()
00200 {
00201     qWarning( "PascalProjectOptionsDlgBase::configRemoved(): Not implemented yet" );
00202 }
00203 
00204 void PascalProjectOptionsDlgBase::configComboTextChanged(const QString&)
00205 {
00206     qWarning( "PascalProjectOptionsDlgBase::configComboTextChanged(const QString&): Not implemented yet" );
00207 }
00208 
00209 void PascalProjectOptionsDlgBase::configChanged(const QString&)
00210 {
00211     qWarning( "PascalProjectOptionsDlgBase::configChanged(const QString&): Not implemented yet" );
00212 }
00213 
00214 void PascalProjectOptionsDlgBase::optionsButtonClicked()
00215 {
00216     qWarning( "PascalProjectOptionsDlgBase::optionsButtonClicked(): Not implemented yet" );
00217 }
00218 
00219 void PascalProjectOptionsDlgBase::configAdded()
00220 {
00221     qWarning( "PascalProjectOptionsDlgBase::configAdded(): Not implemented yet" );
00222 }
00223 
00224 void PascalProjectOptionsDlgBase::setDirty()
00225 {
00226     qWarning( "PascalProjectOptionsDlgBase::setDirty(): Not implemented yet" );
00227 }
00228 
00229 void PascalProjectOptionsDlgBase::setDefaultOptions()
00230 {
00231     qWarning( "PascalProjectOptionsDlgBase::setDefaultOptions(): Not implemented yet" );
00232 }
00233 
00234 #include "pascalproject_optionsdlgbase.moc"
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Mar 23 00:03:40 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003