refs #369, adjusted aircraft parts/lights and list to new style

* support of property index
* used support classes BlackMisc::ITimestampBased, ITimestampObjectList and ICallsignObjectList
* fixed some issues in related aircraft situation class in same step
This commit is contained in:
Klaus Basan
2015-02-06 21:25:19 +01:00
parent 466a9a24ef
commit ee3417ff8b
14 changed files with 361 additions and 116 deletions

View File

@@ -13,6 +13,7 @@
#define BLACKMISC_AIRCRAFTLIGHTS_H
#include "blackmisc/valueobject.h"
#include "blackmisc/propertyindex.h"
namespace BlackMisc
{
@@ -22,6 +23,17 @@ namespace BlackMisc
class CAircraftLights : public CValueObjectStdTuple<CAircraftLights>
{
public:
//! Properties by index
enum ColumnIndex
{
IndexStrobe = BlackMisc::CPropertyIndex::GlobalIndexCAircraftLights,
IndexLanding,
IndexTaxi,
IndexBeacon,
IndexNav,
IndexLogo
};
//! Default constructor
CAircraftLights() = default;
@@ -29,6 +41,12 @@ namespace BlackMisc
//! Constructor
CAircraftLights(bool strobeOn, bool landingOn, bool taxiOn, bool beaconOn, bool navOn, bool logoOn);
//! \copydoc CValueObject::propertyByIndex
virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const override;
//! \copydoc CValueObject::setPropertyByIndex
virtual void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index) override;
//! Strobes lights on?
bool isStrobeOn() const { return m_strobeOn; }
@@ -99,4 +117,4 @@ BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAircraftLights, (
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAircraftLights)
#endif // BLACKMISC_AIRCRAFTLIGHTS_H
#endif // guard