+ static FormatType formatType(const QString &code);
+ static QString formatCode(FormatType);
+ static void setTimestampFormatString(const QString &format);
+ /**
+ * Updates the local setting cache of whether or not to show sender brackets
+ *
+ * @param[in] enabled If true, sender brackets are enabled, otherwise false.
+ */
+ static void enableSenderBrackets(bool enabled);
+
+ QVariant itemData(int role, const QTextCharFormat &format) const;
+
+private slots:
+ void allowMircColorsChanged(const QVariant &);
+ void showItemViewIconsChanged(const QVariant &);
+
+private:
+ QVector<QBrush> _uiStylePalette;
+ QBrush _markerLineBrush;
+ QHash<quint64, QTextCharFormat> _formats;
+ mutable QHash<quint64, QTextCharFormat> _formatCache;
+ mutable QHash<quint64, QFontMetricsF *> _metricsCache;
+ QHash<quint32, QTextCharFormat> _listItemFormats;
+ static QHash<QString, FormatType> _formatCodes;
+ static QString _timestampFormatString;
+ static bool _showSenderBrackets; /// If true, show brackets around sender names
+
+ QIcon _channelJoinedIcon;
+ QIcon _channelPartedIcon;
+ QIcon _userOfflineIcon;
+ QIcon _userOnlineIcon;
+ QIcon _userAwayIcon;
+ QIcon _categoryOpIcon;
+ QIcon _categoryVoiceIcon;
+ int _opIconLimit;
+ int _voiceIconLimit;
+ bool _showNickViewIcons;
+ bool _showBufferViewIcons;
+ bool _allowMircColors;
+};
+
+
+class UiStyle::StyledMessage : public Message
+{
+ Q_DECLARE_TR_FUNCTIONS(UiStyle::StyledMessage)