swift
Loading...
Searching...
No Matches
swift::misc::CStatusMessage Class Reference

Streamable status message, e.g. More...

#include <statusmessage.h>

Inheritance diagram for swift::misc::CStatusMessage:
[legend]

Public Types

enum  ColumnIndex {
  IndexCategoriesAsString = CPropertyIndexRef::GlobalIndexCStatusMessage , IndexSeverity , IndexSeverityAsString , IndexSeverityAsIcon ,
  IndexMessage , IndexMessageNoLineBreaks , IndexMessageAsHtml
}
 Properties by index. More...
Public Types inherited from swift::misc::CValueObject< CStatusMessage >
using base_type
 Base class.
Public Types inherited from swift::misc::CEmpty
using base_type = CEmpty
 Base class is alias of itself.
Public Types inherited from swift::misc::mixin::Index< CStatusMessage >
enum  ColumnIndex
 Base class enums. More...
Public Types inherited from swift::misc::ITimestampBased
enum  ColumnIndex {
  IndexUtcTimestamp = CPropertyIndexRef::GlobalIndexITimestampBased , IndexUtcTimestampFormattedYmdhms , IndexUtcTimestampFormattedYmdhmsz , IndexUtcTimestampFormattedMdhms ,
  IndexUtcTimestampFormattedMdhmsz , IndexUtcTimestampFormattedDhms , IndexUtcTimestampFormattedHms , IndexUtcTimestampFormattedHm ,
  IndexMSecsSinceEpoch
}
 Properties by index. More...
Public Types inherited from swift::misc::IOrderable
enum  ColumnIndex { IndexOrder = CPropertyIndexRef::GlobalIndexIOrderable , IndexOrderString }
 Properties by index. More...

Public Member Functions

 CStatusMessage (const CLogCategory &category)
 Construct a message with some specific category.
 CStatusMessage (const CLogCategoryList &categories)
 Construct a message with some specific categories.
 CStatusMessage (const CLogCategoryList &categories, const CLogCategory &extra)
 Construct a message with some specific categories.
 CStatusMessage (const CLogCategoryList &categories, const CLogCategoryList &extra)
 Construct a message with some specific categories.
 CStatusMessage ()
 Constructor.
 CStatusMessage (const CStatusMessage &other)
 Copy constructor (because of mutex).
CStatusMessage & operator= (const CStatusMessage &other)
 Copy assignment (because of mutex).
 ~CStatusMessage ()=default
 Destructor.
 CStatusMessage (QtMsgType type, const QMessageLogContext &context, const QString &message)
 Construct from a Qt logging triple.
void toQtLogTriple (QtMsgType *o_type, QString *o_category, QString *o_message) const
 Convert to a Qt logging triple.
const CLogCategoryList & getCategories () const
 Message categories.
QString getCategoriesAsString () const
 Message categories as string.
QString getHumanOrTechnicalCategoriesAsString () const
 The human or technical categories.
StatusSeverity getSeverity () const
 Message severity.
bool clampSeverity (StatusSeverity severity)
 Clip/reduce severity if higher (more critical).
bool isSeverityInfoOrLess () const
 Info or debug, no warning or error.
bool isSeverityHigherOrEqual (CStatusMessage::StatusSeverity severity) const
 Is this message's severity higher or equal.
bool isWarningOrAbove () const
 Warning or above.
bool isSuccess () const
 Operation considered successful.
bool isFailure () const
 Operation considered unsuccessful.
QString getMessage () const
 Message.
QString getMessageNoLineBreaks () const
 Message without line breaks.
void prependMessage (const QString &msg)
 Prepend message.
void appendMessage (const QString &msg)
 Append message.
template<class T>
bool isFromClass (const T *pointer=nullptr) const
 Returns true if this message was sent by an instance of class T.
void markAsHandledBy (const QObject *object) const
 Mark the message as having been handled by the given object.
bool wasHandledBy (const QObject *object) const
 Returns true if the message was marked as having been handled by the given object.
void setSeverity (StatusSeverity severity)
 Severity.
void addCategory (const CLogCategory &category)
 Add category, avoids duplicates.
void addValidationCategory ()
 Adds validation as category.
void addCategories (const CLogCategoryList &categories)
 Add categories, avoids duplicates.
void setCategory (const CLogCategory &category)
 Reset category.
