mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-15 01:05:35 +08:00
As of workshop RW/KB, improved / fixed text messages
Also refs #351 * messages can be formatted with style sheet * fixed: removed command from message * added originator to command line * msg parsing now in core * using ITimestampBased for text messages and status messages * allow to resize rows to content (view base) * model / views for text messages * removed old qt stylesheets
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include "icon.h"
|
||||
#include "propertyindex.h"
|
||||
#include "logcategorylist.h"
|
||||
#include <QDateTime>
|
||||
#include "timestampbased.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -23,7 +23,9 @@ namespace BlackMisc
|
||||
/*!
|
||||
* Streamable status message, e.g. from Core -> GUI
|
||||
*/
|
||||
class CStatusMessage : public CValueObjectStdTuple<CStatusMessage>
|
||||
class CStatusMessage :
|
||||
public CValueObjectStdTuple<CStatusMessage>,
|
||||
public ITimestampBased
|
||||
{
|
||||
public:
|
||||
//! Status severities
|
||||
@@ -42,9 +44,7 @@ namespace BlackMisc
|
||||
IndexCategoryHumanReadable,
|
||||
IndexSeverity,
|
||||
IndexSeverityAsString,
|
||||
IndexMessage,
|
||||
IndexTimestamp,
|
||||
IndexTimestampFormatted
|
||||
IndexMessage
|
||||
};
|
||||
|
||||
//! Constructor
|
||||
@@ -147,7 +147,6 @@ namespace BlackMisc
|
||||
CLogCategoryList m_categories;
|
||||
StatusSeverity m_severity = SeverityDebug;
|
||||
QString m_message;
|
||||
QDateTime m_timestamp = QDateTime::currentDateTimeUtc();
|
||||
bool m_redundant = false;
|
||||
mutable QVector<quintptr> m_handledByObjects;
|
||||
mutable QString m_humanReadableCategory; //!< human readable category cache
|
||||
@@ -157,13 +156,13 @@ namespace BlackMisc
|
||||
|
||||
|
||||
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::CStatusMessage, (
|
||||
o.m_categories,
|
||||
o.m_severity,
|
||||
o.m_message,
|
||||
o.m_timestamp,
|
||||
o.m_redundant,
|
||||
attr(o.m_handledByObjects, flags<DisabledForHashing | DisabledForJson | DisabledForComparison | DisabledForMarshalling>())
|
||||
))
|
||||
o.m_categories,
|
||||
o.m_severity,
|
||||
o.m_message,
|
||||
o.m_timestampMSecsSinceEpoch,
|
||||
o.m_redundant,
|
||||
attr(o.m_handledByObjects, flags < DisabledForHashing | DisabledForJson | DisabledForComparison | DisabledForMarshalling > ())
|
||||
))
|
||||
Q_DECLARE_METATYPE(BlackMisc::CStatusMessage)
|
||||
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user