00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
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
00028
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
00078 setTabOrder( BuildXML, Verbosity );
00079 setTabOrder( Verbosity, Properties );
00080
00081
00082 TextLabel1->setBuddy( BuildXML );
00083 TextLabel2->setBuddy( Verbosity );
00084 TextLabel3->setBuddy( Properties );
00085 }
00086
00087
00088
00089
00090 AntOptionsWidget::~AntOptionsWidget()
00091 {
00092
00093 }
00094
00095
00096
00097
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"