void setCategories (const CLogCategoryList &categories)
 Reset categories.
CIcons::IconIndex toIcon () const
 Representing icon.
const QString & getSeverityAsString () const
 Severity as string.
const CIcon & getSeverityAsIcon () const
 Severity as icon.
QVariant propertyByIndex (swift::misc::CPropertyIndexRef index) const
 Property by index.
void setPropertyByIndex (swift::misc::CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const CStatusMessage &compareValue) const
 Compare for index.
QString convertToQString (bool i18n=false) const
 Cast as QString.
QString toHtml (bool withIcon, bool withColors) const
 To HTML.
template<size_t N>
 CStatusMessage (const char16_t(&message)[N])
 Constructor.
 CStatusMessage (const QString &message)
 Constructor.
template<size_t N>
 CStatusMessage (StatusSeverity severity, const char16_t(&message)[N])
 Constructor.
 CStatusMessage (StatusSeverity severity, const QString &message)
 Constructor.
template<size_t N>
 CStatusMessage (const CLogCategoryList &categories, StatusSeverity severity, const char16_t(&message)[N], bool validation=false)
 Constructor, also a validation messsage can be directly created.
 CStatusMessage (const CLogCategoryList &categories, StatusSeverity severity, const QString &message, bool validation=false)
 Constructor, also a validation messsage can be directly created.
 CStatusMessage (const char *message)=delete
 Deleted constructor, to prevent inefficient construction from byte string literal. Explicit so as to avoid ambiguities with functions overloaded on QString and CStatusMessage.
 CStatusMessage (StatusSeverity severity, const char *message)=delete
 Deleted constructor, to prevent inefficient construction from byte string literal. Explicit so as to avoid ambiguities with functions overloaded on QString and CStatusMessage.
 CStatusMessage (const CLogCategoryList &categories, StatusSeverity severity, const char *message, bool validation=false)=delete
 Deleted constructor, to prevent inefficient construction from byte string literal. Explicit so as to avoid ambiguities with functions overloaded on QString and CStatusMessage.
Public Member Functions inherited from swift::misc::mixin::MetaType< CStatusMessage >
int getMetaTypeId () const
 Returns the Qt meta type ID of this object.
QString getClassName () const
 Class name.
bool isA (int metaTypeId) const
 Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses.
Public Member Functions inherited from swift::misc::mixin::DBusByMetaClass< CStatusMessage >
void marshallToDbus (QDBusArgument &arg, Tags...) const
 Marshall without begin/endStructure, for when composed within another object.
void unmarshallFromDbus (const QDBusArgument &arg, Tags...)
 Unmarshall without begin/endStructure, for when composed within another object.
Public Member Functions inherited from swift::misc::mixin::DataStreamByMetaClass< CStatusMessage >
void marshalToDataStream (QDataStream &stream) const
 Marshal a value to a QDataStream.
void unmarshalFromDataStream (QDataStream &stream)
 Unmarshal a value from a QDataStream.
Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CStatusMessage >
QJsonObject toJson () const
 Cast to JSON object.
QString toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const
 Convenience function JSON as string.
void convertFromJson (const QJsonObject &json)
 Assign from JSON object.
Public Member Functions inherited from swift::misc::mixin::String< CStatusMessage >
QString toQString (bool i18n=false) const
 Cast as QString.
std::string toStdString (bool i18n=false) const
 To std string.
QString stringForStreaming () const
 String for streaming operators.
Public Member Functions inherited from swift::misc::mixin::Index< CStatusMessage >
CPropertyIndexList apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false)
 Update by variant map.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const CStatusMessage &compareValue) const
 Compare for index.
bool equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const
 Is given variant equal to value of property index?
Public Member Functions inherited from swift::misc::mixin::Icon< CStatusMessage >
CIcons::CIcons::StandardIconUnknown16 toIcon () const
 As icon, not implemented by all classes.
Public Member Functions inherited from swift::misc::CMessageBase< CStatusMessage >
 CMessageBase ()=default
 Default constructor.
CStatusMessage & log (StatusSeverity s, const char16_t(&m)[N])
 Set the severity and format string.
CStatusMessage & debug ()
 Set the severity to debug.
CStatusMessage & info (const char16_t(&format)[N])
 Set the severity to info, providing a format string.
