Use NewStuff Elements
This commit is contained in:
parent
83a036e9d4
commit
cd4bdaa8fe
2 changed files with 7 additions and 11 deletions
|
@ -27,7 +27,7 @@
|
||||||
#include <KLocalizedString>
|
#include <KLocalizedString>
|
||||||
#include <KPluginFactory>
|
#include <KPluginFactory>
|
||||||
#include <KTitleWidget>
|
#include <KTitleWidget>
|
||||||
#include <KNewStuff3/KNS3/QtQuickDialogWrapper>
|
#include <KNS3/Button>
|
||||||
// Plasma
|
// Plasma
|
||||||
#include <KPackage/Package>
|
#include <KPackage/Package>
|
||||||
#include <KPackage/PackageLoader>
|
#include <KPackage/PackageLoader>
|
||||||
|
@ -58,8 +58,12 @@ KWinTabBoxConfig::KWinTabBoxConfig(QWidget* parent, const QVariantList& args)
|
||||||
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
|
tabWidget->addTab(m_primaryTabBoxUi, i18n("Main"));
|
||||||
tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative"));
|
tabWidget->addTab(m_alternativeTabBoxUi, i18n("Alternative"));
|
||||||
|
|
||||||
QPushButton* ghnsButton = new QPushButton(QIcon::fromTheme(QStringLiteral("get-hot-new-stuff")), i18n("Get New Task Switchers..."));
|
KNS3::Button *ghnsButton = new KNS3::Button(i18n("Get New Task Switchers..."), QStringLiteral("kwinswitcher.knsrc"), this);
|
||||||
connect(ghnsButton, &QAbstractButton::clicked, this, &KWinTabBoxConfig::slotGHNS);
|
connect(ghnsButton, &KNS3::Button::dialogFinished, this, [this] (auto changedEntries) {
|
||||||
|
if (!changedEntries.isEmpty()) {
|
||||||
|
initLayoutLists();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
QHBoxLayout* buttonBar = new QHBoxLayout();
|
QHBoxLayout* buttonBar = new QHBoxLayout();
|
||||||
QSpacerItem* buttonBarSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
QSpacerItem* buttonBarSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
|
@ -423,13 +427,6 @@ void KWinTabBoxConfig::configureEffectClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KWinTabBoxConfig::slotGHNS()
|
|
||||||
{
|
|
||||||
if (!KNS3::QtQuickDialogWrapper("kwinswitcher.knsrc").exec().isEmpty()) {
|
|
||||||
initLayoutLists();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
#include "main.moc"
|
#include "main.moc"
|
||||||
|
|
|
@ -42,7 +42,6 @@ private Q_SLOTS:
|
||||||
void updateUnmanagedState();
|
void updateUnmanagedState();
|
||||||
void updateDefaultIndicator();
|
void updateDefaultIndicator();
|
||||||
void configureEffectClicked();
|
void configureEffectClicked();
|
||||||
void slotGHNS();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void updateUiFromConfig(KWinTabBoxConfigForm *form, const TabBox::TabBoxSettings *config);
|
void updateUiFromConfig(KWinTabBoxConfigForm *form, const TabBox::TabBoxSettings *config);
|
||||||
|
|
Loading…
Reference in a new issue