30 QGridLayout *mainLayout = new QGridLayout(this); |
30 QGridLayout *mainLayout = new QGridLayout(this); |
31 this->setLayout(mainLayout); |
31 this->setLayout(mainLayout); |
32 |
32 |
33 chkShowoutput = new QCheckBox(this); |
33 chkShowoutput = new QCheckBox(this); |
34 chkShowoutput->setText(tr("Show output in execution.")); |
34 chkShowoutput->setText(tr("Show output in execution.")); |
35 chkShowoutput->setChecked(setting->ReadSetting("showoutput") == "true"); |
35 chkShowoutput->setChecked(setting->ReadSetting(KShowOutput) == "true"); |
|
36 |
|
37 lblFilter = new QLabel(this); |
|
38 lblFilter->setText(tr("Filter for displayed titles.")); |
|
39 ledFilter = new QLineEdit(this); |
|
40 ledFilter->setFrame(true); |
|
41 ledFilter->setText(setting->ReadSetting(KFilter)); |
|
42 chkFilterCaseSens = new QCheckBox(this); |
|
43 chkFilterCaseSens->setText(tr("Filter is case sensitive.")); |
|
44 chkFilterCaseSens->setChecked(setting->ReadSetting(KFilterCaseSens) == "true"); |
36 |
45 |
37 QWidget *toolWidget = new QWidget(this); |
46 QWidget *toolWidget = new QWidget(this); |
38 QGridLayout *toolLayout = new QGridLayout(); |
47 QGridLayout *toolLayout = new QGridLayout(this); |
39 |
48 |
40 toolWidget->setLayout(toolLayout); |
49 toolWidget->setLayout(toolLayout); |
41 btnOk = new QPushButton(tr("Ok"), toolWidget); |
50 btnOk = new QPushButton(tr("Ok"), toolWidget); |
42 btnOk->setFixedSize(100, 30); |
|
43 QObject::connect(btnOk, SIGNAL(clicked()), this, |
51 QObject::connect(btnOk, SIGNAL(clicked()), this, |
44 SLOT(on_btnOk_clicked())); |
52 SLOT(on_btnOk_clicked())); |
45 btnCancel = new QPushButton(tr("Cancel"), toolWidget); |
53 btnCancel = new QPushButton(tr("Cancel"), toolWidget); |
46 btnCancel->setFixedSize(100, 30); |
|
47 QObject::connect(btnCancel, SIGNAL(clicked()), this, |
54 QObject::connect(btnCancel, SIGNAL(clicked()), this, |
48 SLOT(on_btnCancel_clicked())); |
55 SLOT(on_btnCancel_clicked())); |
49 toolLayout->addWidget(btnOk, 0, 0); |
56 toolLayout->addWidget(btnOk, 0, 0); |
50 toolLayout->addWidget(btnCancel, 0, 1); |
57 toolLayout->addWidget(btnCancel, 0, 1); |
51 |
58 |
52 mainLayout->addWidget(chkShowoutput, 0, 0); |
59 QWidget *nullWidget = new QWidget(this); |
53 mainLayout->addWidget(toolWidget, 2, 0); |
60 nullWidget->setMinimumHeight(30); |
|
61 |
|
62 mainLayout->addWidget(nullWidget, 0, 0); |
|
63 mainLayout->addWidget(chkShowoutput, 1, 0); |
|
64 mainLayout->addWidget(lblFilter, 3, 0); |
|
65 mainLayout->addWidget(ledFilter, 4, 0); |
|
66 mainLayout->addWidget(chkFilterCaseSens, 5, 0); |
|
67 mainLayout->addWidget(toolWidget, 7, 0); |
|
68 |
54 } |
69 } |
55 |
70 |
56 void DlgSetting::on_btnOk_clicked() |
71 void DlgSetting::on_btnOk_clicked() |
57 { |
72 { |
58 if(chkShowoutput->checkState() == Qt::Checked) |
73 if(chkShowoutput->checkState() == Qt::Checked) |
59 { |
74 { |
60 setting->SetSetting("showoutput", "true"); |
75 setting->SetSetting(KShowOutput, "true"); |
61 } |
76 } |
62 else |
77 else |
63 { |
78 { |
64 setting->SetSetting("showoutput", "false"); |
79 setting->SetSetting(KShowOutput, "false"); |
65 } |
80 } |
|
81 setting->SetSetting(KFilter, ledFilter->text()); |
|
82 setting->SetSetting(KFilterCaseSens, (chkFilterCaseSens->checkState() == Qt::Checked) ? ("true") : ("false")); |
66 this->accept(); |
83 this->accept(); |
67 } |
84 } |
68 |
85 |
69 void DlgSetting::on_btnCancel_clicked() |
86 void DlgSetting::on_btnCancel_clicked() |
70 { |
87 { |
71 this->reject(); |
88 this->reject(); |
72 } |
89 } |
|
90 |
|
91 // End of File |