CStatusMessage & warning (const char16_t(&format)[N])
 Set the severity to warning, providing a format string.
CStatusMessage & error (const char16_t(&format)[N])
 Set the severity to error, providing a format string.
CStatusMessage & validation (StatusSeverity s, const char16_t(&format)[N])
 Set the severity to s, providing a format string, and adding the validation category.
CStatusMessage & validationInfo (const char16_t(&format)[N])
 Set the severity to info, providing a format string, and adding the validation category.
CStatusMessage & validationWarning (const char16_t(&format)[N])
 Set the severity to warning, providing a format string, and adding the validation category.
CStatusMessage & validationError (const char16_t(&format)[N])
 Set the severity to error, providing a format string, and adding the validation category.
CStatusMessage & operator<< (T v)
 Streaming operators.
bool isEmpty () const
 Message empty.
Public Member Functions inherited from swift::misc::ITimestampBased
QDateTime getUtcTimestamp () const
 Get timestamp.
qint64 getMSecsSinceEpoch () const
 Timestamp as ms value.
qint64 getTimeDifferenceMs (qint64 compareTime) const
 Time difference in ms.
qint64 getTimeDifferenceAbsMs (qint64 compareTime) const
 Time difference in ms.
qint64 getTimeDifferenceToNowMs () const
 Time difference to now.
qint64 getTimeDifferenceMs (const ITimestampBased &compare) const
 Time difference in ms.
qint64 getAbsTimeDifferenceMs (qint64 compareTime) const
 Time difference in ms.
qint64 getAbsTimeDifferenceMs (const ITimestampBased &compare) const
 Time difference in ms.
void setTimestampToNull ()
 Set to null.
void setMSecsSinceEpoch (qint64 mSecsSinceEpoch)
 Timestamp as ms value.
void setByYearMonthDayHourMinute (const QString &yyyyMMddhhmmss)
 Set by value such as "20141003231045".
void setUtcTimestamp (const QDateTime &timestamp)
 Set timestamp.
bool isNewerThan (const ITimestampBased &otherTimestampObj) const
 Is this newer than other?
bool isNewerThan (qint64 mSecsSinceEpoch) const
 Is newer than epoch value?
bool isOlderThan (const ITimestampBased &otherTimestampObj) const
 Is this older than other?
bool isOlderThan (qint64 mSecsSinceEpoch) const
 Is this older than other?
bool isOlderThanNowMinusOffset (int offsetMs) const
 Older than now-offset.
bool isSame (const ITimestampBased &otherTimestampObj) const
 Same timestamp.
qint64 msecsTo (const ITimestampBased &otherTimestampObj) const
 Time difference.
qint64 absMsecsTo (const ITimestampBased &otherTimestampObj) const
 Time difference.
qint64 msecsToNow () const
 Milliseconds to now.
void setCurrentUtcTime ()
 Set the current time as timestamp.
void addMsecs (qint64 ms)
 Add the given number of milliseconds to the timestamp.
QString getFormattedUtcTimestampHms () const
 As hh:mm:ss.
QString getFormattedUtcTimestampHmsz () const
 As hh:mm:ss.zzz.
QString getFormattedUtcTimestampHm () const
 As hh:mm.
QString getFormattedUtcTimestampDhms () const
 As dd HH mm ss.
QString getFormattedUtcTimestampMdhms () const
 As MM dd HH mm ss.
QString getFormattedUtcTimestampMdhmsz () const
 As MM dd HH mm ss.zzz.
QString getFormattedUtcTimestampYmdhms () const
 As yyyy MM dd HH mm ss.
QString getFormattedUtcTimestampYmdhmsz () const
 As yyyy MM dd HH mm ss.zzz.
bool hasValidTimestamp () const
 Valid timestamp?
Public Member Functions inherited from swift::misc::IOrderable
int getOrder () const
 Order.
QString getOrderAsString () const
 Order as string.
void setOrder (int order)
 Set order.
bool hasValidOrder () const
 Valid order set?

Static Public Member Functions

static const QString & severityToString (StatusSeverity severity)
 Severity as string.
static QString severitiesToString (const QSet< StatusSeverity > &severities)
 Severity set as string.
static StatusSeverity stringToSeverity (const QString &severity)
 Severity as string, if not possible to convert.
static const QStringList & allSeverityStrings ()
 Severities as strings.
