KWin
Loading...
Searching...
No Matches
main.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2009 Lucas Murray <lmurray@undefinedfire.com>
6 SPDX-FileCopyrightText: 2020 Cyril Rossi <cyril.rossi@enioka.com>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
13#include <kcmodule.h>
14#include <ksharedconfig.h>
15
16#include "effect/globals.h"
17
18namespace KWin
19{
20class KWinScreenEdgeData;
21class KWinScreenEdgesConfigForm;
22class KWinScreenEdgeScriptSettings;
23class KWinScreenEdgeEffectSettings;
24
25class KWinScreenEdgesConfig : public KCModule
26{
27 Q_OBJECT
28
29public:
30 explicit KWinScreenEdgesConfig(QObject *parent, const KPluginMetaData &data);
32
33public Q_SLOTS:
34 void save() override;
35 void load() override;
36 void defaults() override;
37
38private:
40 KSharedConfigPtr m_config;
41 QStringList m_effects; // list of effect IDs ordered in the list they are presented in the menu
42 QStringList m_scripts; // list of script IDs ordered in the list they are presented in the menu
43 QHash<QString, KWinScreenEdgeScriptSettings *> m_scriptSettings;
44 QHash<QString, KWinScreenEdgeEffectSettings *> m_effectSettings;
45 KWinScreenEdgeData *m_data;
46
47 enum EffectActions {
48 PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions
49 PresentWindowsCurrent,
50 PresentWindowsClass,
51 Overview,
52 TabBox,
53 TabBoxAlternative,
54 EffectCount
55 };
56
57 void monitorInit();
58 void monitorLoadSettings();
59 void monitorLoadDefaultSettings();
60 void monitorSaveSettings();
61 void monitorShowEvent();
62
63 static ElectricBorderAction electricBorderActionFromString(const QString &string);
64 static QString electricBorderActionToString(int action);
65};
66
67} // namespace
KWinScreenEdgesConfig(QObject *parent, const KPluginMetaData &data)
ElectricBorderAction
Definition globals.h:78
@ ELECTRIC_ACTION_COUNT
Definition globals.h:85