X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferviewconfig.h;h=ecf92ebf4c5abd22b5aca624baad3b04fa2045b6;hp=75ca9cf64d03f726a1764878636a941189c3c23a;hb=db5fe27be95654222c02ccd0e5d365b90ad93630;hpb=f6b9eeda207d42c99fc3e9085631722cf2ec83dc diff --git a/src/common/bufferviewconfig.h b/src/common/bufferviewconfig.h index 75ca9cf6..ecf92ebf 100644 --- a/src/common/bufferviewconfig.h +++ b/src/common/bufferviewconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2014 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * 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. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifndef BUFFERVIEWCONFIG_H @@ -25,114 +25,120 @@ #include "types.h" -class BufferViewConfig : public SyncableObject { - SYNCABLE_OBJECT - Q_OBJECT +class BufferViewConfig : public SyncableObject +{ + SYNCABLE_OBJECT + Q_OBJECT - Q_PROPERTY(QString bufferViewName READ bufferViewName WRITE setBufferViewName) - 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(bool disableDecoration READ disableDecoration WRITE setDisableDecoration) - Q_PROPERTY(int allowedBufferTypes READ allowedBufferTypes WRITE setAllowedBufferTypes) - Q_PROPERTY(int minimumActivity READ minimumActivity WRITE setMinimumActivity) + Q_PROPERTY(QString bufferViewName READ bufferViewName WRITE setBufferViewName) + 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(bool hideInactiveNetworks READ hideInactiveNetworks WRITE setHideInactiveNetworks) + Q_PROPERTY(bool disableDecoration READ disableDecoration WRITE setDisableDecoration) + 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 : + BufferViewConfig(int bufferViewId, QObject *parent = 0); + BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = 0); - inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; } + inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; } public slots: - inline int bufferViewId() const { return _bufferViewId; } + inline int bufferViewId() const { return _bufferViewId; } - inline const QString &bufferViewName() const { return _bufferViewName; } - void setBufferViewName(const QString &bufferViewName); + inline const QString &bufferViewName() const { return _bufferViewName; } + void setBufferViewName(const QString &bufferViewName); - inline const NetworkId &networkId() const { return _networkId; } - void setNetworkId(const NetworkId &networkId); + inline const NetworkId &networkId() const { return _networkId; } + void setNetworkId(const NetworkId &networkId); - inline bool addNewBuffersAutomatically() const { return _addNewBuffersAutomatically; } - void setAddNewBuffersAutomatically(bool addNewBuffersAutomatically); + inline bool addNewBuffersAutomatically() const { return _addNewBuffersAutomatically; } + void setAddNewBuffersAutomatically(bool addNewBuffersAutomatically); - inline bool sortAlphabetically() const { return _sortAlphabetically; } - void setSortAlphabetically(bool sortAlphabetically); + inline bool sortAlphabetically() const { return _sortAlphabetically; } + void setSortAlphabetically(bool sortAlphabetically); - inline bool disableDecoration() const { return _disableDecoration; } - void setDisableDecoration(bool disableDecoration); + inline bool disableDecoration() const { return _disableDecoration; } + void setDisableDecoration(bool disableDecoration); - inline int allowedBufferTypes() const { return _allowedBufferTypes; } - void setAllowedBufferTypes(int bufferTypes); + inline int allowedBufferTypes() const { return _allowedBufferTypes; } + void setAllowedBufferTypes(int bufferTypes); - inline int minimumActivity() const { return _minimumActivity; } - void setMinimumActivity(int activity); + inline int minimumActivity() const { return _minimumActivity; } + void setMinimumActivity(int activity); - inline bool hideInactiveBuffers() const { return _hideInactiveBuffers; } - void setHideInactiveBuffers(bool hideInactiveBuffers); + inline bool hideInactiveBuffers() const { return _hideInactiveBuffers; } + void setHideInactiveBuffers(bool hideInactiveBuffers); - virtual inline void requestSetBufferViewName(const QString &bufferViewName) { REQUEST(ARG(bufferViewName)) } + inline bool hideInactiveNetworks() const { return _hideInactiveNetworks; } + void setHideInactiveNetworks(bool hideInactiveNetworks); - const QList &bufferList() const { return _buffers; } - const QSet &removedBuffers() const { return _removedBuffers; } - const QSet &temporarilyRemovedBuffers() const { return _temporarilyRemovedBuffers; } + virtual inline void requestSetBufferViewName(const QString &bufferViewName) { REQUEST(ARG(bufferViewName)) } - QVariantList initBufferList() const; - void initSetBufferList(const QVariantList &buffers); - void initSetBufferList(const QList &buffers); + const QList &bufferList() const { return _buffers; } + const QSet &removedBuffers() const { return _removedBuffers; } + const QSet &temporarilyRemovedBuffers() const { return _temporarilyRemovedBuffers; } - QVariantList initRemovedBuffers() const; - void initSetRemovedBuffers(const QVariantList &buffers); + QVariantList initBufferList() const; + void initSetBufferList(const QVariantList &buffers); + void initSetBufferList(const QList &buffers); - QVariantList initTemporarilyRemovedBuffers() const; - void initSetTemporarilyRemovedBuffers(const QVariantList &buffers); + QVariantList initRemovedBuffers() const; + void initSetRemovedBuffers(const QVariantList &buffers); - void addBuffer(const BufferId &bufferId, int pos); - virtual inline void requestAddBuffer(const BufferId &bufferId, int pos) { REQUEST(ARG(bufferId), ARG(pos)) } - void moveBuffer(const BufferId &bufferId, int pos); - virtual inline void requestMoveBuffer(const BufferId &bufferId, int pos) { REQUEST(ARG(bufferId), ARG(pos)) } - void removeBuffer(const BufferId &bufferId); - virtual inline void requestRemoveBuffer(const BufferId &bufferId) { REQUEST(ARG(bufferId)) } - void removeBufferPermanently(const BufferId &bufferId); - virtual inline void requestRemoveBufferPermanently(const BufferId &bufferId) { REQUEST(ARG(bufferId)) } + QVariantList initTemporarilyRemovedBuffers() const; + void initSetTemporarilyRemovedBuffers(const QVariantList &buffers); + void addBuffer(const BufferId &bufferId, int pos); + virtual inline void requestAddBuffer(const BufferId &bufferId, int pos) { REQUEST(ARG(bufferId), ARG(pos)) } + void moveBuffer(const BufferId &bufferId, int pos); + virtual inline void requestMoveBuffer(const BufferId &bufferId, int pos) { REQUEST(ARG(bufferId), ARG(pos)) } + void removeBuffer(const BufferId &bufferId); + virtual inline void requestRemoveBuffer(const BufferId &bufferId) { REQUEST(ARG(bufferId)) } + void removeBufferPermanently(const BufferId &bufferId); + virtual inline void requestRemoveBufferPermanently(const BufferId &bufferId) { REQUEST(ARG(bufferId)) } signals: - void bufferViewNameSet(const QString &bufferViewName); // invalidate - void configChanged(); - void networkIdSet(const NetworkId &networkId); + void bufferViewNameSet(const QString &bufferViewName); // invalidate + void configChanged(); + void networkIdSet(const NetworkId &networkId); // void addNewBuffersAutomaticallySet(bool addNewBuffersAutomatically); // invalidate // void sortAlphabeticallySet(bool sortAlphabetically); // invalidate // // void disableDecorationSet(bool disableDecoration); // invalidate // void allowedBufferTypesSet(int allowedBufferTypes); // invalidate // void minimumActivitySet(int activity); // invalidate // void hideInactiveBuffersSet(bool hideInactiveBuffers); // invalidate - void bufferListSet(); // invalidate + void bufferListSet(); // invalidate - void bufferAdded(const BufferId &bufferId, int pos); + void bufferAdded(const BufferId &bufferId, int pos); // void addBufferRequested(const BufferId &bufferId, int pos); - void bufferMoved(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 bufferPermanentlyRemoved(const BufferId &bufferId); + void bufferRemoved(const BufferId &bufferId); + void bufferPermanentlyRemoved(const BufferId &bufferId); // void removeBufferRequested(const BufferId &bufferId); // void removeBufferPermanentlyRequested(const BufferId &bufferId); // void setBufferViewNameRequested(const QString &bufferViewName); private: - int _bufferViewId; - QString _bufferViewName; - NetworkId _networkId; - bool _addNewBuffersAutomatically; - bool _sortAlphabetically; - bool _hideInactiveBuffers; - bool _disableDecoration; - int _allowedBufferTypes; - int _minimumActivity; - QList _buffers; - QSet _removedBuffers; - QSet _temporarilyRemovedBuffers; + int _bufferViewId; + QString _bufferViewName; + NetworkId _networkId; + bool _addNewBuffersAutomatically; + bool _sortAlphabetically; + bool _hideInactiveBuffers; + bool _hideInactiveNetworks; + bool _disableDecoration; + int _allowedBufferTypes; + int _minimumActivity; + QList _buffers; + QSet _removedBuffers; + QSet _temporarilyRemovedBuffers; }; + #endif // BUFFERVIEWCONFIG_H