X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fclient%2Fbufferviewoverlay.h;fp=src%2Fclient%2Fbufferviewoverlay.h;h=d52871365ff1e108cd56c5a3fad705ff41c30297;hp=0000000000000000000000000000000000000000;hb=f48d855945219c3a1897a17bf15830dfee104f0b;hpb=b040ef84cdc254a0b1f083db3151f2724e45d210 diff --git a/src/client/bufferviewoverlay.h b/src/client/bufferviewoverlay.h new file mode 100644 index 00000000..d5287136 --- /dev/null +++ b/src/client/bufferviewoverlay.h @@ -0,0 +1,74 @@ +/*************************************************************************** + * 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. * + ***************************************************************************/ + +#ifndef BUFFERVIEWOVERLAY_H +#define BUFFERVIEWOVERLAY_H + +#include + +#include "types.h" + +class ClientBufferViewConfig; + +class BufferViewOverlay : public QObject { + Q_OBJECT + +public: + BufferViewOverlay(QObject *parent = 0); + +public slots: + void addView(int viewId); + void removeView(int viewId); + + // updates propagated from the actual views + void update(); + +signals: + void hasChanged(); + +protected: + virtual void customEvent(QEvent *event); + +private slots: + void viewInitialized(); + +private: + inline bool allNetworks() const { return _networkIds.contains(NetworkId()); } + + void updateHelper(); + bool _aboutToUpdate; + + QSet _bufferViewIds; + + QSet _networkIds; + + bool _addBuffersAutomatically; + bool _hideInactiveBuffers; + int _allowedBufferTypes; + int _minimumActivity; + + QSet _buffers; + QSet _removedBuffers; + QSet _tempRemovedBuffers; + + static const int _updateEventId; +}; + +#endif //BUFFERVIEWOVERLAY_H