static const CIcon & convertToIcon (const CStatusMessage &statusMessage)
 Representing icon.
static const CIcon & convertToIcon (CStatusMessage::StatusSeverity severity)
 Representing icon.
static const QString & convertToIconResource (CStatusMessage::StatusSeverity severity)
 Representing icon.
static CStatusMessage fromDatabaseJson (const QJsonObject &json)
 Object from JSON.
static CStatusMessage fromJsonException (const CJsonException &ex, const CLogCategoryList &categories, const QString &prefix)
 Object from JSON exception message.
static void registerMetadata ()
 Register metadata.
Static Public Member Functions inherited from swift::misc::mixin::MetaType< CStatusMessage >
static void registerMetadata ()
 Register metadata.
Static Public Member Functions inherited from swift::misc::mixin::JsonByMetaClass< CStatusMessage >
static DerivedObj fromJson (const QJsonObject &json)
 Get object from QJsonObject.
static DerivedObj fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg)
 Get object from JSON string.
Static Public Member Functions inherited from swift::misc::ITimestampBased
static bool isAnyTimestampIndex (int index)
 Any of the timestamp indexes.
static bool canHandleIndex (CPropertyIndexRef index)
 Can given index be handled.
Static Public Member Functions inherited from swift::misc::IOrderable
static bool isAnyOrderIndex (int index)
 Any order index.
using StatusSeverity = swift::misc::StatusSeverity
 Status severities.
static constexpr auto SeverityDebug = swift::misc::SeverityDebug
 Status severities.
static constexpr auto SeverityInfo = swift::misc::SeverityInfo
 Status severities.
static constexpr auto SeverityWarning = swift::misc::SeverityWarning
 Status severities.
static constexpr auto SeverityError = swift::misc::SeverityError
 Status severities.

Additional Inherited Members

Protected Member Functions inherited from swift::misc::CValueObject< CStatusMessage >
 CEmpty ()=default
 Inheriting constructors.
 CEmpty (const CEmpty &)=default
 Inheriting constructors.
 CValueObject ()=default
 Default constructor.
CValueObject & operator= (const CValueObject &)=default
 Copy assignment operator.
 ~CValueObject ()=default
 Destructor.
Protected Member Functions inherited from swift::misc::CEmpty
 CEmpty ()=default
 Protected default constructor.
 CEmpty (const CEmpty &)=default
 Protected copy constructor.
CEmpty & operator= (const CEmpty &)=default
 Protected copy assignment operator.
 ~CEmpty ()=default
 Non-virtual protected destructor.
Protected Member Functions inherited from swift::misc::CMessageBase< CStatusMessage >
void addIfNotExisting (const CLogCategory &category)
 Add category if not already existing.
QString message () const
 Private.
Protected Member Functions inherited from swift::misc::ITimestampBased
 ITimestampBased ()=default
 Constructor.
 ITimestampBased (qint64 msSincePoch)
 Constructor.
 ITimestampBased (const QDateTime &timestamp)
 Constructor.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const ITimestampBased &compareValue) const
 Compare for index.
void updateMissingParts (const ITimestampBased &other)
 Update missing parts.
Protected Member Functions inherited from swift::misc::IOrderable
 IOrderable ()=default
 Constructor.
 IOrderable (int order)
 Constructor.
QVariant propertyByIndex (CPropertyIndexRef index) const
 Property by index.
void setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant)
 Set property by index.
int comparePropertyByIndex (CPropertyIndexRef index, const IOrderable &compareValue) const
 Compare for index.
Static Protected Member Functions inherited from swift::misc::IOrderable
static bool canHandleIndex (CPropertyIndexRef index)
 Can given index be handled.
Protected Attributes inherited from swift::misc::CMessageBase< CStatusMessage >
CStrongStringView m_message
 Private.
QStringList m_args
 Private.
CLogCategoryList m_categories
 Private.
StatusSeverity m_severity
 Private.
Protected Attributes inherited from swift::misc::ITimestampBased
qint64 m_timestampMSecsSinceEpoch = -1
 timestamp value
Protected Attributes inherited from swift::misc::IOrderable
int m_order = -1
 order number

Detailed Description

Streamable status message, e.g.

from Core -> GUI

Definition at line 401 of file statusmessage.h.

Member Typedef Documentation

◆ StatusSeverity

Status severities.

