Setting to display validation only in case of warnings/errors

This commit is contained in:
Klaus Basan
2019-05-07 02:32:14 +02:00
parent 2139fc2a5f
commit 7ac0450836
4 changed files with 31 additions and 9 deletions

View File

@@ -24,11 +24,11 @@ namespace BlackGui
ui(new Ui::CMatchingForm)
{
ui->setupUi(this);
connect(ui->rb_Reduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
connect(ui->rb_Reduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
connect(ui->rb_ScoreAndReduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
connect(ui->rb_ScoreOnly, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
connect(ui->pb_ResetAlgorithm, &QPushButton::released, this, &CMatchingForm::resetByAlgorithm, Qt::QueuedConnection);
connect(ui->pb_ResetAll, &QPushButton::released, this, &CMatchingForm::resetAll, Qt::QueuedConnection);
connect(ui->rb_ScoreOnly, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
connect(ui->pb_ResetAlgorithm, &QPushButton::released, this, &CMatchingForm::resetByAlgorithm, Qt::QueuedConnection);
connect(ui->pb_ResetAll, &QPushButton::released, this, &CMatchingForm::resetAll, Qt::QueuedConnection);
}
CMatchingForm::~CMatchingForm()
@@ -48,6 +48,7 @@ namespace BlackGui
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetRemoveFailed, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_ModelFailedFailover, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetVerification, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_ModelSetVerificationOnlyErrorWarning, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_CategoryGlider, readonly);
CGuiUtility::checkBoxReadOnly(ui->cb_CategoryMilitaryAircraft, readonly);
@@ -89,6 +90,7 @@ namespace BlackGui
ui->cb_ModelSetRemoveFailed->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelSetRemoveFailedModel) || mode.testFlag(CAircraftMatcherSetup::ModelFailoverIfNoModelCanBeAdded));
ui->cb_ModelFailedFailover->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelFailoverIfNoModelCanBeAdded));
ui->cb_ModelSetVerification->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelVerificationAtStartup));
ui->cb_ModelSetVerificationOnlyErrorWarning->setChecked(mode.testFlag(CAircraftMatcherSetup::ModelVerificationOnlyWarnError));
this->setMatchingAlgorithm(setup);
this->setPickStrategy(setup);
@@ -138,7 +140,8 @@ namespace BlackGui
ui->cb_CategoryMilitaryAircraft->isChecked(),
ui->cb_ScoreIgnoreZeros->isChecked(), ui->cb_ScorePreferColorLiveries->isChecked(),
ui->cb_ExclNoDbData->isChecked(), ui->cb_ExclNoExcludedModels->isChecked(),
ui->cb_ModelSetVerification->isChecked(), ui->cb_ModelSetRemoveFailed->isChecked(),
ui->cb_ModelSetVerification->isChecked(), ui->cb_ModelSetVerificationOnlyErrorWarning->isChecked(),
ui->cb_ModelSetRemoveFailed->isChecked(),
ui->cb_ModelFailedFailover->isChecked()
);
}

View File

@@ -247,6 +247,13 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="cb_ModelSetVerificationOnlyErrorWarning">
<property name="text">
<string>dialog only if wanrings/error</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -305,7 +312,6 @@
</layout>
</widget>
<tabstops>
<tabstop>rb_Reduction</tabstop>
<tabstop>rb_ScoreOnly</tabstop>
<tabstop>rb_ScoreAndReduction</tabstop>
<tabstop>pb_ResetAlgorithm</tabstop>
@@ -324,12 +330,15 @@
<tabstop>cb_CategoryGlider</tabstop>
<tabstop>cb_CategoryMilitaryAircraft</tabstop>
<tabstop>cb_ModelSetVerification</tabstop>
<tabstop>cb_ModelSetVerificationOnlyErrorWarning</tabstop>
<tabstop>cb_ModelSetRemoveFailed</tabstop>
<tabstop>cb_ModelFailedFailover</tabstop>
<tabstop>cb_ExclNoExcludedModels</tabstop>
<tabstop>cb_ExclNoDbData</tabstop>
<tabstop>cb_ScorePreferColorLiveries</tabstop>
<tabstop>cb_ScoreIgnoreZeros</tabstop>
<tabstop>pb_ResetAll</tabstop>
<tabstop>rb_Reduction</tabstop>
</tabstops>
<resources/>
<connections/>