X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fclient%2Fmessagefilter.h;h=60133d20ff6fc2215811225e726e88fb5ed458d4;hb=f824db0e31b54969e0b7fa0b5405b1e9173d482c;hp=9d17ddb11dbe18108d7ec8bd52f673545c7cb837;hpb=402f690fb8ca07adc2c063ba550d7e8fc0159ada;p=quassel.git diff --git a/src/client/messagefilter.h b/src/client/messagefilter.h index 9d17ddb1..60133d20 100644 --- a/src/client/messagefilter.h +++ b/src/client/messagefilter.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 * @@ -24,7 +24,9 @@ #include #include "bufferinfo.h" +#include "client.h" #include "messagemodel.h" +#include "networkmodel.h" #include "types.h" class MessageFilter : public QSortFilterProxyModel { @@ -41,24 +43,37 @@ public: inline bool isSingleBufferFilter() const { return _validBuffers.count() == 1; } BufferId singleBufferId() const { return *(_validBuffers.constBegin()); } inline bool containsBuffer(const BufferId &id) const { return _validBuffers.contains(id); } + inline QSet containedBuffers() const { return _validBuffers; } public slots: void messageTypeFilterChanged(); + void messageRedirectionChanged(); void requestBacklog(); protected: - const QString &bufferName() const; - BufferInfo::Type bufferType() const; + QString bufferName() const { return Client::networkModel()->bufferName(singleBufferId()); } + BufferInfo::Type bufferType() const { return Client::networkModel()->bufferType(singleBufferId()); } + NetworkId networkId() const { return Client::networkModel()->networkId(singleBufferId()); } private: void init(); QSet _validBuffers; - QSet _filteredQuitMsgs; + mutable QSet _redirectedMsgs; + QMultiHash _filteredQuitMsgs; int _messageTypeFilter; - QString _bufferName; - BufferInfo::Type _bufferType; + bool _userNoticesInDefaultBuffer; + bool _userNoticesInStatusBuffer; + bool _userNoticesInCurrentBuffer; + + bool _serverNoticesInDefaultBuffer; + bool _serverNoticesInStatusBuffer; + bool _serverNoticesInCurrentBuffer; + + bool _errorMsgsInDefaultBuffer; + bool _errorMsgsInStatusBuffer; + bool _errorMsgsInCurrentBuffer; }; #endif