refs #618, allow to display icon when DB key is set

This commit is contained in:
Klaus Basan
2016-03-25 03:27:15 +01:00
parent 691ffa3417
commit bb16d5d069
2 changed files with 34 additions and 12 deletions

View File

@@ -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 ""; }