File indexing completed on 2024-11-10 04:56:58
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2007 Christian Nitschkowski <christian.nitschkowski@kdemail.net> 0006 SPDX-FileCopyrightText: 2018 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 #include "diminactive_config.h" 0011 0012 #include <config-kwin.h> 0013 0014 // KConfigSkeleton 0015 #include "diminactiveconfig.h" 0016 0017 #include <kwineffects_interface.h> 0018 0019 #include <KPluginFactory> 0020 0021 K_PLUGIN_CLASS(KWin::DimInactiveEffectConfig) 0022 0023 namespace KWin 0024 { 0025 0026 DimInactiveEffectConfig::DimInactiveEffectConfig(QObject *parent, const KPluginMetaData &data) 0027 : KCModule(parent, data) 0028 { 0029 m_ui.setupUi(widget()); 0030 DimInactiveConfig::instance(KWIN_CONFIG); 0031 addConfig(DimInactiveConfig::self(), widget()); 0032 } 0033 0034 DimInactiveEffectConfig::~DimInactiveEffectConfig() 0035 { 0036 } 0037 0038 void DimInactiveEffectConfig::save() 0039 { 0040 KCModule::save(); 0041 0042 OrgKdeKwinEffectsInterface interface(QStringLiteral("org.kde.KWin"), 0043 QStringLiteral("/Effects"), 0044 QDBusConnection::sessionBus()); 0045 interface.reconfigureEffect(QStringLiteral("diminactive")); 0046 } 0047 0048 } // namespace KWin 0049 0050 #include "diminactive_config.moc" 0051 0052 #include "moc_diminactive_config.cpp"