stifui/qt/src/dlgsetting.cpp
changeset 26 41ebde60981f
parent 17 4f2773374eff
child 31 e7a04a6385be
--- a/stifui/qt/src/dlgsetting.cpp	Thu May 13 21:10:48 2010 +0300
+++ b/stifui/qt/src/dlgsetting.cpp	Fri May 14 15:15:12 2010 +0300
@@ -32,36 +32,38 @@
     
     chkShowoutput = new QCheckBox(this);
     chkShowoutput->setText(tr("Show output in execution."));
-    chkShowoutput->setChecked(setting->ReadSetting("showoutput") == "true");
-    
+    chkShowoutput->setChecked(setting->ReadSetting(KShowOutput) == "true");
     QWidget *toolWidget = new QWidget(this);
-    QGridLayout *toolLayout = new QGridLayout();
+    QGridLayout *toolLayout = new QGridLayout(this);
     
     toolWidget->setLayout(toolLayout);
     btnOk = new QPushButton(tr("Ok"), toolWidget);
-    btnOk->setFixedSize(100, 30);
     QObject::connect(btnOk, SIGNAL(clicked()), this,
             SLOT(on_btnOk_clicked()));
     btnCancel = new QPushButton(tr("Cancel"), toolWidget);
-    btnCancel->setFixedSize(100, 30);
     QObject::connect(btnCancel, SIGNAL(clicked()), this,
             SLOT(on_btnCancel_clicked()));
     toolLayout->addWidget(btnOk, 0, 0);
     toolLayout->addWidget(btnCancel, 0, 1);
 
-    mainLayout->addWidget(chkShowoutput, 0, 0);
-    mainLayout->addWidget(toolWidget, 2, 0);    
+    QWidget *nullWidget = new QWidget(this);
+    nullWidget->setMinimumHeight(30);
+    
+    mainLayout->addWidget(nullWidget, 0, 0);
+    mainLayout->addWidget(chkShowoutput, 1, 0);
+    mainLayout->addWidget(toolWidget, 3, 0);    
+    
     }
 
 void DlgSetting::on_btnOk_clicked()
     {
     if(chkShowoutput->checkState() == Qt::Checked)
         {
-        setting->SetSetting("showoutput", "true");
+        setting->SetSetting(KShowOutput, "true");
         }
     else
         {
-        setting->SetSetting("showoutput", "false");    
+        setting->SetSetting(KShowOutput, "false");    
         }
     this->accept();
     }