]> cloud.milkyroute.net Git - dolphin.git/blob - src/settings/kcm/kcmdolphinservices.cpp
Re-allow to paste files via context menu
[dolphin.git] / src / settings / kcm / kcmdolphinservices.cpp
1 /*
2 * SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz19@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7 #include "kcmdolphinservices.h"
8
9 #include "settings/services/servicessettingspage.h"
10
11 #include <kconfigwidgets_version.h>
12 #include <KPluginFactory>
13 #include <KPluginLoader>
14
15 #include <QVBoxLayout>
16
17 K_PLUGIN_FACTORY(KCMDolphinServicesConfigFactory, registerPlugin<DolphinServicesConfigModule>(QStringLiteral("dolphinservices"));)
18
19 DolphinServicesConfigModule::DolphinServicesConfigModule(QWidget* parent, const QVariantList& args) :
20 KCModule(parent, args),
21 m_services(nullptr)
22 {
23 setButtons(KCModule::Default | KCModule::Help);
24
25 QVBoxLayout* topLayout = new QVBoxLayout(this);
26 topLayout->setContentsMargins(0, 0, 0, 0);
27
28 m_services = new ServicesSettingsPage(this);
29 connect(m_services, &ServicesSettingsPage::changed, this, &DolphinServicesConfigModule::markAsChanged);
30 topLayout->addWidget(m_services, 0, {});
31 }
32
33 DolphinServicesConfigModule::~DolphinServicesConfigModule()
34 {
35 }
36
37 void DolphinServicesConfigModule::save()
38 {
39 m_services->applySettings();
40 }
41
42 void DolphinServicesConfigModule::defaults()
43 {
44 m_services->restoreDefaults();
45 }
46
47 #include "kcmdolphinservices.moc"