X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchatmonitorfilter.h;h=945e4018063af207067f4416a65d3ba68f361f7b;hp=a27d3e5d051af214ceaeaecd1ce5d82bfdcbe13e;hb=a4cba7a7497d8b71942d5f5e81ef3c04f5c6bad5;hpb=9d52e49424afb60c2f28073051c1dbf25f47adec diff --git a/src/qtui/chatmonitorfilter.h b/src/qtui/chatmonitorfilter.h index a27d3e5d..945e4018 100644 --- a/src/qtui/chatmonitorfilter.h +++ b/src/qtui/chatmonitorfilter.h @@ -1,22 +1,22 @@ /*************************************************************************** -* Copyright (C) 2005-08 by the Quassel Project * -* devel@quassel-irc.org * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) version 3. * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU General Public License * -* along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ + * Copyright (C) 2005-2014 by the Quassel Project * + * devel@quassel-irc.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) version 3. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ #ifndef CHATMONITORFILTER_H_ #define CHATMONITORFILTER_H_ @@ -24,35 +24,52 @@ #include #include "messagefilter.h" -#include "qtuisettings.h" -class ChatMonitorFilter : public MessageFilter { - Q_OBJECT +class ChatMonitorFilter : public MessageFilter +{ + Q_OBJECT public: - enum SenderFields { - NoField = 0x00, - NetworkField = 0x01, - BufferField = 0x02, - SenderField = 0x04, - AllFields = 0xFF - }; + enum SenderFields { + NoField = 0x00, + NetworkField = 0x01, + BufferField = 0x02, + SenderField = 0x04, + AllFields = 0xff + }; - ChatMonitorFilter(MessageModel *model, QObject *parent = 0); + ChatMonitorFilter(MessageModel *model, QObject *parent = 0); - virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; - virtual QString idString() const { return "ChatMonitor"; } - virtual QVariant data(const QModelIndex &index, int role) const; + virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; + virtual QString idString() const { return "ChatMonitor"; } + virtual QVariant data(const QModelIndex &index, int role) const; - inline QString showFieldSettingId() const { return QString("ChatView/%1/showFields").arg(idString()); } - inline int showFields() const { return QtUiSettings().value(showFieldSettingId(), AllFields).toInt(); } - void addShowField(int field); - void removeShowField(int field); + int showFields() const { return _showFields; } + bool showOwnMessages() const { return _showOwnMessages; } -private: - QDateTime _initTime; +public slots: + void addShowField(int field); + void removeShowField(int field); + void setShowOwnMessages(bool show); + +private slots: + void showFieldsSettingChanged(const QVariant &newValue); + void showOwnMessagesSettingChanged(const QVariant &newValue); + void showHighlightsSettingChanged(const QVariant &newValue); + void operationModeSettingChanged(const QVariant &newValue); + void buffersSettingChanged(const QVariant &newValue); + void showBacklogSettingChanged(const QVariant &newValue); + void includeReadSettingChanged(const QVariant &newValue); - void showFieldSettingsChanged(); +private: + int _showFields; + bool _showOwnMessages; + QList _bufferIds; + bool _showHighlights; + int _operationMode; + bool _showBacklog; + bool _includeRead; }; + #endif