2 * SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #include "kcmdolphinservices.h"
9 #include "settings/services/servicessettingspage.h"
11 #include <kconfigwidgets_version.h>
12 #include <KPluginFactory>
13 #include <KPluginLoader>
15 #include <QVBoxLayout>
17 K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory
, registerPlugin
<DolphinServicesConfigModule
>(QStringLiteral("dolphinservices"));)
19 DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget
* parent
, const QVariantList
& args
) :
20 KCModule(parent
, args
),
23 setButtons(KCModule::Default
| KCModule::Help
);
25 QVBoxLayout
* topLayout
= new QVBoxLayout(this);
26 topLayout
->setContentsMargins(0, 0, 0, 0);
28 m_services
= new ServicesSettingsPage(this);
29 connect(m_services
, &ServicesSettingsPage::changed
, this, &DolphinServicesConfigModule::markAsChanged
);
30 topLayout
->addWidget(m_services
, 0, {});
33 DolphinServicesConfigModule::~DolphinServicesConfigModule()
37 void DolphinServicesConfigModule::save()
39 m_services
->applySettings();
42 void DolphinServicesConfigModule::defaults()
44 m_services
->restoreDefaults();
47 #include "kcmdolphinservices.moc"