mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Selector style
This commit is contained in:
committed by
Mat Sutcliffe
parent
d84ec65271
commit
6f29e1bfc8
@@ -28,7 +28,7 @@ namespace BlackGui
|
||||
setLayout(layout);
|
||||
|
||||
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)
|
||||
@@ -94,6 +94,6 @@ namespace BlackGui
|
||||
const QString identifier = cb->property("pluginIdentifier").toString();
|
||||
Q_ASSERT(!identifier.isEmpty());
|
||||
|
||||
emit pluginStateChanged(identifier, enabled);
|
||||
emit this->pluginStateChanged(identifier, enabled);
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -28,16 +28,6 @@ namespace BlackGui
|
||||
{
|
||||
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:
|
||||
//! Constructor
|
||||
explicit CPluginSelector(QWidget *parent = nullptr);
|
||||
@@ -52,6 +42,16 @@ namespace BlackGui
|
||||
//! Enables/disabled the given plugin.
|
||||
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:
|
||||
void handlePluginStateChange();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user