Definition at line 410 of file statusmessage.h.

Member Enumeration Documentation

◆ ColumnIndex

Properties by index.

Definition at line 418 of file statusmessage.h.

Constructor & Destructor Documentation

◆ CStatusMessage() [1/13]

swift::misc::CStatusMessage::CStatusMessage ( const CLogCategory & category)
explicit

Construct a message with some specific category.

Definition at line 94 of file statusmessage.cpp.

◆ CStatusMessage() [2/13]

swift::misc::CStatusMessage::CStatusMessage ( const CLogCategoryList & categories)
explicit

Construct a message with some specific categories.

Definition at line 98 of file statusmessage.cpp.

◆ CStatusMessage() [3/13]

swift::misc::CStatusMessage::CStatusMessage ( const CLogCategoryList & categories,
const CLogCategory & extra )

Construct a message with some specific categories.

Definition at line 102 of file statusmessage.cpp.

◆ CStatusMessage() [4/13]

swift::misc::CStatusMessage::CStatusMessage ( const CLogCategoryList & categories,
const CLogCategoryList & extra )

Construct a message with some specific categories.

Definition at line 106 of file statusmessage.cpp.

◆ CStatusMessage() [5/13]

swift::misc::CStatusMessage::CStatusMessage ( )

Constructor.

Definition at line 110 of file statusmessage.cpp.

◆ CStatusMessage() [6/13]

swift::misc::CStatusMessage::CStatusMessage ( const CStatusMessage & other)

Copy constructor (because of mutex).

Definition at line 112 of file statusmessage.cpp.

◆ CStatusMessage() [7/13]

template<size_t N>
swift::misc::CStatusMessage::CStatusMessage ( const char16_t(&) message[N])
inline

Constructor.

Definition at line 456 of file statusmessage.h.

◆ CStatusMessage() [8/13]

swift::misc::CStatusMessage::CStatusMessage ( const QString & message)

Constructor.

Definition at line 145 of file statusmessage.cpp.

◆ CStatusMessage() [9/13]

template<size_t N>
swift::misc::CStatusMessage::CStatusMessage ( StatusSeverity severity,
const char16_t(&) message[N] )
inline

Constructor.

Definition at line 460 of file statusmessage.h.

◆ CStatusMessage() [10/13]

swift::misc::CStatusMessage::CStatusMessage ( StatusSeverity severity,
const QString & message )

Constructor.

Definition at line 155 of file statusmessage.cpp.

◆ CStatusMessage() [11/13]

template<size_t N>
swift::misc::CStatusMessage::CStatusMessage ( const CLogCategoryList & categories,
StatusSeverity severity,
const char16_t(&) message[N],
bool validation = false )
inline

Constructor, also a validation messsage can be directly created.

Definition at line 469 of file statusmessage.h.

◆ CStatusMessage() [12/13]

swift::misc::CStatusMessage::CStatusMessage ( const CLogCategoryList & categories,
StatusSeverity severity,
const QString & message,
bool validation = false )

Constructor, also a validation messsage can be directly created.

Definition at line 171 of file statusmessage.cpp.

◆ CStatusMessage() [13/13]

swift::misc::CStatusMessage::CStatusMessage ( QtMsgType type,
const QMessageLogContext & context,
const QString & message )

Construct from a Qt logging triple.

See also
QtMessageHandler

Definition at line 182 of file statusmessage.cpp.

Member Function Documentation

◆ addCategories()

void swift::misc::CStatusMessage::addCategories ( const CLogCategoryList & categories)
inline

Add categories, avoids duplicates.

Definition at line 567 of file statusmessage.h.

◆ addCategory()

void swift::misc::CStatusMessage::addCategory ( const CLogCategory & category)
inline

Add category, avoids duplicates.

Definition at line 561 of file statusmessage.h.

◆ addValidationCategory()

void swift::misc::CStatusMessage::addValidationCategory ( )
inline

Adds validation as category.

Definition at line 564 of file statusmessage.h.

◆ allSeverityStrings()

const QStringList & swift::misc::CStatusMessage::allSeverityStrings ( )
static

Severities as strings.

Definition at line 459 of file statusmessage.cpp.

◆ appendMessage()

void swift::misc::CStatusMessage::appendMessage ( const QString & msg)

Append message.

Definition at line 253 of file statusmessage.cpp.

