mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 06:25:33 +08:00
Ref T109, datastore object and list
* unified properties in int/string DB objects * fixed typo dbKeysAsString
This commit is contained in:
committed by
Mathew Sutcliffe
parent
03a551d016
commit
dfb6b05e9d
@@ -49,6 +49,8 @@ namespace BlackMisc
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexDbIntegerKey = CPropertyIndex::GlobalIndexIDatastoreInteger,
|
||||
IndexDbKeyAsString,
|
||||
IndexIsLoadedFromDb,
|
||||
IndexDatabaseIcon
|
||||
};
|
||||
|
||||
@@ -61,7 +63,7 @@ namespace BlackMisc
|
||||
//! Key as JSON value, or null
|
||||
QJsonValue getDbKeyAsJsonValue() const;
|
||||
|
||||
//! Db ley in parentheses, e.g. "(3)"
|
||||
//! Db key in parentheses, e.g. "(3)"
|
||||
QString getDbKeyAsStringInParentheses(const QString &prefix = {}) const;
|
||||
|
||||
//! Set the DB key
|
||||
@@ -130,6 +132,7 @@ namespace BlackMisc
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexDbStringKey = CPropertyIndex::GlobalIndexIDatastoreString,
|
||||
IndexDbKeyAsString,
|
||||
IndexIsLoadedFromDb,
|
||||
IndexDatabaseIcon
|
||||
};
|
||||
@@ -137,9 +140,15 @@ namespace BlackMisc
|
||||
//! Get DB key.
|
||||
const QString &getDbKey() const { return m_dbKey; }
|
||||
|
||||
//! DB key as string
|
||||
QString getDbKeyAsString() const { return getDbKey(); }
|
||||
|
||||
//! Key as JSON value, or null
|
||||
QJsonValue getDbKeyAsJsonValue() const;
|
||||
|
||||
//! Db key in parentheses, e.g. "(3)"
|
||||
QString getDbKeyAsStringInParentheses(const QString &prefix = {}) const;
|
||||
|
||||
//! Set the DB key
|
||||
void setDbKey(const QString &key) { m_dbKey = key.trimmed().toUpper(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user