X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fuistyle.h;h=661e02577ece14a776101c0392297f6b6c3dfc8e;hb=d9e586707522241d628a90466e13722e342cc28a;hp=a50519c9f8dce4d304d01d96e9492c9f5d9bbdd7;hpb=a4f4d8fe57d3e70d2f0ebdb31ca17234ccb28faf;p=quassel.git diff --git a/src/uisupport/uistyle.h b/src/uisupport/uistyle.h index a50519c9..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 { @@ -164,14 +166,13 @@ public: }; /// Display of sender prefix modes - enum SenderPrefixMode { + enum class SenderPrefixMode { NoModes = 0, ///< Hide sender modes HighestMode = 1, ///< Show the highest active sender mode AllModes = 2 ///< Show all active sender modes }; // Do not change SenderPrefixMode numbering without also adjusting // ChatViewSettingsPage::initSenderPrefixComboBox() and chatviewsettingspage.ui "defaultValue" - // TODO Qt5: Switch to "enum class" struct Format { FormatType type; @@ -295,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() */ @@ -388,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 ----------------------------------------------------------