◆ clampSeverity()

bool swift::misc::CStatusMessage::clampSeverity ( CStatusMessage::StatusSeverity severity)

Clip/reduce severity if higher (more critical).

Definition at line 215 of file statusmessage.cpp.

◆ comparePropertyByIndex()

int swift::misc::CStatusMessage::comparePropertyByIndex ( CPropertyIndexRef index,
const CStatusMessage & compareValue ) const

Compare for index.

Definition at line 523 of file statusmessage.cpp.

◆ convertToIcon() [1/2]

const CIcon & swift::misc::CStatusMessage::convertToIcon ( const CStatusMessage & statusMessage)
static

Representing icon.

Definition at line 285 of file statusmessage.cpp.

◆ convertToIcon() [2/2]

const CIcon & swift::misc::CStatusMessage::convertToIcon ( CStatusMessage::StatusSeverity severity)
static

Representing icon.

Definition at line 290 of file statusmessage.cpp.

◆ convertToIconResource()

const QString & swift::misc::CStatusMessage::convertToIconResource ( CStatusMessage::StatusSeverity severity)
static

Representing icon.

Definition at line 302 of file statusmessage.cpp.

◆ convertToQString()

QString swift::misc::CStatusMessage::convertToQString ( bool i18n = false) const

Cast as QString.

Parameters
i18ni18n

Definition at line 274 of file statusmessage.cpp.

◆ fromDatabaseJson()

CStatusMessage swift::misc::CStatusMessage::fromDatabaseJson ( const QJsonObject & json)
static

Object from JSON.

Definition at line 319 of file statusmessage.cpp.

◆ fromJsonException()

CStatusMessage swift::misc::CStatusMessage::fromJsonException ( const CJsonException & ex,
const CLogCategoryList & categories,
const QString & prefix )
static

Object from JSON exception message.

Definition at line 331 of file statusmessage.cpp.

◆ getCategories()

const CLogCategoryList & swift::misc::CStatusMessage::getCategories ( ) const
inline

Message categories.

Definition at line 495 of file statusmessage.h.

◆ getCategoriesAsString()

QString swift::misc::CStatusMessage::getCategoriesAsString ( ) const

Message categories as string.

Definition at line 213 of file statusmessage.cpp.

◆ getMessage()

QString swift::misc::CStatusMessage::getMessage ( ) const
inline

Message.

Definition at line 531 of file statusmessage.h.

◆ getMessageNoLineBreaks()

QString swift::misc::CStatusMessage::getMessageNoLineBreaks ( ) const

Message without line breaks.

Definition at line 234 of file statusmessage.cpp.

◆ getSeverity()

StatusSeverity swift::misc::CStatusMessage::getSeverity ( ) const
inline

Message severity.

Definition at line 504 of file statusmessage.h.

◆ getSeverityAsIcon()

const CIcon & swift::misc::CStatusMessage::getSeverityAsIcon ( ) const

Severity as icon.

Definition at line 457 of file statusmessage.cpp.

◆ getSeverityAsString()

const QString & swift::misc::CStatusMessage::getSeverityAsString ( ) const

Severity as string.

Definition at line 455 of file statusmessage.cpp.

◆ isFailure()

bool swift::misc::CStatusMessage::isFailure ( ) const

Operation considered unsuccessful.

Definition at line 232 of file statusmessage.cpp.

◆ isFromClass()

template<class T>
bool swift::misc::CStatusMessage::isFromClass ( const T * pointer = nullptr) const
inline

Returns true if this message was sent by an instance of class T.

Definition at line 544 of file statusmessage.h.

◆ isSeverityHigherOrEqual()

bool swift::misc::CStatusMessage::isSeverityHigherOrEqual ( CStatusMessage::StatusSeverity severity) const

Is this message's severity higher or equal.

Definition at line 225 of file statusmessage.cpp.

◆ isSeverityInfoOrLess()

bool swift::misc::CStatusMessage::isSeverityInfoOrLess ( ) const
inline

Info or debug, no warning or error.

Definition at line 510 of file statusmessage.h.

◆ isSuccess()

bool swift::misc::CStatusMessage::isSuccess ( ) const

Operation considered successful.

Definition at line 230 of file statusmessage.cpp.

◆ isWarningOrAbove()

