refs #452, adjusted aircraft/aviation classes

* support for loading from datastore
* improved timestamp handling
* new color and country classes
* new attributes
* updates for missing parts in CUser
This commit is contained in:
Klaus Basan
2015-09-23 03:20:36 +02:00
committed by Mathew Sutcliffe
parent c5f7179588
commit ae24700299
45 changed files with 2762 additions and 401 deletions

View File

@@ -27,7 +27,9 @@ namespace BlackMisc
enum ColumnIndex
{
IndexUtcTimestamp = BlackMisc::CPropertyIndex::GlobalIndexTimestampBased,
IndexUtcTimestampFormatted,
IndexUtcTimestampFormattedYmdhms,
IndexUtcTimestampFormattedYmdhmsz,
IndexUtcTimestampFormattedDhms,
IndexUtcTimestampFormattedHms,
IndexUtcTimestampFormattedHm,
IndexMSecsSinceEpoch // keep this as last item
@@ -73,7 +75,7 @@ namespace BlackMisc
void setCurrentUtcTime();
//! Formatted timestamp
QString getFormattedUtcTimestamp() const;
QString getFormattedUtcTimestampDhms() const;
//! As hh:mm:ss
QString getFormattedUtcTimestampHms() const;
@@ -91,14 +93,20 @@ namespace BlackMisc
static bool canHandleIndex(const BlackMisc::CPropertyIndex &index);
protected:
//! Destructor
virtual ~ITimestampBased() {}
//! Constructor
ITimestampBased();
//! Constructor
ITimestampBased(qint64 msSincePoch);
//! Constructor
ITimestampBased(const QDateTime &timestamp);
//! \copydoc CValueObject::propertyByIndex
virtual CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
CVariant propertyByIndex(const BlackMisc::CPropertyIndex &index) const;
//! \copydoc CValueObject::setPropertyByIndex
virtual void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index);
void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index);
qint64 m_timestampMSecsSinceEpoch = QDateTime::currentMSecsSinceEpoch(); //!< timestamp value
};