refs #513 Make plugin selection persistent

* Saved listeners are started on application startup
* CVariant has support for QStringList
This commit is contained in:
Michał Garapich
2016-01-03 13:42:10 +01:00
parent f4eadddee7
commit 1a3e610cbf
9 changed files with 92 additions and 18 deletions

View File

@@ -39,6 +39,7 @@ namespace BlackGui
pw->setLayout(layout);
QCheckBox *cb = new QCheckBox(name);
cb->setObjectName(identifier);
cb->setProperty("pluginIdentifier", identifier);
connect(cb, &QCheckBox::stateChanged, this, &CPluginSelector::ps_handlePluginStateChange);
if (enabled)
@@ -71,6 +72,13 @@ namespace BlackGui
this->layout()->addWidget(pw);
}
void CPluginSelector::setEnabled(const QString &identifier, bool enabled)
{
QCheckBox* cb = findChild<QCheckBox *>(identifier);
Q_ASSERT(cb);
cb->setChecked(enabled);
}
void CPluginSelector::ps_handlePluginStateChange()
{
QCheckBox *cb = qobject_cast<QCheckBox*>(sender());