X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fbufferviewconfig.h;h=d2542e736de87b88dbc0e8e750183615fa2bc52f;hp=59164bb70a1c1fffbde43f8be76b2489f3817c37;hb=3e63cb8a6e83765069a45101b86ae9e21dcc57ad;hpb=3545504d0588f79ac92a7702c4cf78dc0adff05f diff --git a/src/common/bufferviewconfig.h b/src/common/bufferviewconfig.h index 59164bb7..d2542e73 100644 --- a/src/common/bufferviewconfig.h +++ b/src/common/bufferviewconfig.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,17 +18,17 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef BUFFERVIEWCONFIG_H -#define BUFFERVIEWCONFIG_H +#pragma once #include "syncableobject.h" +#include "bufferinfo.h" #include "types.h" class BufferViewConfig : public SyncableObject { - SYNCABLE_OBJECT Q_OBJECT + SYNCABLE_OBJECT Q_PROPERTY(QString bufferViewName READ bufferViewName WRITE setBufferViewName) Q_PROPERTY(NetworkId networkId READ networkId WRITE setNetworkId) @@ -42,11 +42,9 @@ class BufferViewConfig : public SyncableObject Q_PROPERTY(bool showSearch READ showSearch WRITE setShowSearch) public : - BufferViewConfig(int bufferViewId, QObject *parent = 0); + BufferViewConfig(int bufferViewId, QObject *parent = 0); BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = 0); - inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; } - public slots: inline int bufferViewId() const { return _bufferViewId; } @@ -129,21 +127,22 @@ signals: // void setBufferViewNameRequested(const QString &bufferViewName); private: - int _bufferViewId; - QString _bufferViewName; - NetworkId _networkId; - bool _addNewBuffersAutomatically; - bool _sortAlphabetically; - bool _hideInactiveBuffers; - bool _hideInactiveNetworks; - bool _disableDecoration; - int _allowedBufferTypes; - int _minimumActivity; - bool _showSearch; + int _bufferViewId = 0; ///< ID of the associated BufferView + QString _bufferViewName = {}; ///< Display name of the associated BufferView + NetworkId _networkId = {}; ///< Network ID this buffer belongs to + + bool _addNewBuffersAutomatically = true; ///< Automatically add new buffers when created + bool _sortAlphabetically = true; ///< Sort buffers alphabetically + bool _hideInactiveBuffers = false; ///< Hide buffers without activity + bool _hideInactiveNetworks = false; ///< Hide networks without activity + bool _disableDecoration = false; ///< Disable buffer decoration (not fully implemented) + /// Buffer types allowed within this view + int _allowedBufferTypes = (BufferInfo::StatusBuffer | BufferInfo::ChannelBuffer + | BufferInfo::QueryBuffer | BufferInfo::GroupBuffer); + int _minimumActivity = 0; ///< Minimum activity for a buffer to show + bool _showSearch = false; ///< Persistently show the buffer search UI + QList _buffers; QSet _removedBuffers; QSet _temporarilyRemovedBuffers; }; - - -#endif // BUFFERVIEWCONFIG_H