mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
refs #513 Make plugin selection persistent
* Saved listeners are started on application startup * CVariant has support for QStringList
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user