mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-12 20:55:39 +08:00
Also allow to set "only in error/warning" case from validation dialog
This commit is contained in:
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>600</width>
|
<width>700</width>
|
||||||
<height>550</height>
|
<height>575</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
|
|||||||
@@ -33,7 +33,11 @@ namespace BlackGui
|
|||||||
|
|
||||||
const CAircraftMatcherSetup setup = m_matchingSettings.get();
|
const CAircraftMatcherSetup setup = m_matchingSettings.get();
|
||||||
ui->cb_EnableStartupCheck->setChecked(setup.doVerificationAtStartup());
|
ui->cb_EnableStartupCheck->setChecked(setup.doVerificationAtStartup());
|
||||||
connect(ui->cb_EnableStartupCheck, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onCheckAtStartupChanged);
|
ui->cb_OnlyIfErrorsOrWarnings->setChecked(setup.onlyShowVerificationWarningsAndErrors());
|
||||||
|
|
||||||
|
connect(ui->cb_EnableStartupCheck, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onCheckAtStartupChanged);
|
||||||
|
connect(ui->cb_OnlyIfErrorsOrWarnings, &QCheckBox::toggled, this, &CAircraftModelValidationComponent::onOnlyErrorWarningChanged);
|
||||||
|
|
||||||
connect(ui->pb_TempDisableInvalid, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
connect(ui->pb_TempDisableInvalid, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
||||||
connect(ui->pb_TempDisableSelected, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
connect(ui->pb_TempDisableSelected, &QPushButton::released, this, &CAircraftModelValidationComponent::onButtonClicked);
|
||||||
connect(ui->pb_TriggerValidation, &QPushButton::released, this, &CAircraftModelValidationComponent::triggerValidation);
|
connect(ui->pb_TriggerValidation, &QPushButton::released, this, &CAircraftModelValidationComponent::triggerValidation);
|
||||||
@@ -118,6 +122,15 @@ namespace BlackGui
|
|||||||
Q_UNUSED(msg);
|
Q_UNUSED(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAircraftModelValidationComponent::onOnlyErrorWarningChanged(bool checked)
|
||||||
|
{
|
||||||
|
CAircraftMatcherSetup setup = m_matchingSettings.get();
|
||||||
|
if (setup.onlyShowVerificationWarningsAndErrors() == checked) { return; }
|
||||||
|
setup.setOnlyShowVerificationWarningsAndErrors(checked);
|
||||||
|
const CStatusMessage msg = m_matchingSettings.setAndSave(setup);
|
||||||
|
Q_UNUSED(msg);
|
||||||
|
}
|
||||||
|
|
||||||
void CAircraftModelValidationComponent::triggerValidation()
|
void CAircraftModelValidationComponent::triggerValidation()
|
||||||
{
|
{
|
||||||
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
if (!sGui || sGui->isShuttingDown() || !sGui->supportsContexts()) { return; }
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ namespace BlackGui
|
|||||||
//! Enable/disable startup check
|
//! Enable/disable startup check
|
||||||
void onCheckAtStartupChanged(bool checked);
|
void onCheckAtStartupChanged(bool checked);
|
||||||
|
|
||||||
|
//! Only show ieth warnings/errors
|
||||||
|
void onOnlyErrorWarningChanged(bool checked);
|
||||||
|
|
||||||
//! Trigger new validation
|
//! Trigger new validation
|
||||||
void triggerValidation();
|
void triggerValidation();
|
||||||
|
|
||||||
|
|||||||
@@ -65,10 +65,10 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QWidget" name="wi_Buttons" native="true">
|
<widget class="QWidget" name="wi_Buttons" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="4">
|
<item row="0" column="5">
|
||||||
<widget class="QPushButton" name="pb_TempDisableInvalid">
|
<widget class="QPushButton" name="pb_TempDisableSelected">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>temp.disable invalid</string>
|
<string>temp.disable selected</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -88,20 +88,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QCheckBox" name="cb_EnableStartupCheck">
|
|
||||||
<property name="text">
|
|
||||||
<string>check at startup</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="5">
|
|
||||||
<widget class="QPushButton" name="pb_TempDisableSelected">
|
|
||||||
<property name="text">
|
|
||||||
<string>temp.disable selected</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QPushButton" name="pb_TriggerValidation">
|
<widget class="QPushButton" name="pb_TriggerValidation">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -109,6 +95,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QPushButton" name="pb_TempDisableInvalid">
|
||||||
|
<property name="text">
|
||||||
|
<string>temp.disable invalid</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QPushButton" name="pb_help">
|
<widget class="QPushButton" name="pb_help">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -116,6 +109,20 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QCheckBox" name="cb_EnableStartupCheck">
|
||||||
|
<property name="text">
|
||||||
|
<string>check at startup</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="5">
|
||||||
|
<widget class="QCheckBox" name="cb_OnlyIfErrorsOrWarnings">
|
||||||
|
<property name="text">
|
||||||
|
<string>only if errors/warnings</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -143,11 +150,12 @@
|
|||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>tw_CAircraftModelValidationComponent</tabstop>
|
<tabstop>tw_CAircraftModelValidationComponent</tabstop>
|
||||||
<tabstop>tvp_InvalidModels</tabstop>
|
<tabstop>tvp_InvalidModels</tabstop>
|
||||||
<tabstop>cb_EnableStartupCheck</tabstop>
|
|
||||||
<tabstop>pb_help</tabstop>
|
<tabstop>pb_help</tabstop>
|
||||||
<tabstop>pb_TriggerValidation</tabstop>
|
<tabstop>pb_TriggerValidation</tabstop>
|
||||||
<tabstop>pb_TempDisableInvalid</tabstop>
|
<tabstop>pb_TempDisableInvalid</tabstop>
|
||||||
<tabstop>pb_TempDisableSelected</tabstop>
|
<tabstop>pb_TempDisableSelected</tabstop>
|
||||||
|
<tabstop>cb_EnableStartupCheck</tabstop>
|
||||||
|
<tabstop>cb_OnlyIfErrorsOrWarnings</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
|
|||||||
@@ -51,6 +51,13 @@ namespace BlackMisc
|
|||||||
this->setMatchingMode(m);
|
this->setMatchingMode(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAircraftMatcherSetup::setOnlyShowVerificationWarningsAndErrors(bool only)
|
||||||
|
{
|
||||||
|
MatchingMode m = this->getMatchingMode();
|
||||||
|
m.setFlag(ModelVerificationOnlyWarnError, only);
|
||||||
|
this->setMatchingMode(m);
|
||||||
|
}
|
||||||
|
|
||||||
QString CAircraftMatcherSetup::convertToQString(bool i18n) const
|
QString CAircraftMatcherSetup::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n);
|
||||||
|
|||||||
@@ -128,6 +128,9 @@ namespace BlackMisc
|
|||||||
//! Set startup verification
|
//! Set startup verification
|
||||||
void setVerificationAtStartup(bool verify);
|
void setVerificationAtStartup(bool verify);
|
||||||
|
|
||||||
|
//! Set the "show only errors" mode
|
||||||
|
void setOnlyShowVerificationWarningsAndErrors(bool only);
|
||||||
|
|
||||||
//! Matching mode as string
|
//! Matching mode as string
|
||||||
QString getMatchingModeAsString() const { return modeToString(this->getMatchingMode()); }
|
QString getMatchingModeAsString() const { return modeToString(this->getMatchingMode()); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user