mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 21:15:33 +08:00
refs #568, improved display / sorting for status message categories
* display technical categories when no hr categories are available * compare function for status message
This commit is contained in:
@@ -43,8 +43,9 @@ namespace BlackMisc
|
||||
//! Properties by index
|
||||
enum ColumnIndex
|
||||
{
|
||||
IndexCategories = BlackMisc::CPropertyIndex::GlobalIndexCStatusMessage,
|
||||
IndexCategoryHumanReadable,
|
||||
IndexCategoriesAsString = BlackMisc::CPropertyIndex::GlobalIndexCStatusMessage,
|
||||
IndexCategoriesHumanReadableAsString,
|
||||
IndexCategoryHumanReadableOrTechnicalAsString,
|
||||
IndexSeverity,
|
||||
IndexSeverityAsString,
|
||||
IndexMessage
|
||||
@@ -82,15 +83,21 @@ namespace BlackMisc
|
||||
//! If message is empty then do nothing, otherwise throw a CStatusException.
|
||||
void maybeThrow() const;
|
||||
|
||||
//! Message category
|
||||
//! Message categories
|
||||
const CLogCategoryList &getCategories() const { return this->m_categories; }
|
||||
|
||||
//! Message categories as string
|
||||
QString getCategoriesAsString() const;
|
||||
|
||||
//! Human readable category
|
||||
QString getHumanReadablePattern() const;
|
||||
|
||||
//! All human readable categories
|
||||
QStringList getHumanReadablePatterns() const;
|
||||
|
||||
//! The human or technical categories
|
||||
QString getHumanOrTechnicalCategoriesAsString() const;
|
||||
|
||||
//! Message severity
|
||||
StatusSeverity getSeverity() const { return this->m_severity; }
|
||||
|
||||
@@ -165,6 +172,9 @@ namespace BlackMisc
|
||||
//! \copydoc CValueObject::setPropertyByIndex
|
||||
void setPropertyByIndex(const CVariant &variant, const BlackMisc::CPropertyIndex &index);
|
||||
|
||||
//! Compare for index
|
||||
int comparePropertyByIndex(const CStatusMessage &compareValue, const CPropertyIndex &index) const;
|
||||
|
||||
//! To HTML
|
||||
QString toHtml() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user