mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Allow to filter by combined type
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
#include <QStringBuilder>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
|
|
||||||
using namespace BlackMisc::Aviation;
|
using namespace BlackMisc::Aviation;
|
||||||
@@ -28,11 +29,11 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
connect(ui->le_CombinedType, &QLineEdit::editingFinished, this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
|
connect(ui->le_CombinedType, &QLineEdit::editingFinished, this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
|
||||||
connect(ui->le_CombinedType, &QLineEdit::returnPressed, this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
|
connect(ui->le_CombinedType, &QLineEdit::returnPressed, this, &CAircraftCombinedTypeSelector::combinedTypeEntered);
|
||||||
|
|
||||||
connect(ui->cb_EngineCount, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
connect(ui->cb_EngineCount, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||||
connect(ui->cb_EngineType, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
connect(ui->cb_EngineType, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||||
connect(ui->cb_Type, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
connect(ui->cb_Type, &QComboBox::currentTextChanged, this, &CAircraftCombinedTypeSelector::changedComboBox);
|
||||||
|
|
||||||
ui->le_CombinedType->setValidator(new CUpperCaseValidator(this));
|
ui->le_CombinedType->setValidator(new CUpperCaseValidator(this));
|
||||||
}
|
}
|
||||||
@@ -43,19 +44,26 @@ namespace BlackGui
|
|||||||
void CAircraftCombinedTypeSelector::setCombinedType(const QString &combinedCode)
|
void CAircraftCombinedTypeSelector::setCombinedType(const QString &combinedCode)
|
||||||
{
|
{
|
||||||
QString engineCount, engineType, aircraftType;
|
QString engineCount, engineType, aircraftType;
|
||||||
QString cc(combinedCode.trimmed().toUpper().left(3));
|
const QString cc(combinedCode.trimmed().toUpper().left(3));
|
||||||
|
if (m_cc == cc) { return; }
|
||||||
|
m_cc = cc;
|
||||||
|
|
||||||
if (cc.length() > 0) { aircraftType = cc.left(1); }
|
if (cc.length() > 0) { aircraftType = cc.left(1); }
|
||||||
if (cc.length() > 1) { engineCount = cc.mid(1, 1); }
|
if (cc.length() > 1) { engineCount = cc.mid(1, 1); }
|
||||||
if (cc.length() > 2) { engineType = cc.mid(2, 1); }
|
if (cc.length() > 2) { engineType = cc.mid(2, 1); }
|
||||||
|
|
||||||
CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineCount, engineCount, "unspecified");
|
if (this->getCombinedTypeFromComboBoxes() != cc)
|
||||||
CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineType, engineType, "unspecified");
|
{
|
||||||
CGuiUtility::setComboBoxValueByStartingString(ui->cb_Type, aircraftType, "unspecified");
|
CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineCount, engineCount, "unspecified");
|
||||||
|
CGuiUtility::setComboBoxValueByStartingString(ui->cb_EngineType, engineType, "unspecified");
|
||||||
|
CGuiUtility::setComboBoxValueByStartingString(ui->cb_Type, aircraftType, "unspecified");
|
||||||
|
}
|
||||||
|
|
||||||
ui->le_CombinedType->setText(cc);
|
if (ui->le_CombinedType->text() != cc) { ui->le_CombinedType->setText(cc); }
|
||||||
|
emit this->changedCombinedType(cc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAircraftCombinedTypeSelector::setCombinedType(const BlackMisc::Aviation::CAircraftIcaoCode &icao)
|
void CAircraftCombinedTypeSelector::setCombinedType(const CAircraftIcaoCode &icao)
|
||||||
{
|
{
|
||||||
this->setCombinedType(icao.getCombinedType());
|
this->setCombinedType(icao.getCombinedType());
|
||||||
}
|
}
|
||||||
@@ -77,6 +85,7 @@ namespace BlackGui
|
|||||||
QString CAircraftCombinedTypeSelector::getCombinedType() const
|
QString CAircraftCombinedTypeSelector::getCombinedType() const
|
||||||
{
|
{
|
||||||
QString ct(ui->le_CombinedType->text().trimmed().toUpper());
|
QString ct(ui->le_CombinedType->text().trimmed().toUpper());
|
||||||
|
if (ct.isEmpty() || ct == QStringView(u"---")) { return {}; }
|
||||||
if (CAircraftIcaoCode::isValidCombinedType(ct)) { return ct; }
|
if (CAircraftIcaoCode::isValidCombinedType(ct)) { return ct; }
|
||||||
|
|
||||||
QString ct2(getCombinedTypeFromComboBoxes());
|
QString ct2(getCombinedTypeFromComboBoxes());
|
||||||
@@ -85,15 +94,17 @@ namespace BlackGui
|
|||||||
|
|
||||||
void CAircraftCombinedTypeSelector::combinedTypeEntered()
|
void CAircraftCombinedTypeSelector::combinedTypeEntered()
|
||||||
{
|
{
|
||||||
QString cc(ui->le_CombinedType->text().trimmed().toUpper());
|
const QString cc(ui->le_CombinedType->text().trimmed().toUpper() % u"---");
|
||||||
this->setCombinedType(cc);
|
this->setCombinedType(cc.left(3));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CAircraftCombinedTypeSelector::changedComboBox(const QString &text)
|
void CAircraftCombinedTypeSelector::changedComboBox(const QString &text)
|
||||||
{
|
{
|
||||||
Q_UNUSED(text);
|
Q_UNUSED(text);
|
||||||
QString ct(getCombinedTypeFromComboBoxes());
|
const QString ct(this->getCombinedTypeFromComboBoxes());
|
||||||
|
if (ui->le_CombinedType->text() == ct) { return; }
|
||||||
ui->le_CombinedType->setText(ct);
|
ui->le_CombinedType->setText(ct);
|
||||||
|
emit this->changedCombinedType(ct);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString CAircraftCombinedTypeSelector::getCombinedTypeFromComboBoxes() const
|
QString CAircraftCombinedTypeSelector::getCombinedTypeFromComboBoxes() const
|
||||||
|
|||||||
@@ -19,10 +19,8 @@
|
|||||||
#include <QScopedPointer>
|
#include <QScopedPointer>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
class QWidget;
|
|
||||||
|
|
||||||
namespace BlackMisc { namespace Aviation { class CAircraftIcaoCode; } }
|
|
||||||
namespace Ui { class CAircraftCombinedTypeSelector; }
|
namespace Ui { class CAircraftCombinedTypeSelector; }
|
||||||
|
namespace BlackMisc { namespace Aviation { class CAircraftIcaoCode; } }
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Components
|
namespace Components
|
||||||
@@ -39,7 +37,7 @@ namespace BlackGui
|
|||||||
explicit CAircraftCombinedTypeSelector(QWidget *parent = nullptr);
|
explicit CAircraftCombinedTypeSelector(QWidget *parent = nullptr);
|
||||||
|
|
||||||
//! Destructor
|
//! Destructor
|
||||||
virtual ~CAircraftCombinedTypeSelector();
|
virtual ~CAircraftCombinedTypeSelector() override;
|
||||||
|
|
||||||
//! Set comined code, e.g. L1P
|
//! Set comined code, e.g. L1P
|
||||||
void setCombinedType(const QString &combinedCode);
|
void setCombinedType(const QString &combinedCode);
|
||||||
@@ -56,6 +54,10 @@ namespace BlackGui
|
|||||||
//! Get the combined type, e.g. "L2P"
|
//! Get the combined type, e.g. "L2P"
|
||||||
QString getCombinedType() const;
|
QString getCombinedType() const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
//! Combined type has beend changed
|
||||||
|
void changedCombinedType(const QString &cominedType);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//! Code has been entered
|
//! Code has been entered
|
||||||
void combinedTypeEntered();
|
void combinedTypeEntered();
|
||||||
@@ -66,6 +68,7 @@ namespace BlackGui
|
|||||||
//! Combined type from comboboxes
|
//! Combined type from comboboxes
|
||||||
QString getCombinedTypeFromComboBoxes() const;
|
QString getCombinedTypeFromComboBoxes() const;
|
||||||
|
|
||||||
|
QString m_cc;
|
||||||
QScopedPointer<Ui::CAircraftCombinedTypeSelector> ui;
|
QScopedPointer<Ui::CAircraftCombinedTypeSelector> ui;
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace BlackGui
|
|||||||
mf = CAircraftModel::Exclude;
|
mf = CAircraftModel::Exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackMisc::Db::DbKeyStateFilter dbf = BlackMisc::Db::All;
|
DbKeyStateFilter dbf = BlackMisc::Db::All;
|
||||||
if (ui->cbt_Db->checkState() == Qt::Checked)
|
if (ui->cbt_Db->checkState() == Qt::Checked)
|
||||||
{
|
{
|
||||||
dbf = BlackMisc::Db::Valid;
|
dbf = BlackMisc::Db::Valid;
|
||||||
@@ -111,6 +111,7 @@ namespace BlackGui
|
|||||||
ui->le_AirlineName->text(),
|
ui->le_AirlineName->text(),
|
||||||
ui->le_LiveryCode->text(),
|
ui->le_LiveryCode->text(),
|
||||||
ui->le_FileName->text(),
|
ui->le_FileName->text(),
|
||||||
|
ui->comp_CombinedType->getCombinedType(),
|
||||||
ui->comp_SimulatorSelector->getValue(),
|
ui->comp_SimulatorSelector->getValue(),
|
||||||
ui->comp_DistributorSelector->getDistributor()
|
ui->comp_DistributorSelector->getDistributor()
|
||||||
);
|
);
|
||||||
@@ -133,6 +134,7 @@ namespace BlackGui
|
|||||||
ui->le_FileName->clear();
|
ui->le_FileName->clear();
|
||||||
ui->comp_SimulatorSelector->checkAll();
|
ui->comp_SimulatorSelector->checkAll();
|
||||||
ui->comp_DistributorSelector->clear();
|
ui->comp_DistributorSelector->clear();
|
||||||
|
ui->comp_CombinedType->clear();
|
||||||
ui->cbt_IncludeExclude->setCheckState(Qt::PartiallyChecked);
|
ui->cbt_IncludeExclude->setCheckState(Qt::PartiallyChecked);
|
||||||
ui->cbt_Db->setCheckState(Qt::PartiallyChecked);
|
ui->cbt_Db->setCheckState(Qt::PartiallyChecked);
|
||||||
ui->cbt_Military->setCheckState(Qt::PartiallyChecked);
|
ui->cbt_Military->setCheckState(Qt::PartiallyChecked);
|
||||||
@@ -151,6 +153,12 @@ namespace BlackGui
|
|||||||
this->triggerFilter();
|
this->triggerFilter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CAircraftModelFilterBar::onCombinedTypeChanged(const QString &combinedType)
|
||||||
|
{
|
||||||
|
Q_UNUSED(combinedType);
|
||||||
|
this->triggerFilter();
|
||||||
|
}
|
||||||
|
|
||||||
void CAircraftModelFilterBar::onCheckBoxChanged(bool state)
|
void CAircraftModelFilterBar::onCheckBoxChanged(bool state)
|
||||||
{
|
{
|
||||||
Q_UNUSED(state);
|
Q_UNUSED(state);
|
||||||
@@ -163,7 +171,7 @@ namespace BlackGui
|
|||||||
connect(ui->le_AircraftManufacturer, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_AircraftManufacturer, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_AirlineIcao, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_AirlineIcao, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_AirlineName, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_AirlineName, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_LiveryCode, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_LiveryCode, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_Id, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_Id, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_ModelDescription, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_ModelDescription, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
connect(ui->le_ModelString, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
connect(ui->le_ModelString, &QLineEdit::returnPressed, this, &CFilterWidget::triggerFilter);
|
||||||
@@ -174,8 +182,9 @@ namespace BlackGui
|
|||||||
connect(ui->cbt_Military, &QCheckBox::clicked, this, &CAircraftModelFilterBar::onCheckBoxChanged);
|
connect(ui->cbt_Military, &QCheckBox::clicked, this, &CAircraftModelFilterBar::onCheckBoxChanged);
|
||||||
connect(ui->cbt_ColorLiveries, &QCheckBox::clicked, this, &CAircraftModelFilterBar::onCheckBoxChanged);
|
connect(ui->cbt_ColorLiveries, &QCheckBox::clicked, this, &CAircraftModelFilterBar::onCheckBoxChanged);
|
||||||
|
|
||||||
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CAircraftModelFilterBar::onSimulatorSelectionChanged);
|
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CAircraftModelFilterBar::onSimulatorSelectionChanged);
|
||||||
connect(ui->comp_DistributorSelector, &CDbDistributorSelectorComponent::changedDistributor, this, &CAircraftModelFilterBar::onDistributorChanged);
|
connect(ui->comp_DistributorSelector, &CDbDistributorSelectorComponent::changedDistributor, this, &CAircraftModelFilterBar::onDistributorChanged);
|
||||||
|
connect(ui->comp_CombinedType, &CAircraftCombinedTypeSelector::changedCombinedType, this, &CAircraftModelFilterBar::onCombinedTypeChanged);
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ namespace BlackGui
|
|||||||
//! Distributor changed
|
//! Distributor changed
|
||||||
void onDistributorChanged(const BlackMisc::Simulation::CDistributor &distributor);
|
void onDistributorChanged(const BlackMisc::Simulation::CDistributor &distributor);
|
||||||
|
|
||||||
|
//! Combined type changed
|
||||||
|
void onCombinedTypeChanged(const QString &combinedType);
|
||||||
|
|
||||||
//! Checkbox has been changed
|
//! Checkbox has been changed
|
||||||
void onCheckBoxChanged(bool state);
|
void onCheckBoxChanged(bool state);
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>651</width>
|
<width>535</width>
|
||||||
<height>72</height>
|
<height>85</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -38,16 +38,10 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="5">
|
<item row="1" column="11">
|
||||||
<widget class="QCheckBox" name="cbt_IncludeExclude">
|
<widget class="QLineEdit" name="le_AirlineName">
|
||||||
<property name="toolTip">
|
<property name="placeholderText">
|
||||||
<string>Included/excluded models?</string>
|
<string>Airline name</string>
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Incl.</string>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -64,151 +58,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="9">
|
|
||||||
<widget class="QLabel" name="lbl_Distributor">
|
|
||||||
<property name="text">
|
|
||||||
<string>Distributor:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="4">
|
|
||||||
<widget class="QCheckBox" name="cbt_Military">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Military</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Mil.</string>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="7" colspan="2">
|
|
||||||
<widget class="QLineEdit" name="le_FileName">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>filename e.g. FSX/SimObjects/MyAircraft</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="6">
|
|
||||||
<widget class="QLabel" name="lbl_FileName">
|
|
||||||
<property name="text">
|
|
||||||
<string>File:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="10">
|
|
||||||
<widget class="QLineEdit" name="le_AircraftIcao">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>ICAO</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="7">
|
|
||||||
<widget class="QLineEdit" name="le_ModelString">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Key, i.e. model key</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="10">
|
|
||||||
<widget class="QLineEdit" name="le_AirlineIcao">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>50</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maxLength">
|
|
||||||
<number>4</number>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>ICAO</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="11">
|
|
||||||
<widget class="QLineEdit" name="le_AircraftManufacturer">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Manufacturer</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="6">
|
|
||||||
<widget class="QLabel" name="lbl_Model">
|
|
||||||
<property name="text">
|
|
||||||
<string>Model:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="11">
|
|
||||||
<widget class="QLineEdit" name="le_AirlineName">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Airline name</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="9">
|
|
||||||
<widget class="QLabel" name="lbl_Aircraft">
|
|
||||||
<property name="text">
|
|
||||||
<string>Aircraft:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QCheckBox" name="cbt_Db">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>DB data?</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>DB</string>
|
|
||||||
</property>
|
|
||||||
<property name="tristate">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="9">
|
|
||||||
<widget class="QLabel" name="lbl_Airline">
|
|
||||||
<property name="text">
|
|
||||||
<string>Airline:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="6">
|
|
||||||
<widget class="QLabel" name="lbl_Livery">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Livery:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="8">
|
|
||||||
<widget class="QLineEdit" name="le_ModelDescription">
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Description</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="7">
|
|
||||||
<widget class="QLineEdit" name="le_LiveryCode">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>Code</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0" colspan="4">
|
<item row="1" column="0" colspan="4">
|
||||||
<widget class="QWidget" name="wi_Id" native="true">
|
<widget class="QWidget" name="wi_Id" native="true">
|
||||||
<layout class="QHBoxLayout" name="hl_Id">
|
<layout class="QHBoxLayout" name="hl_Id">
|
||||||
@@ -231,7 +80,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="QLineEdit" name="le_Id">
|
<widget class="QLineEdit" name="le_Id">
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -260,13 +109,60 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="10" colspan="2">
|
<item row="2" column="6">
|
||||||
<widget class="BlackGui::Components::CDbDistributorSelectorComponent" name="comp_DistributorSelector">
|
<widget class="QLabel" name="lbl_FileName">
|
||||||
<property name="frameShape">
|
<property name="text">
|
||||||
<enum>QFrame::StyledPanel</enum>
|
<string>File:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="frameShadow">
|
</widget>
|
||||||
<enum>QFrame::Raised</enum>
|
</item>
|
||||||
|
<item row="2" column="7" colspan="2">
|
||||||
|
<widget class="QLineEdit" name="le_FileName">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>filename e.g. FSX/SimObjects/MyAircraft</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="7">
|
||||||
|
<widget class="QLineEdit" name="le_ModelString">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Key, i.e. model key</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="10">
|
||||||
|
<widget class="QLineEdit" name="le_AircraftIcao">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>ICAO</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="11">
|
||||||
|
<widget class="QLineEdit" name="le_AircraftManufacturer">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Manufacturer</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="10">
|
||||||
|
<widget class="QLineEdit" name="le_AirlineIcao">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maxLength">
|
||||||
|
<number>4</number>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>ICAO</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -280,8 +176,136 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="5">
|
<item row="2" column="9">
|
||||||
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector"/>
|
<widget class="QLabel" name="lbl_Distributor">
|
||||||
|
<property name="text">
|
||||||
|
<string>Distributor:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="9">
|
||||||
|
<widget class="QLabel" name="lbl_Aircraft">
|
||||||
|
<property name="text">
|
||||||
|
<string>Aircraft:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="10" colspan="2">
|
||||||
|
<widget class="BlackGui::Components::CDbDistributorSelectorComponent" name="comp_DistributorSelector">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="6">
|
||||||
|
<widget class="QLabel" name="lbl_Model">
|
||||||
|
<property name="text">
|
||||||
|
<string>Model:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="4">
|
||||||
|
<widget class="QCheckBox" name="cbt_Military">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Military</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Mil.</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="7">
|
||||||
|
<widget class="QLineEdit" name="le_LiveryCode">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Code</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QCheckBox" name="cbt_Db">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>DB data?</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>DB</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<widget class="QCheckBox" name="cbt_IncludeExclude">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Included/excluded models?</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Incl.</string>
|
||||||
|
</property>
|
||||||
|
<property name="tristate">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="8">
|
||||||
|
<widget class="QLineEdit" name="le_ModelDescription">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>Description</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="9">
|
||||||
|
<widget class="QLabel" name="lbl_Airline">
|
||||||
|
<property name="text">
|
||||||
|
<string>Airline:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="6">
|
||||||
|
<widget class="QLabel" name="lbl_Livery">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Livery:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="6" alignment="Qt::AlignLeft">
|
||||||
|
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>125</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="6">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Combined:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="7" colspan="2">
|
||||||
|
<widget class="BlackGui::Components::CAircraftCombinedTypeSelector" name="comp_CombinedType">
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::StyledPanel</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShadow">
|
||||||
|
<enum>QFrame::Raised</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@@ -304,6 +328,12 @@
|
|||||||
<header>blackgui/components/dbdistributorselectorcomponent.h</header>
|
<header>blackgui/components/dbdistributorselectorcomponent.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>BlackGui::Components::CAircraftCombinedTypeSelector</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header>blackgui/components/aircraftcombinedtypeselector.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>cbt_Db</tabstop>
|
<tabstop>cbt_Db</tabstop>
|
||||||
@@ -312,6 +342,7 @@
|
|||||||
<tabstop>le_ModelDescription</tabstop>
|
<tabstop>le_ModelDescription</tabstop>
|
||||||
<tabstop>le_AircraftIcao</tabstop>
|
<tabstop>le_AircraftIcao</tabstop>
|
||||||
<tabstop>le_AircraftManufacturer</tabstop>
|
<tabstop>le_AircraftManufacturer</tabstop>
|
||||||
|
<tabstop>le_Id</tabstop>
|
||||||
<tabstop>cbt_Military</tabstop>
|
<tabstop>cbt_Military</tabstop>
|
||||||
<tabstop>le_LiveryCode</tabstop>
|
<tabstop>le_LiveryCode</tabstop>
|
||||||
<tabstop>cbt_ColorLiveries</tabstop>
|
<tabstop>cbt_ColorLiveries</tabstop>
|
||||||
|
|||||||
@@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>336</width>
|
<width>400</width>
|
||||||
<height>95</height>
|
<height>150</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|||||||
@@ -22,8 +22,9 @@ namespace BlackGui
|
|||||||
CAircraftModel::ModelModeFilter modelMode, BlackMisc::Db::DbKeyStateFilter dbKeyFilter,
|
CAircraftModel::ModelModeFilter modelMode, BlackMisc::Db::DbKeyStateFilter dbKeyFilter,
|
||||||
Qt::CheckState military, Qt::CheckState colorLiveries,
|
Qt::CheckState military, Qt::CheckState colorLiveries,
|
||||||
const QString &aircraftIcao, const QString &aircraftManufacturer,
|
const QString &aircraftIcao, const QString &aircraftManufacturer,
|
||||||
const QString &airlineIcao, const QString &airlineName,
|
const QString &airlineIcao, const QString &airlineName,
|
||||||
const QString &liveryCode, const QString &fileName,
|
const QString &liveryCode, const QString &fileName,
|
||||||
|
const QString &combinedType,
|
||||||
const CSimulatorInfo &simInfo,
|
const CSimulatorInfo &simInfo,
|
||||||
const CDistributor &distributor) :
|
const CDistributor &distributor) :
|
||||||
m_id(id),
|
m_id(id),
|
||||||
@@ -33,13 +34,14 @@ namespace BlackGui
|
|||||||
m_airlineIcao(airlineIcao.trimmed().toUpper()), m_airlineName(airlineName.trimmed().toUpper()),
|
m_airlineIcao(airlineIcao.trimmed().toUpper()), m_airlineName(airlineName.trimmed().toUpper()),
|
||||||
m_liveryCode(liveryCode.trimmed().toUpper()),
|
m_liveryCode(liveryCode.trimmed().toUpper()),
|
||||||
m_fileName(fileName),
|
m_fileName(fileName),
|
||||||
|
m_combinedType(combinedType),
|
||||||
m_simulatorInfo(simInfo),
|
m_simulatorInfo(simInfo),
|
||||||
m_distributor(distributor)
|
m_distributor(distributor)
|
||||||
{
|
{
|
||||||
m_valid = valid();
|
m_valid = this->valid();
|
||||||
}
|
}
|
||||||
|
|
||||||
BlackMisc::Simulation::CAircraftModelList CAircraftModelFilter::filter(const CAircraftModelList &inContainer) const
|
CAircraftModelList CAircraftModelFilter::filter(const CAircraftModelList &inContainer) const
|
||||||
{
|
{
|
||||||
if (!this->isEnabled()) { return inContainer; }
|
if (!this->isEnabled()) { return inContainer; }
|
||||||
CAircraftModelList outContainer;
|
CAircraftModelList outContainer;
|
||||||
@@ -58,90 +60,95 @@ namespace BlackGui
|
|||||||
|
|
||||||
if (!m_simulatorInfo.isAllSimulators())
|
if (!m_simulatorInfo.isAllSimulators())
|
||||||
{
|
{
|
||||||
if (!this->m_simulatorInfo.matchesAny(model.getSimulator())) { continue; }
|
if (!m_simulatorInfo.matchesAny(model.getSimulator())) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_modelKey.isEmpty())
|
if (!m_modelKey.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getModelString(), this->m_modelKey)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getModelString(), m_modelKey)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_military != Qt::PartiallyChecked)
|
if (m_military != Qt::PartiallyChecked)
|
||||||
{
|
{
|
||||||
if (this->m_military == Qt::Checked)
|
if (m_military == Qt::Checked)
|
||||||
{
|
{
|
||||||
// military only
|
// military only
|
||||||
if (!model.isMilitary()) { continue; }
|
if (!model.isMilitary()) { continue; }
|
||||||
}
|
}
|
||||||
else if (this->m_military == Qt::Unchecked)
|
else if (m_military == Qt::Unchecked)
|
||||||
{
|
{
|
||||||
// civilian only
|
// civilian only
|
||||||
if (model.isMilitary()) { continue; }
|
if (model.isMilitary()) { continue; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_colorLiveries != Qt::PartiallyChecked)
|
if (m_colorLiveries != Qt::PartiallyChecked)
|
||||||
{
|
{
|
||||||
if (this->m_colorLiveries == Qt::Checked)
|
if (m_colorLiveries == Qt::Checked)
|
||||||
{
|
{
|
||||||
// only color liveries
|
// only color liveries
|
||||||
if (!model.getLivery().isColorLivery()) { continue; }
|
if (!model.getLivery().isColorLivery()) { continue; }
|
||||||
}
|
}
|
||||||
else if (this->m_colorLiveries == Qt::Unchecked)
|
else if (m_colorLiveries == Qt::Unchecked)
|
||||||
{
|
{
|
||||||
// Only airline liveries
|
// Only airline liveries
|
||||||
if (model.getLivery().isColorLivery()) { continue; }
|
if (model.getLivery().isColorLivery()) { continue; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_description.isEmpty())
|
if (!m_description.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getDescription(), this->m_description)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getDescription(), m_description)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_modelMode != CAircraftModel::All && this->m_modelMode != CAircraftModel::Undefined)
|
if (m_modelMode != CAircraftModel::All && m_modelMode != CAircraftModel::Undefined)
|
||||||
{
|
{
|
||||||
if (!model.matchesMode(this->m_modelMode)) { continue; }
|
if (!model.matchesMode(m_modelMode)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_dbKeyFilter != BlackMisc::Db::All && this->m_dbKeyFilter != BlackMisc::Db::Undefined)
|
if (m_dbKeyFilter != BlackMisc::Db::All && m_dbKeyFilter != BlackMisc::Db::Undefined)
|
||||||
{
|
{
|
||||||
if (!model.matchesDbKeyState(this->m_dbKeyFilter)) { continue; }
|
if (!model.matchesDbKeyState(m_dbKeyFilter)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_fileName.isEmpty())
|
if (!m_fileName.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getFileName(), this->m_fileName)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getFileName(), m_fileName)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_aircraftIcao.isEmpty())
|
if (!m_aircraftIcao.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getAircraftIcaoCodeDesignator(), this->m_aircraftIcao)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getAircraftIcaoCodeDesignator(), m_aircraftIcao)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_aircraftManufacturer.isEmpty())
|
if (!m_aircraftManufacturer.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getAircraftIcaoCode().getManufacturer(), this->m_aircraftManufacturer)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getAircraftIcaoCode().getManufacturer(), m_aircraftManufacturer)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_airlineIcao.isEmpty())
|
if (!m_airlineIcao.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getAirlineIcaoCodeDesignator(), this->m_airlineIcao)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getAirlineIcaoCodeDesignator(), m_airlineIcao)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_airlineName.isEmpty())
|
if (!m_airlineName.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getAirlineIcaoCode().getName(), this->m_airlineName)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getAirlineIcaoCode().getName(), m_airlineName)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this->m_liveryCode.isEmpty())
|
if (!m_liveryCode.isEmpty())
|
||||||
{
|
{
|
||||||
if (!this->stringMatchesFilterExpression(model.getLivery().getCombinedCode(), this->m_liveryCode)) { continue; }
|
if (!this->stringMatchesFilterExpression(model.getLivery().getCombinedCode(), m_liveryCode)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_distributor.hasValidDbKey())
|
if (m_distributor.hasValidDbKey())
|
||||||
{
|
{
|
||||||
if (!model.getDistributor().matchesKeyOrAlias(this->m_distributor)) { continue; }
|
if (!model.getDistributor().matchesKeyOrAlias(m_distributor)) { continue; }
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_combinedType.isEmpty())
|
||||||
|
{
|
||||||
|
if (!model.getAircraftIcaoCode().matchesCombinedType(m_combinedType)) { continue; }
|
||||||
}
|
}
|
||||||
|
|
||||||
outContainer.push_back(model);
|
outContainer.push_back(model);
|
||||||
@@ -153,17 +160,17 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
const bool allEmpty =
|
const bool allEmpty =
|
||||||
m_id < 0 &&
|
m_id < 0 &&
|
||||||
this->m_modelKey.isEmpty() && this->m_description.isEmpty() &&
|
m_modelKey.isEmpty() && m_description.isEmpty() &&
|
||||||
this->m_aircraftManufacturer.isEmpty() && this->m_aircraftIcao.isEmpty() &&
|
m_aircraftManufacturer.isEmpty() && m_aircraftIcao.isEmpty() &&
|
||||||
this->m_airlineIcao.isEmpty() && this->m_airlineName.isEmpty() &&
|
m_airlineIcao.isEmpty() && m_airlineName.isEmpty() &&
|
||||||
this->m_liveryCode.isEmpty() && this->m_fileName.isEmpty();
|
m_liveryCode.isEmpty() && m_fileName.isEmpty() && m_combinedType.isEmpty();
|
||||||
if (!allEmpty) { return true; }
|
if (!allEmpty) { return true; }
|
||||||
const bool noSim = this->m_simulatorInfo.isNoSimulator() || this->m_simulatorInfo.isAllSimulators();
|
const bool noSim = m_simulatorInfo.isNoSimulator() || m_simulatorInfo.isAllSimulators();
|
||||||
const bool noModelMode = this->m_modelMode == CAircraftModel::Undefined || this->m_modelMode == CAircraftModel::All;
|
const bool noModelMode = (m_modelMode == CAircraftModel::Undefined || m_modelMode == CAircraftModel::All);
|
||||||
const bool noDbState = this->m_dbKeyFilter == BlackMisc::Db::Undefined || this->m_dbKeyFilter == BlackMisc::Db::All;
|
const bool noDbState = (m_dbKeyFilter == BlackMisc::Db::Undefined || m_dbKeyFilter == BlackMisc::Db::All);
|
||||||
const bool noKey = !this->m_distributor.hasValidDbKey();
|
const bool noKey = !m_distributor.hasValidDbKey();
|
||||||
const bool noColorRestriction = this->m_colorLiveries == Qt::PartiallyChecked;
|
const bool noColorRestriction = (m_colorLiveries == Qt::PartiallyChecked);
|
||||||
const bool noMilitary = this->m_military == Qt::PartiallyChecked;
|
const bool noMilitary = (m_military == Qt::PartiallyChecked);
|
||||||
return !(noSim && noModelMode && noDbState && noKey && noMilitary && noColorRestriction);
|
return !(noSim && noModelMode && noDbState && noKey && noMilitary && noColorRestriction);
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -30,19 +30,18 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CAircraftModelFilter(
|
CAircraftModelFilter(int id,
|
||||||
int id,
|
const QString &modelKey, const QString &description,
|
||||||
const QString &modelKey, const QString &description,
|
BlackMisc::Simulation::CAircraftModel::ModelModeFilter modelMode,
|
||||||
BlackMisc::Simulation::CAircraftModel::ModelModeFilter modelMode,
|
BlackMisc::Db::DbKeyStateFilter dbKeyFilter,
|
||||||
BlackMisc::Db::DbKeyStateFilter dbKeyFilter,
|
Qt::CheckState military, Qt::CheckState colorLiveries,
|
||||||
Qt::CheckState military, Qt::CheckState colorLiveries,
|
const QString &aircraftIcao, const QString &aircraftManufacturer,
|
||||||
const QString &aircraftIcao, const QString &aircraftManufacturer,
|
const QString &airlineIcao, const QString &airlineName,
|
||||||
const QString &airlineIcao, const QString &airlineName,
|
const QString &liveryCode,
|
||||||
const QString &liveryCode,
|
const QString &fileName,
|
||||||
const QString &fileName,
|
const QString &combinedType,
|
||||||
const BlackMisc::Simulation::CSimulatorInfo &simInfo = BlackMisc::Simulation::CSimulatorInfo::allSimulators(),
|
const BlackMisc::Simulation::CSimulatorInfo &simInfo = BlackMisc::Simulation::CSimulatorInfo::allSimulators(),
|
||||||
const BlackMisc::Simulation::CDistributor &distributor = BlackMisc::Simulation::CDistributor()
|
const BlackMisc::Simulation::CDistributor &distributor = BlackMisc::Simulation::CDistributor());
|
||||||
);
|
|
||||||
|
|
||||||
//! \copydoc IModelFilter::filter
|
//! \copydoc IModelFilter::filter
|
||||||
virtual BlackMisc::Simulation::CAircraftModelList filter(const BlackMisc::Simulation::CAircraftModelList &inContainer) const override;
|
virtual BlackMisc::Simulation::CAircraftModelList filter(const BlackMisc::Simulation::CAircraftModelList &inContainer) const override;
|
||||||
@@ -61,6 +60,7 @@ namespace BlackGui
|
|||||||
QString m_airlineName;
|
QString m_airlineName;
|
||||||
QString m_liveryCode;
|
QString m_liveryCode;
|
||||||
QString m_fileName;
|
QString m_fileName;
|
||||||
|
QString m_combinedType;
|
||||||
BlackMisc::Simulation::CSimulatorInfo m_simulatorInfo;
|
BlackMisc::Simulation::CSimulatorInfo m_simulatorInfo;
|
||||||
BlackMisc::Simulation::CDistributor m_distributor;
|
BlackMisc::Simulation::CDistributor m_distributor;
|
||||||
bool valid() const;
|
bool valid() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user