X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.h;h=661e02577ece14a776101c0392297f6b6c3dfc8e;hp=008577d21a3ee6163b59c55e7e09e08fb1025cd3;hb=1a45f16a9734820fba42fe1db3f38dd1eee49df6;hpb=4171bdf884b6bbc7dad85f100a29746bf955191f diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index 008577d2..661e0257 100644 --- a/src/uisupport/uistyle.h +++ b/src/uisupport/uistyle.h @@ -105,7 +105,9 @@ public: None = 0x00000000, OwnMsg = 0x00000001, Highlight = 0x00000002, - Selected = 0x00000004 // must be last! + Selected = 0x00000004, + Hovered = 0x00000008, + Last = Hovered }; enum class ItemFormatType : quint32 { @@ -197,22 +199,22 @@ public: * @see UiStyle::ColorRole */ const QList defaultSenderColors = QList { - QColor(204, 0, 0), /// Sender00 - QColor( 0, 108, 173), /// Sender01 - QColor( 77, 153, 0), /// Sender02 - QColor(102, 0, 204), /// Sender03 - QColor(166, 125, 0), /// Sender04 - QColor( 0, 153, 39), /// Sender05 - QColor( 0, 48, 192), /// Sender06 - QColor(204, 0, 154), /// Sender07 - QColor(185, 70, 0), /// Sender08 - QColor(134, 153, 0), /// Sender09 - QColor( 20, 153, 0), /// Sender10 - QColor( 0, 153, 96), /// Sender11 - QColor( 0, 108, 173), /// Sender12 - QColor( 0, 153, 204), /// Sender13 - QColor(179, 0, 204), /// Sender14 - QColor(204, 0, 77), /// Sender15 + QColor(204, 0, 0), ///< Sender00 + QColor( 0, 108, 173), ///< Sender01 + QColor( 77, 153, 0), ///< Sender02 + QColor(102, 0, 204), ///< Sender03 + QColor(166, 125, 0), ///< Sender04 + QColor( 0, 153, 39), ///< Sender05 + QColor( 0, 48, 192), ///< Sender06 + QColor(204, 0, 154), ///< Sender07 + QColor(185, 70, 0), ///< Sender08 + QColor(134, 153, 0), ///< Sender09 + QColor( 20, 153, 0), ///< Sender10 + QColor( 0, 153, 96), ///< Sender11 + QColor( 0, 108, 173), ///< Sender12 + QColor( 0, 153, 204), ///< Sender13 + QColor(179, 0, 204), ///< Sender14 + QColor(204, 0, 77), ///< Sender15 }; // Explicitly declare QList type for defaultSenderColors, otherwise error C2797 // "list initialization inside member initializer list" will occur in Windows builds with Visual @@ -294,8 +296,8 @@ protected: /** * Cache the system locale timestamp format string * - * Based on whether or not AM/PM designators are used in the QLocale::system().timeFormat(), - * this extends the system locale timestamp format string to include seconds. + * Based on whether or not AM/PM designators are used in the QLocale.timeFormat(), this extends + * the application locale timestamp format string to include seconds. * * @see UiStyle::systemTimestampFormatString() */ @@ -342,11 +344,11 @@ private: mutable QHash _metricsCache; QHash _listItemFormats; static QHash _formatCodes; - static bool _useCustomTimestampFormat; /// If true, use the custom timestamp format - static QString _systemTimestampFormatString; /// Cached copy of system locale timestamp format - static QString _timestampFormatString; /// Timestamp format string - static UiStyle::SenderPrefixMode _senderPrefixDisplay; /// Display of prefix modes before sender - static bool _showSenderBrackets; /// If true, show brackets around sender names + static bool _useCustomTimestampFormat; ///< If true, use the custom timestamp format + static QString _systemTimestampFormatString; ///< Cached copy of system locale timestamp format + static QString _timestampFormatString; ///< Timestamp format string + static UiStyle::SenderPrefixMode _senderPrefixDisplay; ///< Prefix mode display before sender + static bool _showSenderBrackets; ///< If true, show brackets around sender names QIcon _channelJoinedIcon; QIcon _channelPartedIcon; @@ -387,11 +389,7 @@ private: mutable quint8 _senderHash; }; -#if QT_VERSION < 0x050000 -uint qHash(UiStyle::ItemFormatType key); -#else uint qHash(UiStyle::ItemFormatType key, uint seed); -#endif // ---- Operators for dealing with enums ----------------------------------------------------------