File indexing completed on 2024-11-10 04:56:49
0001 /* 0002 SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <KQuickConfigModule> 0010 0011 #include <QAbstractItemModel> 0012 #include <QQuickItem> 0013 0014 namespace KWin 0015 { 0016 0017 class EffectsModel; 0018 0019 class DesktopEffectsKCM : public KQuickConfigModule 0020 { 0021 Q_OBJECT 0022 Q_PROPERTY(QAbstractItemModel *effectsModel READ effectsModel CONSTANT) 0023 0024 public: 0025 explicit DesktopEffectsKCM(QObject *parent, const KPluginMetaData &metaData); 0026 ~DesktopEffectsKCM() override; 0027 0028 QAbstractItemModel *effectsModel() const; 0029 0030 public Q_SLOTS: 0031 void load() override; 0032 void save() override; 0033 void defaults() override; 0034 0035 void onGHNSEntriesChanged(); 0036 void configure(const QString &pluginId, QQuickItem *context); 0037 0038 private Q_SLOTS: 0039 void updateNeedsSave(); 0040 0041 private: 0042 EffectsModel *m_model; 0043 0044 Q_DISABLE_COPY(DesktopEffectsKCM) 0045 }; 0046 0047 } // namespace KWin