Status message list model (so they can displayed as table view in GUI),

and the corresponding property methods in CStatusMessage
This commit is contained in:
Klaus Basan
2014-02-05 21:22:21 +00:00
committed by Mathew Sutcliffe
parent 5731bd3dd1
commit f476388f8b
5 changed files with 295 additions and 0 deletions

View File

@@ -35,6 +35,19 @@ namespace BlackMisc
SeverityError
};
/*!
* \brief Properties by index
*/
enum ColumnIndex
{
IndexType,
IndexTypeAsString,
IndexSeverity,
IndexSeverityAsString,
IndexMessage,
IndexTimestamp
};
private:
StatusType m_type;
StatusSeverity m_severity;
@@ -98,6 +111,21 @@ namespace BlackMisc
return QVariant::fromValue(*this);
}
//! \brief Type as string
const QString &getTypeAsString() const;
//! \brief Type as string
const QString &getSeverityAsString() const;
//! \copydoc CValueObject::propertyByIndex(int)
QVariant propertyByIndex(int index) const;
//! \copydoc CValueObject::propertyByIndex(const QVariant, int)
void propertyByIndex(const QVariant &variant, int index);
//! \copydoc CValueObject::propertyByIndexAsString
QString propertyByIndexAsString(int index, bool i18n) const;
/*!
* \brief Equal operator ==
* \param other