blob: a730dfcfef16a0afbf32c91e34d5aa5967c93f40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
/*
* SPDX-FileCopyrightText: 2009 Peter Penz <[email protected]>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "kcmdolphincontextmenu.h"
#include "settings/contextmenu/contextmenusettingspage.h"
#include <kconfigwidgets_version.h>
#include <KPluginFactory>
#include <KPluginLoader>
#include <QVBoxLayout>
K_PLUGIN_FACTORY(KCMDolphinContextMenuConfigFactory, registerPlugin<DolphinContextMenuConfigModule>(QStringLiteral("dolphincontextmenu"));)
DolphinContextMenuConfigModule::DolphinContextMenuConfigModule(QWidget* parent, const QVariantList& args) :
KCModule(parent, args),
m_contextMenu(nullptr)
{
setButtons(KCModule::Default | KCModule::Help);
QVBoxLayout* topLayout = new QVBoxLayout(this);
topLayout->setContentsMargins(0, 0, 0, 0);
m_contextMenu = new ContextMenuSettingsPage(this);
connect(m_contextMenu, &ContextMenuSettingsPage::changed, this, &DolphinContextMenuConfigModule::markAsChanged);
topLayout->addWidget(m_contextMenu, 0, {});
}
DolphinContextMenuConfigModule::~DolphinContextMenuConfigModule()
{
}
void DolphinContextMenuConfigModule::save()
{
m_contextMenu->applySettings();
}
void DolphinContextMenuConfigModule::defaults()
{
m_contextMenu->restoreDefaults();
}
#include "kcmdolphincontextmenu.moc"
|