bool swift::misc::CStatusMessage::isWarningOrAbove ( ) const
inline

Warning or above.

Definition at line 519 of file statusmessage.h.

◆ markAsHandledBy()

void swift::misc::CStatusMessage::markAsHandledBy ( const QObject * object) const

Mark the message as having been handled by the given object.

Definition at line 262 of file statusmessage.cpp.

◆ operator=()

CStatusMessage & swift::misc::CStatusMessage::operator= ( const CStatusMessage & other)

Copy assignment (because of mutex).

Definition at line 119 of file statusmessage.cpp.

◆ prependMessage()

void swift::misc::CStatusMessage::prependMessage ( const QString & msg)

Prepend message.

Definition at line 244 of file statusmessage.cpp.

◆ propertyByIndex()

QVariant swift::misc::CStatusMessage::propertyByIndex ( swift::misc::CPropertyIndexRef index) const

Property by index.

Definition at line 466 of file statusmessage.cpp.

◆ registerMetadata()

void swift::misc::CStatusMessage::registerMetadata ( )
static

Register metadata.

Definition at line 337 of file statusmessage.cpp.

◆ setCategories()

void swift::misc::CStatusMessage::setCategories ( const CLogCategoryList & categories)
inline

Reset categories.

Definition at line 573 of file statusmessage.h.

◆ setCategory()

void swift::misc::CStatusMessage::setCategory ( const CLogCategory & category)
inline

Reset category.

Definition at line 570 of file statusmessage.h.

◆ setPropertyByIndex()

void swift::misc::CStatusMessage::setPropertyByIndex ( swift::misc::CPropertyIndexRef index,
const QVariant & variant )

Set property by index.

Definition at line 493 of file statusmessage.cpp.

◆ setSeverity()

void swift::misc::CStatusMessage::setSeverity ( StatusSeverity severity)
inline

Severity.

Definition at line 558 of file statusmessage.h.

◆ severitiesToString()

QString swift::misc::CStatusMessage::severitiesToString ( const QSet< StatusSeverity > & severities)
static

Severity set as string.

Definition at line 426 of file statusmessage.cpp.

◆ severityToString()

const QString & swift::misc::CStatusMessage::severityToString ( CStatusMessage::StatusSeverity severity)
static

Severity as string.

Definition at line 393 of file statusmessage.cpp.

◆ stringToSeverity()

CStatusMessage::StatusSeverity swift::misc::CStatusMessage::stringToSeverity ( const QString & severity)
static

Severity as string, if not possible to convert.

See also
CSeverityInfo

Definition at line 344 of file statusmessage.cpp.

◆ toHtml()

QString swift::misc::CStatusMessage::toHtml ( bool withIcon,
bool withColors ) const

To HTML.

Definition at line 552 of file statusmessage.cpp.

◆ toIcon()

CIcons::IconIndex swift::misc::CStatusMessage::toIcon ( ) const
inline

Representing icon.

Definition at line 576 of file statusmessage.h.

◆ toQtLogTriple()

void swift::misc::CStatusMessage::toQtLogTriple ( QtMsgType * o_type,
QString * o_category,
QString * o_message ) const

Convert to a Qt logging triple.

See also
QtMessageHandler

Definition at line 198 of file statusmessage.cpp.

◆ wasHandledBy()

bool swift::misc::CStatusMessage::wasHandledBy ( const QObject * object) const

Returns true if the message was marked as having been handled by the given object.

Definition at line 268 of file statusmessage.cpp.

Member Data Documentation

◆ SeverityDebug

auto swift::misc::CStatusMessage::SeverityDebug = swift::misc::SeverityDebug
staticconstexpr

Status severities.

Definition at line 411 of file statusmessage.h.

◆ SeverityError

auto swift::misc::CStatusMessage::SeverityError = swift::misc::SeverityError
staticconstexpr

Status severities.

Definition at line 414 of file statusmessage.h.

◆ SeverityInfo

auto swift::misc::CStatusMessage::SeverityInfo = swift::misc::SeverityInfo
staticconstexpr

Status severities.

Definition at line 412 of file statusmessage.h.

◆ SeverityWarning

auto swift::misc::CStatusMessage::SeverityWarning = swift::misc::SeverityWarning
staticconstexpr

Status severities.

Definition at line 413 of file statusmessage.h.


The documentation for this class was generated from the following files: