File indexing completed on 2024-05-12 17:18:54
0001 /* 0002 * SPDX-FileCopyrightText: 2009 Peter Penz <peter.penz19@gmail.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #include "kcmdolphinnavigation.h" 0008 0009 #include "settings/navigation/navigationsettingspage.h" 0010 #include <kconfigwidgets_version.h> 0011 0012 #include <KPluginFactory> 0013 0014 #include <QVBoxLayout> 0015 0016 K_PLUGIN_CLASS_WITH_JSON(DolphinNavigationConfigModule, "kcmdolphinnavigation.json") 0017 0018 DolphinNavigationConfigModule::DolphinNavigationConfigModule(QObject *parent) 0019 : KCModule(parent) 0020 , m_navigation(nullptr) 0021 { 0022 setButtons(KCModule::Default | KCModule::Help | KCModule::Apply); 0023 0024 QVBoxLayout *topLayout = new QVBoxLayout(widget()); 0025 topLayout->setContentsMargins(0, 0, 0, 0); 0026 0027 m_navigation = new NavigationSettingsPage(widget()); 0028 connect(m_navigation, &NavigationSettingsPage::changed, this, &DolphinNavigationConfigModule::markAsChanged); 0029 topLayout->addWidget(m_navigation, 0, {}); 0030 } 0031 0032 DolphinNavigationConfigModule::~DolphinNavigationConfigModule() 0033 { 0034 } 0035 0036 void DolphinNavigationConfigModule::save() 0037 { 0038 m_navigation->applySettings(); 0039 } 0040 0041 void DolphinNavigationConfigModule::defaults() 0042 { 0043 m_navigation->restoreDefaults(); 0044 } 0045 0046 #include "kcmdolphinnavigation.moc" 0047 0048 #include "moc_kcmdolphinnavigation.cpp"