mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
Ref T430, FG support in distributor list preferences
This commit is contained in:
@@ -22,10 +22,11 @@ namespace BlackMisc
|
|||||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
||||||
switch (simulator.getSimulator())
|
switch (simulator.getSimulator())
|
||||||
{
|
{
|
||||||
case CSimulatorInfo::FSX: return this->m_distributorsFsx;
|
case CSimulatorInfo::FSX: return m_distributorsFsx;
|
||||||
case CSimulatorInfo::P3D: return this->m_distributorsP3d;
|
case CSimulatorInfo::P3D: return m_distributorsP3d;
|
||||||
case CSimulatorInfo::FS9: return this->m_distributorsFs9;
|
case CSimulatorInfo::FS9: return m_distributorsFs9;
|
||||||
case CSimulatorInfo::XPLANE: return this->m_distributorsXPlane;
|
case CSimulatorInfo::FG: return m_distributorsFG;
|
||||||
|
case CSimulatorInfo::XPLANE: return m_distributorsXPlane;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong simulator");
|
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong simulator");
|
||||||
break;
|
break;
|
||||||
@@ -40,14 +41,15 @@ namespace BlackMisc
|
|||||||
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
Q_ASSERT_X(simulator.isSingleSimulator(), Q_FUNC_INFO, "Need single simulator");
|
||||||
CDistributorList d(distributors);
|
CDistributorList d(distributors);
|
||||||
d.sortAscendingByOrder(); // make sure we are sorted by order
|
d.sortAscendingByOrder(); // make sure we are sorted by order
|
||||||
this->m_lastUpdatedSimulator = simulator;
|
m_lastUpdatedSimulator = simulator;
|
||||||
|
|
||||||
switch (simulator.getSimulator())
|
switch (simulator.getSimulator())
|
||||||
{
|
{
|
||||||
case CSimulatorInfo::FSX: this->m_distributorsFsx = d; break;
|
case CSimulatorInfo::FSX: m_distributorsFsx = d; break;
|
||||||
case CSimulatorInfo::P3D: this->m_distributorsP3d = d; break;
|
case CSimulatorInfo::P3D: m_distributorsP3d = d; break;
|
||||||
case CSimulatorInfo::FS9: this->m_distributorsFs9 = d; break;
|
case CSimulatorInfo::FS9: m_distributorsFs9 = d; break;
|
||||||
case CSimulatorInfo::XPLANE: this->m_distributorsXPlane = d; break;
|
case CSimulatorInfo::FG: m_distributorsFG = d; break;
|
||||||
|
case CSimulatorInfo::XPLANE: m_distributorsXPlane = d; break;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong simulator");
|
Q_ASSERT_X(false, Q_FUNC_INFO, "Wrong simulator");
|
||||||
break;
|
break;
|
||||||
@@ -57,8 +59,8 @@ namespace BlackMisc
|
|||||||
QString CDistributorListPreferences::convertToQString(bool i18n) const
|
QString CDistributorListPreferences::convertToQString(bool i18n) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(i18n);
|
Q_UNUSED(i18n);
|
||||||
static const QString p("Preferences FSX %1, P3D %2, FS9 %3, XP %4");
|
static const QString p("Preferences FSX %1, P3D %2, FS9 %3, XP %4 FG %5");
|
||||||
return p.arg(this->m_distributorsFsx.size()).arg(this->m_distributorsP3d.size()).arg(this->m_distributorsFs9.size()).arg(this->m_distributorsXPlane.size());
|
return p.arg(m_distributorsFsx.size()).arg(m_distributorsP3d.size()).arg(m_distributorsFs9.size()).arg(m_distributorsXPlane.size()).arg(m_distributorsFG.size());
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ namespace BlackMisc
|
|||||||
CDistributorList m_distributorsP3d;
|
CDistributorList m_distributorsP3d;
|
||||||
CDistributorList m_distributorsFs9;
|
CDistributorList m_distributorsFs9;
|
||||||
CDistributorList m_distributorsXPlane;
|
CDistributorList m_distributorsXPlane;
|
||||||
|
CDistributorList m_distributorsFG;
|
||||||
CSimulatorInfo m_lastUpdatedSimulator;
|
CSimulatorInfo m_lastUpdatedSimulator;
|
||||||
|
|
||||||
BLACK_METACLASS(
|
BLACK_METACLASS(
|
||||||
@@ -62,6 +63,7 @@ namespace BlackMisc
|
|||||||
BLACK_METAMEMBER(distributorsP3d),
|
BLACK_METAMEMBER(distributorsP3d),
|
||||||
BLACK_METAMEMBER(distributorsFs9),
|
BLACK_METAMEMBER(distributorsFs9),
|
||||||
BLACK_METAMEMBER(distributorsXPlane),
|
BLACK_METAMEMBER(distributorsXPlane),
|
||||||
|
BLACK_METAMEMBER(distributorsFG),
|
||||||
BLACK_METAMEMBER(lastUpdatedSimulator)
|
BLACK_METAMEMBER(lastUpdatedSimulator)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user