X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatviewsettings.h;h=ef5f4d382a0323d0a9bad65ba551820009d81789;hp=179049380b88d83c75ed449a2608ea84e1f118e6;hb=141ed9bef03a341c68acde5c41ac7b7f9e660c66;hpb=9996d2489e5e5ca23b0750f39f64d8d4b5990029 diff --git a/src/qtui/chatviewsettings.h b/src/qtui/chatviewsettings.h index 17904938..ef5f4d38 100644 --- a/src/qtui/chatviewsettings.h +++ b/src/qtui/chatviewsettings.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-08 by the Quassel Project * + * Copyright (C) 2005-09 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -28,12 +28,24 @@ class ChatView; class ChatViewSettings : public QtUiSettings { public: + Q_ENUMS(OperationMode) + public: + enum OperationMode { + InvalidMode = 0, + OptIn = 1, + OptOut = 2 + }; + Q_DECLARE_FLAGS(operationModes, OperationMode); + ChatViewSettings(const QString &id = "__default__"); ChatViewSettings(ChatScene *scene); ChatViewSettings(ChatView *view); inline bool showWebPreview() { return localValue("ShowWebPreview", true).toBool(); } inline void enableWebPreview(bool enabled) { setLocalValue("ShowWebPreview", enabled); } -}; + inline QString timestampFormatString() { return localValue("TimestampFormat", "[hh:mm:ss]").toString(); } + inline void setTimestampFormatString(const QString &format) { setLocalValue("TimestampFormat", format); } +}; +Q_DECLARE_METATYPE(ChatViewSettings::OperationMode); #endif //CHATVIEWSETTINGS_H