/***************************************************************************
- * Copyright (C) 2005-2015 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 *
#include "syncableobject.h"
+#include "bufferinfo.h"
#include "types.h"
class BufferViewConfig : public SyncableObject
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(bool showSearch READ showSearch WRITE setShowSearch)
public :
BufferViewConfig(int bufferViewId, QObject *parent = 0);
inline bool hideInactiveNetworks() const { return _hideInactiveNetworks; }
void setHideInactiveNetworks(bool hideInactiveNetworks);
+ inline bool showSearch() const { return _showSearch; }
+ void setShowSearch(bool showSearch);
+
virtual inline void requestSetBufferViewName(const QString &bufferViewName) { REQUEST(ARG(bufferViewName)) }
const QList<BufferId> &bufferList() const { return _buffers; }
// 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;
+ 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<BufferId> _buffers;
QSet<BufferId> _removedBuffers;
QSet<BufferId> _temporarilyRemovedBuffers;