File indexing completed on 2024-05-26 05:33:06
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2009 Lucas Murray <lmurray@undefinedfire.com> 0006 SPDX-FileCopyrightText: 2020 Cyril Rossi <cyril.rossi@enioka.com> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include <kcmodule.h> 0014 #include <ksharedconfig.h> 0015 0016 #include "effect/globals.h" 0017 0018 namespace KWin 0019 { 0020 class KWinScreenEdgeData; 0021 class KWinScreenEdgesConfigForm; 0022 class KWinScreenEdgeScriptSettings; 0023 class KWinScreenEdgeEffectSettings; 0024 0025 class KWinScreenEdgesConfig : public KCModule 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 explicit KWinScreenEdgesConfig(QObject *parent, const KPluginMetaData &data); 0031 ~KWinScreenEdgesConfig() override; 0032 0033 public Q_SLOTS: 0034 void save() override; 0035 void load() override; 0036 void defaults() override; 0037 0038 private: 0039 KWinScreenEdgesConfigForm *m_form; 0040 KSharedConfigPtr m_config; 0041 QStringList m_effects; // list of effect IDs ordered in the list they are presented in the menu 0042 QStringList m_scripts; // list of script IDs ordered in the list they are presented in the menu 0043 QHash<QString, KWinScreenEdgeScriptSettings *> m_scriptSettings; 0044 QHash<QString, KWinScreenEdgeEffectSettings *> m_effectSettings; 0045 KWinScreenEdgeData *m_data; 0046 0047 enum EffectActions { 0048 PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions 0049 PresentWindowsCurrent, 0050 PresentWindowsClass, 0051 Overview, 0052 TabBox, 0053 TabBoxAlternative, 0054 EffectCount 0055 }; 0056 0057 void monitorInit(); 0058 void monitorLoadSettings(); 0059 void monitorLoadDefaultSettings(); 0060 void monitorSaveSettings(); 0061 void monitorShowEvent(); 0062 0063 static ElectricBorderAction electricBorderActionFromString(const QString &string); 0064 static QString electricBorderActionToString(int action); 0065 }; 0066 0067 } // namespace