File indexing completed on 2026-07-12 16:17:49
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 "kwinglobals.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(QWidget *parent, const QVariantList &args); 0033 ~KWinScreenEdgesConfig() override; 0034 0035 public Q_SLOTS: 0036 void save() override; 0037 void load() override; 0038 void defaults() override; 0039 0040 protected: 0041 void showEvent(QShowEvent *e) override; 0042 0043 private: 0044 KWinTouchScreenEdgeConfigForm *m_form; 0045 KSharedConfigPtr m_config; 0046 QStringList m_effects; // list of effect IDs ordered in the list they are presented in the menu 0047 QStringList m_scripts; // list of script IDs ordered in the list they are presented in the menu 0048 QHash<QString, KWinTouchScreenScriptSettings *> m_scriptSettings; 0049 QHash<QString, KWinTouchScreenEdgeEffectSettings *> m_effectSettings; 0050 KWinTouchScreenData *m_data; 0051 0052 enum EffectActions { 0053 PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions 0054 PresentWindowsCurrent, 0055 PresentWindowsClass, 0056 TabBox, 0057 TabBoxAlternative, 0058 EffectCount 0059 }; 0060 0061 void monitorInit(); 0062 void monitorLoadSettings(); 0063 void monitorLoadDefaultSettings(); 0064 void monitorSaveSettings(); 0065 void monitorShowEvent(); 0066 0067 static ElectricBorderAction electricBorderActionFromString(const QString &string); 0068 static QString electricBorderActionToString(int action); 0069 }; 0070 0071 } // namespace