_addNewBuffersAutomatically(true),
_sortAlphabetically(true),
_hideInactiveBuffers(false),
+ _hideInactiveNetworks(false),
_disableDecoration(false),
_allowedBufferTypes(BufferInfo::StatusBuffer | BufferInfo::ChannelBuffer | BufferInfo::QueryBuffer | BufferInfo::GroupBuffer),
_minimumActivity(0)
emit configChanged();
}
+void BufferViewConfig::setHideInactiveNetworks(bool hideInactiveNetworks)
+{
+ if (_hideInactiveNetworks == hideInactiveNetworks)
+ return;
+
+ _hideInactiveNetworks = hideInactiveNetworks;
+ SYNC(ARG(hideInactiveNetworks))
+ emit configChanged();
+}
+
QVariantList BufferViewConfig::initBufferList() const
{
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)
inline bool hideInactiveBuffers() const { return _hideInactiveBuffers; }
void setHideInactiveBuffers(bool hideInactiveBuffers);
+ inline bool hideInactiveNetworks() const { return _hideInactiveNetworks; }
+ void setHideInactiveNetworks(bool hideInactiveNetworks);
+
virtual inline void requestSetBufferViewName(const QString &bufferViewName) { REQUEST(ARG(bufferViewName)) }
const QList<BufferId> &bufferList() const { return _buffers; }
bool _addNewBuffersAutomatically;
bool _sortAlphabetically;
bool _hideInactiveBuffers;
+ bool _hideInactiveNetworks;
bool _disableDecoration;
int _allowedBufferTypes;
int _minimumActivity;
connect(ui.addNewBuffersAutomatically, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.sortAlphabetically, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
connect(ui.hideInactiveBuffers, SIGNAL(clicked(bool)), this, SLOT(widgetHasChanged()));
+ 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()));
ui.addNewBuffersAutomatically->setChecked(config->addNewBuffersAutomatically());
ui.sortAlphabetically->setChecked(config->sortAlphabetically());
ui.hideInactiveBuffers->setChecked(config->hideInactiveBuffers());
+ ui.hideInactiveNetworks->setChecked(config->hideInactiveNetworks());
int networkIndex = 0;
for (int i = 0; i < ui.networkSelector->count(); i++) {
config->setAddNewBuffersAutomatically(ui.addNewBuffersAutomatically->isChecked());
config->setSortAlphabetically(ui.sortAlphabetically->isChecked());
config->setHideInactiveBuffers(ui.hideInactiveBuffers->isChecked());
+ config->setHideInactiveNetworks(ui.hideInactiveNetworks->isChecked());
config->setNetworkId(ui.networkSelector->itemData(ui.networkSelector->currentIndex()).value<NetworkId>());
int minimumActivity = 0;
</property>
</widget>
</item>
+ <item>
+ <widget class="QCheckBox" name="hideInactiveNetworks">
+ <property name="text">
+ <string>Hide inactive networks</string>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QCheckBox" name="addNewBuffersAutomatically">
<property name="text">
if (!config())
return true;
+ if (config()->hideInactiveNetworks() && !(sourceModel()->data(source_index, NetworkModel::ItemActiveRole).toBool())) {
+ return false;
+ }
+
if (!config()->networkId().isValid()) {
return true;
}