X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferviewconfig.h;h=2e2a9aa604e9691b2c94bde7743f65b06480d5d5;hp=d728df5601192c50798b85637374866cf071aa36;hb=f2e4609f070221a010eef8be98524c5ce88d228b;hpb=4b600109a862705eaf44e59ca7bddb56b0663732 diff --git a/src/common/bufferviewconfig.h b/src/common/bufferviewconfig.h index d728df56..2e2a9aa6 100644 --- a/src/common/bufferviewconfig.h +++ b/src/common/bufferviewconfig.h @@ -31,9 +31,14 @@ class BufferViewConfig : public SyncableObject { Q_PROPERTY(NetworkId networkId READ networkId WRITE setNetworkId) Q_PROPERTY(bool addNewBuffersAutomatically READ addNewBuffersAutomatically WRITE setAddNewBuffersAutomatically) Q_PROPERTY(bool sortAlphabetically READ sortAlphabetically WRITE setSortAlphabetically) + Q_PROPERTY(bool hideInactiveBuffers READ hideInactiveBuffers WRITE setHideInactiveBuffers) + Q_PROPERTY(int allowedBufferTypes READ allowedBufferTypes WRITE setAllowedBufferTypes) + Q_PROPERTY(int minimumActivity READ minimumActivity WRITE setMinimumActivity) public: BufferViewConfig(int bufferViewId, QObject *parent = 0); + BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = 0); + public slots: inline int bufferViewId() const { return _bufferViewId; } @@ -50,14 +55,46 @@ public slots: inline bool sortAlphabetically() const { return _sortAlphabetically; } void setSortAlphabetically(bool sortAlphabetically); + inline int allowedBufferTypes() const { return _allowedBufferTypes; } + void setAllowedBufferTypes(int bufferTypes); + + inline int minimumActivity() const { return _minimumActivity; } + void setMinimumActivity(int activity); + + inline bool hideInactiveBuffers() const { return _hideInactiveBuffers; } + void setHideInactiveBuffers(bool hideInactiveBuffers); + virtual inline void requestSetBufferViewName(const QString &bufferViewName) { emit setBufferViewNameRequested(bufferViewName); } + const QList &bufferList() const { return _buffers; } + QVariantList initBufferList() const; + void initSetBufferList(const QVariantList &buffers); + void initSetBufferList(const QList &buffers); + + void addBuffer(const BufferId &bufferId, int pos); + virtual inline void requestAddBuffer(const BufferId &bufferId, int pos) { emit addBufferRequested(bufferId, pos); } + void moveBuffer(const BufferId &bufferId, int pos); + virtual inline void requestMoveBuffer(const BufferId &bufferId, int pos) { emit moveBufferRequested(bufferId, pos); } + void removeBuffer(const BufferId &bufferId); + virtual inline void requestRemoveBuffer(const BufferId &bufferId) { emit removeBufferRequested(bufferId); } + signals: void bufferViewNameSet(const QString &bufferViewName); void networkIdSet(const NetworkId &networkId); void addNewBuffersAutomaticallySet(bool addNewBuffersAutomatically); void sortAlphabeticallySet(bool sortAlphabetically); + void allowedBufferTypesSet(int allowedBufferTypes); + void minimumActivitySet(int activity); + void hideInactiveBuffersSet(bool hideInactiveBuffers); + void bufferListSet(); + void bufferAdded(const BufferId &bufferId, int pos); + void addBufferRequested(const BufferId &bufferId, int pos); + void bufferMoved(const BufferId &bufferId, int pos); + void moveBufferRequested(const BufferId &bufferId, int pos); + void bufferRemoved(const BufferId &bufferId); + void removeBufferRequested(const BufferId &bufferId); + void setBufferViewNameRequested(const QString &bufferViewName); private: @@ -66,6 +103,10 @@ private: NetworkId _networkId; bool _addNewBuffersAutomatically; bool _sortAlphabetically; + bool _hideInactiveBuffers; + int _allowedBufferTypes; + int _minimumActivity; + QList _buffers; }; #endif // BUFFERVIEWCONFIG_H