stifui/qt/src/dlgsetting.cpp
branchRCL_3
changeset 12 aefcba28a3e0
parent 9 404ad6c9bc20
child 19 d40e813b23c0
--- a/stifui/qt/src/dlgsetting.cpp	Tue May 11 16:14:15 2010 +0300
+++ b/stifui/qt/src/dlgsetting.cpp	Tue May 25 12:43:15 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();
     }