KDevelop API Documentation

adaproject_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 './adaproject_optionsdlgbase.ui'
00005 **
00006 ** Created: Tue Mar 22 23:56:02 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 "adaproject_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 AdaProjectOptionsDlgBase as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 AdaProjectOptionsDlgBase::AdaProjectOptionsDlgBase( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "AdaProjectOptionsDlgBase" );
00035     setEnabled( TRUE );
00036     AdaProjectOptionsDlgBaseLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AdaProjectOptionsDlgBaseLayout"); 
00037     spacer1 = new QSpacerItem( 20, 160, QSizePolicy::Minimum, QSizePolicy::Expanding );
00038     AdaProjectOptionsDlgBaseLayout->addItem( spacer1, 10, 1 );
00039 
00040     configuration_layout = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "configuration_layout"); 
00041 
00042     config_label = new QLabel( this, "config_label" );
00043     config_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, config_label->sizePolicy().hasHeightForWidth() ) );
00044     configuration_layout->addWidget( config_label );
00045 
00046     config_combo = new QComboBox( FALSE, this, "config_combo" );
00047     config_combo->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)3, (QSizePolicy::SizeType)0, 0, 0, config_combo->sizePolicy().hasHeightForWidth() ) );
00048     config_combo->setEditable( TRUE );
00049     configuration_layout->addWidget( config_combo );
00050     Spacer17_2 = new QSpacerItem( 20, 8, QSizePolicy::Fixed, QSizePolicy::Minimum );
00051     configuration_layout->addItem( Spacer17_2 );
00052 
00053     addconfig_button = new QPushButton( this, "addconfig_button" );
00054     configuration_layout->addWidget( addconfig_button );
00055 
00056     removeconfig_button = new QPushButton( this, "removeconfig_button" );
00057     configuration_layout->addWidget( removeconfig_button );
00058     Spacer18_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00059     configuration_layout->addItem( Spacer18_2 );
00060 
00061     AdaProjectOptionsDlgBaseLayout->addMultiCellLayout( configuration_layout, 0, 0, 0, 4 );
00062 
00063     options_button = new QPushButton( this, "options_button" );
00064     options_button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, options_button->sizePolicy().hasHeightForWidth() ) );
00065     options_button->setMaximumSize( QSize( 30, 32767 ) );
00066 
00067     AdaProjectOptionsDlgBaseLayout->addWidget( options_button, 6, 4 );
00068 
00069     options_label = new QLabel( this, "options_label" );
00070     options_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, options_label->sizePolicy().hasHeightForWidth() ) );
00071 
00072     AdaProjectOptionsDlgBaseLayout->addWidget( options_label, 6, 0 );
00073 
00074     compiler_label = new QLabel( this, "compiler_label" );
00075     compiler_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, compiler_label->sizePolicy().hasHeightForWidth() ) );
00076 
00077     AdaProjectOptionsDlgBaseLayout->addWidget( compiler_label, 2, 0 );
00078 
00079     exec_edit = new QLineEdit( this, "exec_edit" );
00080 
00081     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( exec_edit, 4, 4, 1, 3 );
00082 
00083     options_edit = new QLineEdit( this, "options_edit" );
00084 
00085     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( options_edit, 6, 6, 1, 3 );
00086 
00087     compiler_box = new QComboBox( FALSE, this, "compiler_box" );
00088 
00089     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( compiler_box, 2, 2, 1, 3 );
00090 
00091     exec_label = new QLabel( this, "exec_label" );
00092     exec_label->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, exec_label->sizePolicy().hasHeightForWidth() ) );
00093 
00094     AdaProjectOptionsDlgBaseLayout->addWidget( exec_label, 4, 0 );
00095 
00096     configuration_line = new QFrame( this, "configuration_line" );
00097     configuration_line->setFrameShape( QFrame::HLine );
00098     configuration_line->setFrameShadow( QFrame::Sunken );
00099     configuration_line->setFrameShape( QFrame::HLine );
00100 
00101     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( configuration_line, 1, 1, 0, 4 );
00102     spacer11 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00103     AdaProjectOptionsDlgBaseLayout->addItem( spacer11, 3, 1 );
00104     spacer12 = new QSpacerItem( 20, 16, QSizePolicy::Minimum, QSizePolicy::Fixed );
00105     AdaProjectOptionsDlgBaseLayout->addItem( spacer12, 5, 3 );
00106 
00107     mainSourceUrl = new KURLRequester( this, "mainSourceUrl" );
00108     mainSourceUrl->setMinimumSize( QSize( 0, 26 ) );
00109     mainSourceUrl->setFocusPolicy( KURLRequester::WheelFocus );
00110 
00111     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( mainSourceUrl, 9, 9, 1, 4 );
00112 
00113     mainSourceLabel = new QLabel( this, "mainSourceLabel" );
00114     mainSourceLabel->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, mainSourceLabel->sizePolicy().hasHeightForWidth() ) );
00115 
00116     AdaProjectOptionsDlgBaseLayout->addWidget( mainSourceLabel, 9, 0 );
00117     spacer13 = new QSpacerItem( 20, 30, QSizePolicy::Minimum, QSizePolicy::Fixed );
00118     AdaProjectOptionsDlgBaseLayout->addItem( spacer13, 8, 2 );
00119     spacer7 = new QSpacerItem( 400, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
00120     AdaProjectOptionsDlgBaseLayout->addMultiCell( spacer7, 7, 7, 0, 2 );
00121 
00122     defaultopts_button = new QPushButton( this, "defaultopts_button" );
00123 
00124     AdaProjectOptionsDlgBaseLayout->addMultiCellWidget( defaultopts_button, 7, 7, 3, 4 );
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, mainSourceUrl );
00150     setTabOrder( mainSourceUrl, config_combo );
00151     setTabOrder( config_combo, addconfig_button );
00152     setTabOrder( addconfig_button, removeconfig_button );
00153 
00154     // buddies
00155     options_label->setBuddy( compiler_box );
00156     compiler_label->setBuddy( compiler_box );
00157     exec_label->setBuddy( compiler_box );
00158     mainSourceLabel->setBuddy( compiler_box );
00159 }
00160 
00161 /*
00162  *  Destroys the object and frees any allocated resources
00163  */
00164 AdaProjectOptionsDlgBase::~AdaProjectOptionsDlgBase()
00165 {
00166     // no need to delete child widgets, Qt does it all for us
00167 }
00168 
00169 /*
00170  *  Sets the strings of the subwidgets using the current
00171  *  language.
00172  */
00173 void AdaProjectOptionsDlgBase::languageChange()
00174 {
00175     setCaption( tr2i18n( "Ada Compiler" ) );
00176     config_label->setText( tr2i18n( "Configuration:" ) );
00177     addconfig_button->setText( tr2i18n( "Add" ) );
00178     removeconfig_button->setText( tr2i18n( "Remove" ) );
00179     options_button->setText( tr2i18n( "..." ) );
00180     options_label->setText( tr2i18n( "Compiler &options:" ) );
00181     compiler_label->setText( tr2i18n( "Ada &compiler:" ) );
00182     exec_label->setText( tr2i18n( "Compiler co&mmand:" ) );
00183     mainSourceLabel->setText( tr2i18n( "Main &source file:" ) );
00184     defaultopts_button->setText( tr2i18n( "Load Default Compiler Options" ) );
00185 }
00186 
00187 void AdaProjectOptionsDlgBase::compiler_box_activated(const QString&)
00188 {
00189     qWarning( "AdaProjectOptionsDlgBase::compiler_box_activated(const QString&): Not implemented yet" );
00190 }
00191 
00192 void AdaProjectOptionsDlgBase::addconfig_button_clicked()
00193 {
00194     qWarning( "AdaProjectOptionsDlgBase::addconfig_button_clicked(): Not implemented yet" );
00195 }
00196 
00197 void AdaProjectOptionsDlgBase::configRemoved()
00198 {
00199     qWarning( "AdaProjectOptionsDlgBase::configRemoved(): Not implemented yet" );
00200 }
00201 
00202 void AdaProjectOptionsDlgBase::configComboTextChanged(const QString&)
00203 {
00204     qWarning( "AdaProjectOptionsDlgBase::configComboTextChanged(const QString&): Not implemented yet" );
00205 }
00206 
00207 void AdaProjectOptionsDlgBase::configChanged(const QString&)
00208 {
00209     qWarning( "AdaProjectOptionsDlgBase::configChanged(const QString&): Not implemented yet" );
00210 }
00211 
00212 void AdaProjectOptionsDlgBase::optionsButtonClicked()
00213 {
00214     qWarning( "AdaProjectOptionsDlgBase::optionsButtonClicked(): Not implemented yet" );
00215 }
00216 
00217 void AdaProjectOptionsDlgBase::configAdded()
00218 {
00219     qWarning( "AdaProjectOptionsDlgBase::configAdded(): Not implemented yet" );
00220 }
00221 
00222 void AdaProjectOptionsDlgBase::setDirty()
00223 {
00224     qWarning( "AdaProjectOptionsDlgBase::setDirty(): Not implemented yet" );
00225 }
00226 
00227 void AdaProjectOptionsDlgBase::setDefaultOptions()
00228 {
00229     qWarning( "AdaProjectOptionsDlgBase::setDefaultOptions(): Not implemented yet" );
00230 }
00231 
00232 #include "adaproject_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:38 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003