_hideInactiveNetworks(false),
_disableDecoration(false),
_allowedBufferTypes(BufferInfo::StatusBuffer | BufferInfo::ChannelBuffer | BufferInfo::QueryBuffer | BufferInfo::GroupBuffer),
- _minimumActivity(0)
+ _minimumActivity(0),
+ _showSearch(true)
{
setObjectName(QString::number(bufferViewId));
}
emit configChanged();
}
+void BufferViewConfig::setShowSearch(bool showSearch) {
+ if (_showSearch == showSearch) {
+ return;
+ }
+
+ _showSearch = showSearch;
+ SYNC(ARG(showSearch))
+ emit configChanged();
+}
+
QVariantList BufferViewConfig::initBufferList() const
{
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; }
bool _disableDecoration;
int _allowedBufferTypes;
int _minimumActivity;
+ bool _showSearch;
QList<BufferId> _buffers;
QSet<BufferId> _removedBuffers;
QSet<BufferId> _temporarilyRemovedBuffers;
connect(ui.hideInactiveNetworks, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged()));
connect(ui.minimumActivitySelector, SIGNAL(currentIndexChanged(int)), this, SLOT(widgetHasChanged()));
+ connect(ui.showSearch, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.networkSelector, SIGNAL(currentIndexChanged(int)), this, SLOT(enableStatusBuffers(int)));
}
ui.sortAlphabetically->setChecked(config->sortAlphabetically());
ui.hideInactiveBuffers->setChecked(config->hideInactiveBuffers());
ui.hideInactiveNetworks->setChecked(config->hideInactiveNetworks());
+ ui.showSearch->setChecked(config->showSearch());
int networkIndex = 0;
for (int i = 0; i < ui.networkSelector->count(); i++) {
config->setHideInactiveBuffers(ui.hideInactiveBuffers->isChecked());
config->setHideInactiveNetworks(ui.hideInactiveNetworks->isChecked());
config->setNetworkId(ui.networkSelector->itemData(ui.networkSelector->currentIndex()).value<NetworkId>());
+ config->setShowSearch(ui.showSearch->isChecked());
int minimumActivity = 0;
if (ui.minimumActivitySelector->currentIndex() > 0)
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="showSearch">
+ <property name="text">
+ <string>Show search</string>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
toggleViewAction()->setData(config->bufferViewId());
setAllowedAreas(Qt::RightDockWidgetArea|Qt::LeftDockWidgetArea);
connect(config, SIGNAL(bufferViewNameSet(const QString &)), this, SLOT(bufferViewRenamed(const QString &)));
+ connect(config, SIGNAL(configChanged()), SLOT(configChanged()));
updateTitle();
_widget->setLayout(new QVBoxLayout);
private slots:
void bufferViewRenamed(const QString &newName);
void updateTitle();
+ void configChanged();
private:
QWidget *_childWidget;