File indexing completed on 2024-11-10 04:56:59

0001 /*
0002     SPDX-FileCopyrightText: 2010 Fredrik Höglund <fredrik@kde.org>
0003     SPDX-FileCopyrightText: 2010 Alexandre Pereira <pereira.alex@gmail.com>
0004 
0005     SPDX-License-Identifier: GPL-2.0-or-later
0006 */
0007 #include "glide_config.h"
0008 
0009 #include <config-kwin.h>
0010 
0011 // KConfigSkeleton
0012 #include "glideconfig.h"
0013 
0014 #include <KPluginFactory>
0015 #include <kwineffects_interface.h>
0016 
0017 K_PLUGIN_CLASS(KWin::GlideEffectConfig)
0018 
0019 namespace KWin
0020 {
0021 
0022 GlideEffectConfig::GlideEffectConfig(QObject *parent, const KPluginMetaData &data)
0023     : KCModule(parent, data)
0024 {
0025     ui.setupUi(widget());
0026     GlideConfig::instance(KWIN_CONFIG);
0027     addConfig(GlideConfig::self(), widget());
0028 }
0029 
0030 GlideEffectConfig::~GlideEffectConfig()
0031 {
0032 }
0033 
0034 void GlideEffectConfig::save()
0035 {
0036     KCModule::save();
0037     OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"),
0038                                          QStringLiteral("/Effects"),
0039                                          QDBusConnection::sessionBus());
0040     interface.reconfigureEffect(QStringLiteral("glide"));
0041 }
0042 
0043 } // namespace KWin
0044 
0045 #include "glide_config.moc"
0046 
0047 #include "moc_glide_config.cpp"