00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "dialog_widget.h"
00013
00014 #include <qvariant.h>
00015 #include <kdialog.h>
00016 #include <qpushbutton.h>
00017 #include <qgroupbox.h>
00018 #include <kurlrequester.h>
00019 #include <qlabel.h>
00020 #include <klineedit.h>
00021 #include <qwidgetstack.h>
00022 #include <qcheckbox.h>
00023 #include <qlayout.h>
00024 #include <qtooltip.h>
00025 #include <qwhatsthis.h>
00026 #include "./dialog_widget.ui.h"
00027
00028
00029
00030
00031
00032 DialogWidget::DialogWidget( QWidget* parent, const char* name, WFlags fl )
00033 : QWidget( parent, name, fl )
00034 {
00035 if ( !name )
00036 setName( "DialogWidget" );
00037 DialogWidgetLayout = new QGridLayout( this, 1, 1, KDialog::marginHint(), KDialog::spacingHint(), "DialogWidgetLayout");
00038
00039 groupBox1 = new QGroupBox( this, "groupBox1" );
00040 groupBox1->setColumnLayout(0, Qt::Vertical );
00041 groupBox1->layout()->setSpacing( KDialog::spacingHint() );
00042 groupBox1->layout()->setMargin( KDialog::marginHint() );
00043 groupBox1Layout = new QGridLayout( groupBox1->layout() );
00044 groupBox1Layout->setAlignment( Qt::AlignTop );
00045
00046 executableEdit = new KURLRequester( groupBox1, "executableEdit" );
00047
00048 groupBox1Layout->addWidget( executableEdit, 0, 1 );
00049
00050 textLabel3 = new QLabel( groupBox1, "textLabel3" );
00051
00052 groupBox1Layout->addWidget( textLabel3, 1, 0 );
00053
00054 textLabel2 = new QLabel( groupBox1, "textLabel2" );
00055
00056 groupBox1Layout->addWidget( textLabel2, 0, 0 );
00057
00058 paramEdit = new KLineEdit( groupBox1, "paramEdit" );
00059
00060 groupBox1Layout->addWidget( paramEdit, 1, 1 );
00061
00062 DialogWidgetLayout->addWidget( groupBox1, 0, 0 );
00063
00064 stack = new QWidgetStack( this, "stack" );
00065
00066 WStackPage = new QWidget( stack, "WStackPage" );
00067 WStackPageLayout = new QGridLayout( WStackPage, 1, 1, 0, KDialog::spacingHint(), "WStackPageLayout");
00068
00069 groupBox2 = new QGroupBox( WStackPage, "groupBox2" );
00070 groupBox2->setColumnLayout(0, Qt::Vertical );
00071 groupBox2->layout()->setSpacing( KDialog::spacingHint() );
00072 groupBox2->layout()->setMargin( KDialog::marginHint() );
00073 groupBox2Layout = new QVBoxLayout( groupBox2->layout() );
00074 groupBox2Layout->setAlignment( Qt::AlignTop );
00075
00076 memleakBox = new QCheckBox( groupBox2, "memleakBox" );
00077 memleakBox->setChecked( TRUE );
00078 groupBox2Layout->addWidget( memleakBox );
00079
00080 layout2 = new QHBoxLayout( 0, 0, KDialog::spacingHint(), "layout2");
00081 spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
00082 layout2->addItem( spacer1 );
00083
00084 reachableBox = new QCheckBox( groupBox2, "reachableBox" );
00085 layout2->addWidget( reachableBox );
00086 groupBox2Layout->addLayout( layout2 );
00087
00088 childrenBox = new QCheckBox( groupBox2, "childrenBox" );
00089 groupBox2Layout->addWidget( childrenBox );
00090
00091 layout3 = new QGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3");
00092
00093 textLabel5 = new QLabel( groupBox2, "textLabel5" );
00094
00095 layout3->addWidget( textLabel5, 1, 0 );
00096
00097 valParamEdit = new KLineEdit( groupBox2, "valParamEdit" );
00098
00099 layout3->addWidget( valParamEdit, 1, 1 );
00100
00101 valExecutableEdit = new KURLRequester( groupBox2, "valExecutableEdit" );
00102
00103 layout3->addWidget( valExecutableEdit, 0, 1 );
00104
00105 textLabel4 = new QLabel( groupBox2, "textLabel4" );
00106
00107 layout3->addWidget( textLabel4, 0, 0 );
00108 groupBox2Layout->addLayout( layout3 );
00109
00110 WStackPageLayout->addWidget( groupBox2, 0, 0 );
00111 stack->addWidget( WStackPage, 0 );
00112
00113 WStackPage_2 = new QWidget( stack, "WStackPage_2" );
00114 WStackPageLayout_2 = new QGridLayout( WStackPage_2, 1, 1, 0, KDialog::spacingHint(), "WStackPageLayout_2");
00115
00116 groupBox3 = new QGroupBox( WStackPage_2, "groupBox3" );
00117 groupBox3->setColumnLayout(0, Qt::Vertical );
00118 groupBox3->layout()->setSpacing( KDialog::spacingHint() );
00119 groupBox3->layout()->setMargin( KDialog::marginHint() );
00120 groupBox3Layout = new QGridLayout( groupBox3->layout() );
00121 groupBox3Layout->setAlignment( Qt::AlignTop );
00122
00123 layout3_2 = new QGridLayout( 0, 1, 1, 0, KDialog::spacingHint(), "layout3_2");
00124
00125 textLabel5_2 = new QLabel( groupBox3, "textLabel5_2" );
00126
00127 layout3_2->addWidget( textLabel5_2, 1, 0 );
00128
00129 ctParamEdit = new KLineEdit( groupBox3, "ctParamEdit" );
00130
00131 layout3_2->addWidget( ctParamEdit, 1, 1 );
00132
00133 ctExecutableEdit = new KURLRequester( groupBox3, "ctExecutableEdit" );
00134
00135 layout3_2->addWidget( ctExecutableEdit, 0, 1 );
00136
00137 textLabel4_2 = new QLabel( groupBox3, "textLabel4_2" );
00138
00139 layout3_2->addWidget( textLabel4_2, 0, 0 );
00140
00141 groupBox3Layout->addLayout( layout3_2, 1, 0 );
00142
00143 ctChildrenBox = new QCheckBox( groupBox3, "ctChildrenBox" );
00144
00145 groupBox3Layout->addWidget( ctChildrenBox, 0, 0 );
00146
00147 WStackPageLayout_2->addWidget( groupBox3, 0, 0 );
00148
00149 groupBox4 = new QGroupBox( WStackPage_2, "groupBox4" );
00150 groupBox4->setColumnLayout(0, Qt::Vertical );
00151 groupBox4->layout()->setSpacing( KDialog::spacingHint() );
00152 groupBox4->layout()->setMargin( KDialog::marginHint() );
00153 groupBox4Layout = new QGridLayout( groupBox4->layout() );
00154 groupBox4Layout->setAlignment( Qt::AlignTop );
00155
00156 kcExecutableEdit = new KURLRequester( groupBox4, "kcExecutableEdit" );
00157
00158 groupBox4Layout->addWidget( kcExecutableEdit, 0, 1 );
00159
00160 textLabel4_2_2 = new QLabel( groupBox4, "textLabel4_2_2" );
00161
00162 groupBox4Layout->addWidget( textLabel4_2_2, 0, 0 );
00163
00164 WStackPageLayout_2->addWidget( groupBox4, 1, 0 );
00165 stack->addWidget( WStackPage_2, 1 );
00166
00167 DialogWidgetLayout->addWidget( stack, 1, 0 );
00168 languageChange();
00169 resize( QSize(322, 306).expandedTo(minimumSizeHint()) );
00170 clearWState( WState_Polished );
00171
00172
00173 connect( memleakBox, SIGNAL( toggled(bool) ), this, SLOT( checkBoxToggled() ) );
00174
00175
00176 setTabOrder( executableEdit, paramEdit );
00177 setTabOrder( paramEdit, memleakBox );
00178 setTabOrder( memleakBox, reachableBox );
00179 setTabOrder( reachableBox, childrenBox );
00180 setTabOrder( childrenBox, valExecutableEdit );
00181 setTabOrder( valExecutableEdit, valParamEdit );
00182 setTabOrder( valParamEdit, ctChildrenBox );
00183 setTabOrder( ctChildrenBox, ctExecutableEdit );
00184 setTabOrder( ctExecutableEdit, ctParamEdit );
00185 setTabOrder( ctParamEdit, kcExecutableEdit );
00186
00187
00188 textLabel3->setBuddy( paramEdit );
00189 textLabel2->setBuddy( executableEdit );
00190 textLabel5->setBuddy( valParamEdit );
00191 textLabel4->setBuddy( valExecutableEdit );
00192 textLabel5_2->setBuddy( valParamEdit );
00193 textLabel4_2->setBuddy( valExecutableEdit );
00194 textLabel4_2_2->setBuddy( valExecutableEdit );
00195 init();
00196 }
00197
00198
00199
00200
00201 DialogWidget::~DialogWidget()
00202 {
00203
00204 }
00205
00206
00207
00208
00209
00210 void DialogWidget::languageChange()
00211 {
00212 groupBox1->setTitle( tr2i18n( "Application" ) );
00213 textLabel3->setText( tr2i18n( "&Parameters:" ) );
00214 textLabel2->setText( tr2i18n( "&Executable:" ) );
00215 groupBox2->setTitle( tr2i18n( "Valgrind" ) );
00216 memleakBox->setText( tr2i18n( "Memory &leak check" ) );
00217 reachableBox->setText( tr2i18n( "&Show still reachable blocks" ) );
00218 childrenBox->setText( tr2i18n( "&Trace children" ) );
00219 textLabel5->setText( tr2i18n( "Additional p&arameters:" ) );
00220 textLabel4->setText( tr2i18n( "E&xecutable:" ) );
00221 groupBox3->setTitle( tr2i18n( "Calltree" ) );
00222 textLabel5_2->setText( tr2i18n( "Additional p&arameters:" ) );
00223 textLabel4_2->setText( tr2i18n( "E&xecutable:" ) );
00224 ctChildrenBox->setText( tr2i18n( "&Trace children" ) );
00225 groupBox4->setTitle( tr2i18n( "KCachegrind" ) );
00226 textLabel4_2_2->setText( tr2i18n( "Executable:" ) );
00227 }
00228
00229 #include "dialog_widget.moc"