File indexing completed on 2024-11-10 04:57:02
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2009 Martin Gräßlin <mgraesslin@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 #include "magiclamp_config.h" 0010 0011 #include <config-kwin.h> 0012 0013 // KConfigSkeleton 0014 #include "magiclampconfig.h" 0015 0016 #include <kwineffects_interface.h> 0017 0018 #include <KPluginFactory> 0019 #include <kconfiggroup.h> 0020 0021 #include <QVBoxLayout> 0022 0023 K_PLUGIN_CLASS(KWin::MagicLampEffectConfig) 0024 0025 namespace KWin 0026 { 0027 0028 MagicLampEffectConfig::MagicLampEffectConfig(QObject *parent, const KPluginMetaData &data) 0029 : KCModule(parent, data) 0030 { 0031 m_ui.setupUi(widget()); 0032 0033 MagicLampConfig::instance(KWIN_CONFIG); 0034 addConfig(MagicLampConfig::self(), widget()); 0035 } 0036 0037 void MagicLampEffectConfig::save() 0038 { 0039 KCModule::save(); 0040 OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"), 0041 QStringLiteral("/Effects"), 0042 QDBusConnection::sessionBus()); 0043 interface.reconfigureEffect(QStringLiteral("magiclamp")); 0044 } 0045 0046 } // namespace 0047 0048 #include "magiclamp_config.moc" 0049 0050 #include "moc_magiclamp_config.cpp"