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 class QShowEvent; 0019 0020 namespace KWin 0021 { 0022 class KWinTouchScreenData; 0023 class KWinTouchScreenEdgeConfigForm; 0024 class KWinTouchScreenScriptSettings; 0025 class KWinTouchScreenEdgeEffectSettings; 0026 0027 class KWinScreenEdgesConfig : public KCModule 0028 { 0029 Q_OBJECT 0030 0031 public: 0032 explicit KWinScreenEdgesConfig(QObject *parent, const KPluginMetaData &data); 0033 ~KWinScreenEdgesConfig() override; 0034 0035 public Q_SLOTS: 0036 void save() override; 0037 void load() override; 0038 void defaults() override; 0039 0040 private: 0041 KWinTouchScreenEdgeConfigForm *m_form; 0042 KSharedConfigPtr m_config; 0043 QStringList m_effects; // list of effect IDs ordered in the list they are presented in the menu 0044 QStringList m_scripts; // list of script IDs ordered in the list they are presented in the menu 0045 QHash<QString, KWinTouchScreenScriptSettings *> m_scriptSettings; 0046 QHash<QString, KWinTouchScreenEdgeEffectSettings *> m_effectSettings; 0047 KWinTouchScreenData *m_data; 0048 0049 enum EffectActions { 0050 PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions 0051 PresentWindowsCurrent, 0052 PresentWindowsClass, 0053 Overview, 0054 TabBox, 0055 TabBoxAlternative, 0056 EffectCount 0057 }; 0058 0059 void monitorInit(); 0060 void monitorLoadSettings(); 0061 void monitorLoadDefaultSettings(); 0062 void monitorSaveSettings(); 0063 void monitorShowEvent(); 0064 0065 static ElectricBorderAction electricBorderActionFromString(const QString &string); 0066 static QString electricBorderActionToString(int action); 0067 }; 0068 0069 } // namespace