mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Ref T280, QHash for aircraft and models and some minor improvements
* CValueObject::comparePropertyByIndex * bool "true" if value has been changed
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <Qt>
|
||||
#include <QHash>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -353,10 +354,15 @@ namespace BlackMisc
|
||||
//! \remark checking for some criteria in the given model
|
||||
QString extCoverageSummary(const CAircraftModel &checkModel, const QString &separator = "\n") const;
|
||||
};
|
||||
|
||||
//! Model per callsign
|
||||
using CAircraftModelPerCallsign = QHash<Aviation::CCallsign, CAircraftModel>;
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Simulation::CAircraftModelList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Simulation::CAircraftModelPerCallsign)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Simulation::CAircraftModel>)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Simulation::CAircraftModel>)
|
||||
|
||||
|
||||
@@ -117,6 +117,20 @@ namespace BlackMisc
|
||||
return m_enabled;
|
||||
}
|
||||
|
||||
bool CSimulatedAircraft::setFastPositionUpdates(bool useFastPositions)
|
||||
{
|
||||
if (m_fastPositionUpdates == useFastPositions) { return false; }
|
||||
m_fastPositionUpdates = useFastPositions;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSimulatedAircraft::setRendered(bool rendered)
|
||||
{
|
||||
if (m_rendered == rendered) { return false; }
|
||||
m_rendered = rendered;
|
||||
return true;
|
||||
}
|
||||
|
||||
const QString &CSimulatedAircraft::getAircraftIcaoCodeDesignator() const
|
||||
{
|
||||
return getAircraftIcaoCode().getDesignator();
|
||||
|
||||
@@ -409,10 +409,10 @@ namespace BlackMisc
|
||||
bool fastPositionUpdates() const {return m_fastPositionUpdates;}
|
||||
|
||||
//! Support fast position updates
|
||||
void setFastPositionUpdates(bool useFastPositions) { m_fastPositionUpdates = useFastPositions; }
|
||||
bool setFastPositionUpdates(bool useFastPositions);
|
||||
|
||||
//! Rendered?
|
||||
void setRendered(bool rendered) { m_rendered = rendered; }
|
||||
bool setRendered(bool rendered);
|
||||
|
||||
//! Have parts been synchronized with a remote client?
|
||||
bool isPartsSynchronized() const { return m_partsSynchronized; }
|
||||
|
||||
@@ -117,10 +117,15 @@ namespace BlackMisc
|
||||
//! Number of aircraft with parts
|
||||
int countAircraftPartsSynchronized() const;
|
||||
};
|
||||
|
||||
//! Aircraft per callsign
|
||||
using CSimulatedAircraftPerCallsign = QHash<Aviation::CCallsign, CSimulatedAircraft>;
|
||||
|
||||
} //namespace
|
||||
} // namespace
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Simulation::CSimulatedAircraftList)
|
||||
Q_DECLARE_METATYPE(BlackMisc::Simulation::CSimulatedAircraftPerCallsign)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CCollection<BlackMisc::Simulation::CSimulatedAircraft>)
|
||||
Q_DECLARE_METATYPE(BlackMisc::CSequence<BlackMisc::Simulation::CSimulatedAircraft>)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user