mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
refs #618, allow to display icon when DB key is set
This commit is contained in:
@@ -28,7 +28,8 @@ namespace BlackMisc
|
||||
//! Property index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexDbIntegerKey = CPropertyIndex::GlobalIndexIDatastoreInteger
|
||||
IndexDbIntegerKey = CPropertyIndex::GlobalIndexIDatastoreInteger,
|
||||
IndexDatabaseIcon
|
||||
};
|
||||
|
||||
//! Get DB key.
|
||||
@@ -52,6 +53,9 @@ namespace BlackMisc
|
||||
//! Has valid DB key
|
||||
bool hasValidDbKey() const { return m_dbKey >= 0; }
|
||||
|
||||
//! Database icon if this has valid key, otherwise empty
|
||||
const CIcon &toDatabaseIcon() const;
|
||||
|
||||
//! Invalid key
|
||||
static int invalidDbKey() { return -1; }
|
||||
|
||||
@@ -95,7 +99,8 @@ namespace BlackMisc
|
||||
//! Property index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexDbStringKey = CPropertyIndex::GlobalIndexIDatastoreString
|
||||
IndexDbStringKey = CPropertyIndex::GlobalIndexIDatastoreString,
|
||||
IndexDatabaseIcon
|
||||
};
|
||||
|
||||
//! Get DB key.
|
||||
@@ -110,6 +115,9 @@ namespace BlackMisc
|
||||
//! Has valid DB key
|
||||
bool hasValidDbKey() const { return !m_dbKey.isEmpty(); }
|
||||
|
||||
//! Database icon if this has valid key, otherwise empty
|
||||
const CIcon &toDatabaseIcon() const;
|
||||
|
||||
//! Invalid key
|
||||
static QString invalidDbKey() { return ""; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user