mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 23:35:40 +08:00
Bug fixes and improvements for PropertyIndex discovered during refs #319, mainly contributing to refs #314
* Start index 10 instead 0 for CValueObject (easier to detect bugs) * Fixed wrong indexes * Asserts in CPropertyIndex * Used Icon instead of QPixpmap with indexes, icons are sortable and have a tooltip * Removed redundant toQVariant methods
This commit is contained in:
@@ -29,6 +29,22 @@ namespace BlackMisc
|
||||
class CAircraftSituation : public BlackMisc::CValueObject, public BlackMisc::Geo::ICoordinateGeodetic
|
||||
{
|
||||
public:
|
||||
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexPosition = BlackMisc::CPropertyIndex::GlobalIndexCAircraftSituation,
|
||||
IndexLatitude,
|
||||
IndexLongitude,
|
||||
IndexAltitude,
|
||||
IndexHeading,
|
||||
IndexBank,
|
||||
IndexPitch,
|
||||
IndexGroundspeed,
|
||||
IndexTimeStamp,
|
||||
IndexTimeStampFormatted
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
CAircraftSituation() : m_timestamp(QDateTime::currentDateTimeUtc()) {}
|
||||
|
||||
@@ -41,21 +57,6 @@ namespace BlackMisc
|
||||
: m_position(position), m_altitude(altitude), m_heading(heading), m_pitch(pitch),
|
||||
m_bank(bank), m_groundspeed(gs), m_timestamp(QDateTime::currentDateTimeUtc()) {}
|
||||
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexPosition,
|
||||
IndexLatitude,
|
||||
IndexLongitude,
|
||||
IndexAltitude,
|
||||
IndexHeading,
|
||||
IndexBank,
|
||||
IndexPitch,
|
||||
IndexGroundspeed,
|
||||
IndexTimeStamp,
|
||||
IndexTimeStampFormatted
|
||||
};
|
||||
|
||||
//! \copydoc CValueObject::propertyByIndex(index)
|
||||
virtual QVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user