KDevelop API Documentation

antoptionswidget.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 './antoptionswidget.ui'
00005 **
00006 ** Created: Tue Feb 22 09:11:21 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 "antoptionswidget.h"
00013 
00014 #include <qvariant.h>
00015 #include <kcombobox.h>
00016 #include <klineedit.h>
00017 #include <kpushbutton.h>
00018 #include <kdialog.h>
00019 #include <qlabel.h>
00020 #include <qtable.h>
00021 #include <kurlrequester.h>
00022 #include <qlayout.h>
00023 #include <qtooltip.h>
00024 #include <qwhatsthis.h>
00025 
00026 /*
00027  *  Constructs a AntOptionsWidget as a child of 'parent', with the
00028  *  name 'name' and widget flags set to 'f'.
00029  */
00030 AntOptionsWidget::AntOptionsWidget( QWidget* parent, const char* name, WFlags fl )
00031     : QWidget( parent, name, fl )
00032 {
00033     if ( !name )
00034     setName( "AntOptionsWidget" );
00035     AntOptionsWidgetLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "AntOptionsWidgetLayout"); 
00036 
00037     Verbosity = new KComboBox( FALSE, this, "Verbosity" );
00038 
00039     AntOptionsWidgetLayout->addWidget( Verbosity, 1, 1 );
00040     Spacer1 = new QSpacerItem( 16, 86, QSizePolicy::Minimum, QSizePolicy::Expanding );
00041     AntOptionsWidgetLayout->addItem( Spacer1, 3, 2 );
00042     Spacer2 = new QSpacerItem( 16, 86, QSizePolicy::Minimum, QSizePolicy::Expanding );
00043     AntOptionsWidgetLayout->addItem( Spacer2, 3, 0 );
00044 
00045     TextLabel1 = new QLabel( this, "TextLabel1" );
00046 
00047     AntOptionsWidgetLayout->addWidget( TextLabel1, 0, 0 );
00048 
00049     TextLabel2 = new QLabel( this, "TextLabel2" );
00050 
00051     AntOptionsWidgetLayout->addWidget( TextLabel2, 1, 0 );
00052 
00053     TextLabel3 = new QLabel( this, "TextLabel3" );
00054     TextLabel3->setAlignment( int( QLabel::AlignTop ) );
00055 
00056     AntOptionsWidgetLayout->addWidget( TextLabel3, 2, 0 );
00057 
00058     Properties = new QTable( this, "Properties" );
00059     Properties->setNumCols( Properties->numCols() + 1 );
00060     Properties->horizontalHeader()->setLabel( Properties->numCols() - 1, tr2i18n( "Property" ) );
00061     Properties->setNumCols( Properties->numCols() + 1 );
00062     Properties->horizontalHeader()->setLabel( Properties->numCols() - 1, tr2i18n( "Value" ) );
00063     Properties->setNumRows( 0 );
00064     Properties->setNumCols( 2 );
00065 
00066     AntOptionsWidgetLayout->addMultiCellWidget( Properties, 2, 2, 1, 2 );
00067     Spacer3 = new QSpacerItem( 240, 16, QSizePolicy::Expanding, QSizePolicy::Minimum );
00068     AntOptionsWidgetLayout->addItem( Spacer3, 1, 2 );
00069 
00070     BuildXML = new KURLRequester( this, "BuildXML" );
00071 
00072     AntOptionsWidgetLayout->addMultiCellWidget( BuildXML, 0, 0, 1, 2 );
00073     languageChange();
00074     resize( QSize(410, 266).expandedTo(minimumSizeHint()) );
00075     clearWState( WState_Polished );
00076 
00077     // tab order
00078     setTabOrder( BuildXML, Verbosity );
00079     setTabOrder( Verbosity, Properties );
00080 
00081     // buddies
00082     TextLabel1->setBuddy( BuildXML );
00083     TextLabel2->setBuddy( Verbosity );
00084     TextLabel3->setBuddy( Properties );
00085 }
00086 
00087 /*
00088  *  Destroys the object and frees any allocated resources
00089  */
00090 AntOptionsWidget::~AntOptionsWidget()
00091 {
00092     // no need to delete child widgets, Qt does it all for us
00093 }
00094 
00095 /*
00096  *  Sets the strings of the subwidgets using the current
00097  *  language.
00098  */
00099 void AntOptionsWidget::languageChange()
00100 {
00101     Verbosity->clear();
00102     Verbosity->insertItem( tr2i18n( "Quiet" ) );
00103     Verbosity->insertItem( tr2i18n( "Verbose" ) );
00104     Verbosity->insertItem( tr2i18n( "Debug" ) );
00105     TextLabel1->setText( tr2i18n( "&Build file:" ) );
00106     TextLabel2->setText( tr2i18n( "&Verbosity:" ) );
00107     TextLabel3->setText( tr2i18n( "&Properties:" ) );
00108     Properties->horizontalHeader()->setLabel( 0, tr2i18n( "Property" ) );
00109     Properties->horizontalHeader()->setLabel( 1, tr2i18n( "Value" ) );
00110 }
00111 
00112 #include "antoptionswidget.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 Tue Feb 22 09:22:20 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003