#include "common-export.h"
-#include "syncableobject.h"
-
#include "bufferinfo.h"
+#include "syncableobject.h"
#include "types.h"
class COMMON_EXPORT BufferViewConfig : public SyncableObject
Q_PROPERTY(int minimumActivity READ minimumActivity WRITE setMinimumActivity)
Q_PROPERTY(bool showSearch READ showSearch WRITE setShowSearch)
-public :
- BufferViewConfig(int bufferViewId, QObject *parent = nullptr);
- BufferViewConfig(int bufferViewId, const QVariantMap &properties, QObject *parent = nullptr);
+public:
+ BufferViewConfig(int bufferViewId, QObject* parent = nullptr);
+ BufferViewConfig(int bufferViewId, const QVariantMap& properties, QObject* parent = nullptr);
public slots:
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 showSearch() const { return _showSearch; }
void setShowSearch(bool showSearch);
- virtual inline void requestSetBufferViewName(const QString &bufferViewName) { REQUEST(ARG(bufferViewName)) }
+ virtual inline void requestSetBufferViewName(const QString& bufferViewName) { REQUEST(ARG(bufferViewName)) }
- const QList<BufferId> &bufferList() const { return _buffers; }
- const QSet<BufferId> &removedBuffers() const { return _removedBuffers; }
- const QSet<BufferId> &temporarilyRemovedBuffers() const { return _temporarilyRemovedBuffers; }
+ const QList<BufferId>& bufferList() const { return _buffers; }
+ const QSet<BufferId>& removedBuffers() const { return _removedBuffers; }
+ const QSet<BufferId>& temporarilyRemovedBuffers() const { return _temporarilyRemovedBuffers; }
QVariantList initBufferList() const;
- void initSetBufferList(const QVariantList &buffers);
- void initSetBufferList(const QList<BufferId> &buffers);
+ void initSetBufferList(const QVariantList& buffers);
+ void initSetBufferList(const QList<BufferId>& buffers);
QVariantList initRemovedBuffers() const;
- void initSetRemovedBuffers(const QVariantList &buffers);
+ void initSetRemovedBuffers(const QVariantList& buffers);
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 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 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 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 bufferPermanentlyRemoved(const BufferId &bufferId);
-// void removeBufferRequested(const BufferId &bufferId);
-// void removeBufferPermanentlyRequested(const BufferId &bufferId);
-
-// void setBufferViewNameRequested(const QString &bufferViewName);
+ 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 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 bufferPermanentlyRemoved(const BufferId& bufferId);
+ // void removeBufferRequested(const BufferId &bufferId);
+ // void removeBufferPermanentlyRequested(const BufferId &bufferId);
+
+ // void setBufferViewNameRequested(const QString &bufferViewName);
private:
- 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)
+ 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
+ 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<BufferId> _buffers;
QSet<BufferId> _removedBuffers;