mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:08:10 +08:00
Selector style
This commit is contained in:
@@ -28,7 +28,7 @@ namespace BlackGui
|
|||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
connect(m_detailsButtonMapper, qOverload<const QString &>(&QSignalMapper::mapped), this, &CPluginSelector::pluginDetailsRequested);
|
connect(m_detailsButtonMapper, qOverload<const QString &>(&QSignalMapper::mapped), this, &CPluginSelector::pluginDetailsRequested);
|
||||||
connect(m_configButtonMapper, qOverload<const QString &>(&QSignalMapper::mapped), this, &CPluginSelector::pluginConfigRequested);
|
connect(m_configButtonMapper, qOverload<const QString &>(&QSignalMapper::mapped), this, &CPluginSelector::pluginConfigRequested);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginSelector::addPlugin(const QString &identifier, const QString &name, bool hasConfig, bool enabled)
|
void CPluginSelector::addPlugin(const QString &identifier, const QString &name, bool hasConfig, bool enabled)
|
||||||
@@ -94,6 +94,6 @@ namespace BlackGui
|
|||||||
const QString identifier = cb->property("pluginIdentifier").toString();
|
const QString identifier = cb->property("pluginIdentifier").toString();
|
||||||
Q_ASSERT(!identifier.isEmpty());
|
Q_ASSERT(!identifier.isEmpty());
|
||||||
|
|
||||||
emit pluginStateChanged(identifier, enabled);
|
emit this->pluginStateChanged(identifier, enabled);
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -28,16 +28,6 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
signals:
|
|
||||||
//! Emitted when user enables/disables the particular plugin
|
|
||||||
void pluginStateChanged(const QString &identifier, bool enabled);
|
|
||||||
|
|
||||||
//! Emitted when user clicks the "Details" button
|
|
||||||
void pluginDetailsRequested(const QString &identifier);
|
|
||||||
|
|
||||||
//! Emitted when user clicks the "Settings" button
|
|
||||||
void pluginConfigRequested(const QString &identifier);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
explicit CPluginSelector(QWidget *parent = nullptr);
|
explicit CPluginSelector(QWidget *parent = nullptr);
|
||||||
@@ -52,6 +42,16 @@ namespace BlackGui
|
|||||||
//! Enables/disabled the given plugin.
|
//! Enables/disabled the given plugin.
|
||||||
void setEnabled(const QString &identifier, bool enabled);
|
void setEnabled(const QString &identifier, bool enabled);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
//! Emitted when user enables/disables the particular plugin
|
||||||
|
void pluginStateChanged(const QString &identifier, bool enabled);
|
||||||
|
|
||||||
|
//! Emitted when user clicks the "Details" button
|
||||||
|
void pluginDetailsRequested(const QString &identifier);
|
||||||
|
|
||||||
|
//! Emitted when user clicks the "Settings" button
|
||||||
|
void pluginConfigRequested(const QString &identifier);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handlePluginStateChange();
|
void handlePluginStateChange();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user