Improved options dialog

This commit is contained in:
Hugo Teso 2017-04-12 17:02:35 +02:00
parent 00f3c1baee
commit 5efc51d307
2 changed files with 64 additions and 45 deletions

View File

@ -277,7 +277,7 @@ QString OptionsDialog::analysisDescription(int level)
switch(level)
{
case 0:
return tr("Disabled");
return tr("-");
case 1:
return tr("Minimum");
case 2:
@ -293,14 +293,16 @@ QString OptionsDialog::analysisDescription(int level)
void OptionsDialog::on_analSlider_valueChanged(int value)
{
ui->analDescription->setText(tr("Analysis level") + QString(" - %1").arg(analysisDescription(value)));
ui->analDescription->setText(tr("Level") + QString(": %1").arg(analysisDescription(value)));
if (value == 0)
{
ui->analCheckBox->setChecked(false);
ui->analCheckBox->setText("Analysis: Disabled");
}
else
{
ui->analCheckBox->setChecked(true);
ui->analCheckBox->setText("Analysis: Enabled");
}
}

View File

@ -187,10 +187,44 @@
<property name="spacing">
<number>5</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>5</number>
</property>
<item>
<widget class="QCheckBox" name="analCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Analysis: Enabled</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="analDescription">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@ -202,33 +236,11 @@
</font>
</property>
<property name="text">
<string>Analysis level</string>
<string>Level: </string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>15</number>
</property>
<item>
<widget class="QCheckBox" name="analCheckBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string>Enabled</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</layout>
</item>
<item>
<widget class="QSlider" name="analSlider">
@ -263,7 +275,12 @@
</item>
</layout>
</item>
</layout>
<item>
<widget class="Line" name="line_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_7">