refs #573, access to mode (exclude/include)

* in model
* in value object
This commit is contained in:
Klaus Basan
2016-01-17 00:33:31 +01:00
parent 359866f0c9
commit 6facffc292
3 changed files with 64 additions and 19 deletions

View File

@@ -70,8 +70,9 @@ namespace BlackMisc
IndexModelTypeAsString,
IndexModelMode,
IndexModelModeAsString,
IndexModelModeAsIcon,
IndexHasQueriedModelString,
IndexPartsDbStatus
IndexMembersDbStatus
};
//! \copydoc BlackMisc::CValueObject::registerMetadata
@@ -189,11 +190,17 @@ namespace BlackMisc
ModelMode getModelMode() const { return m_modelMode; }
//! Model mode as string
QString getModelModeAsString() const { return modelModeToString(getModelMode()); }
const QString &getModelModeAsString() const { return modelModeToString(getModelMode()); }
//! Model mode as string
const BlackMisc::CIcon &getModelModeAsIcon() const;
//! Set model mode
void setModelMode(ModelMode mode) { m_modelMode = mode; }
//! Set model mode as string
void setModelModeAsString(const QString &mode);
//! Simulator info
CSimulatorInfo getSimulatorInfo() const { return this->m_simulator; }
@@ -227,8 +234,8 @@ namespace BlackMisc
//! Valid simulator
bool hasValidSimulator() const;
//! Info, which parts/subparts (Livery, Aircraft ICAO, ...) are already based on DB data
QString getPartsDbStatus() const;
//! Info, which members (Livery, Aircraft ICAO, ...) are already based on DB data
QString getMembersDbStatus() const;
//! Matches model string?
bool matchesModelString(const QString &modelString, Qt::CaseSensitivity sensitivity) const;
@@ -252,7 +259,7 @@ namespace BlackMisc
static ModelMode modelModeFromString(const QString &mode);
//! Model mode
static QString modelModeToString(ModelMode mode);
static const QString &modelModeToString(ModelMode mode);
//! From swift DB JSON
static CAircraftModel fromDatabaseJson(const QJsonObject &json, const QString prefix = QString("mod_"));