Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinscripts/module.cpp
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Line(s) | 47 | { | |||
---|---|---|---|---|---|
60 | 60 | | |||
61 | ui->ghnsButton->setConfigFile(QStringLiteral("kwinscripts.knsrc")); | 61 | ui->ghnsButton->setConfigFile(QStringLiteral("kwinscripts.knsrc")); | ||
62 | connect(ui->ghnsButton, &KNS3::Button::dialogFinished, this, [this](const KNS3::Entry::List &changedEntries) { | 62 | connect(ui->ghnsButton, &KNS3::Button::dialogFinished, this, [this](const KNS3::Entry::List &changedEntries) { | ||
63 | if (!changedEntries.isEmpty()) { | 63 | if (!changedEntries.isEmpty()) { | ||
64 | updateListViewContents(); | 64 | updateListViewContents(); | ||
65 | } | 65 | } | ||
66 | }); | 66 | }); | ||
67 | 67 | | |||
68 | connect(ui->scriptSelector, SIGNAL(changed(bool)), this, SLOT(changed())); | 68 | connect(ui->scriptSelector, &KPluginSelector::changed, this, qOverload<bool>(&KCModule::changed)); | ||
69 | connect(ui->importScriptButton, SIGNAL(clicked()), SLOT(importScript())); | 69 | connect(ui->scriptSelector, &KPluginSelector::defaulted, this, qOverload<bool>(&KCModule::defaulted)); | ||
70 | connect(ui->importScriptButton, &QPushButton::clicked, this, &Module::importScript); | ||||
70 | 71 | | |||
71 | updateListViewContents(); | 72 | updateListViewContents(); | ||
72 | } | 73 | } | ||
73 | 74 | | |||
74 | Module::~Module() | 75 | Module::~Module() | ||
75 | { | 76 | { | ||
76 | delete ui; | 77 | delete ui; | ||
77 | } | 78 | } | ||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 128 | { | |||
135 | QList<KPluginInfo> scriptinfos = KPluginInfo::fromMetaData(scripts.toVector()); | 136 | QList<KPluginInfo> scriptinfos = KPluginInfo::fromMetaData(scripts.toVector()); | ||
136 | 137 | | |||
137 | ui->scriptSelector->addPlugins(scriptinfos, KPluginSelector::ReadConfigFile, QString(), QString(), m_kwinConfig); | 138 | ui->scriptSelector->addPlugins(scriptinfos, KPluginSelector::ReadConfigFile, QString(), QString(), m_kwinConfig); | ||
138 | } | 139 | } | ||
139 | 140 | | |||
140 | void Module::defaults() | 141 | void Module::defaults() | ||
141 | { | 142 | { | ||
142 | ui->scriptSelector->defaults(); | 143 | ui->scriptSelector->defaults(); | ||
143 | emit changed(true); | | |||
144 | } | 144 | } | ||
145 | 145 | | |||
146 | void Module::load() | 146 | void Module::load() | ||
147 | { | 147 | { | ||
148 | updateListViewContents(); | 148 | updateListViewContents(); | ||
149 | ui->scriptSelector->load(); | 149 | ui->scriptSelector->load(); | ||
150 | 150 | | |||
151 | emit changed(false); | 151 | emit changed(false); | ||
Show All 11 Lines |