Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwinscreenedges/touch.h
- This file was added.
1 | /******************************************************************** | ||||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | ||||
3 | This file is part of the KDE project. | ||||
4 | | ||||
5 | Copyright (C) 2009 Lucas Murray <lmurray@undefinedfire.com> | ||||
6 | | ||||
7 | This program is free software; you can redistribute it and/or modify | ||||
8 | it under the terms of the GNU General Public License as published by | ||||
9 | the Free Software Foundation; either version 2 of the License, or | ||||
10 | (at your option) any later version. | ||||
11 | | ||||
12 | This program is distributed in the hope that it will be useful, | ||||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
15 | GNU General Public License for more details. | ||||
16 | | ||||
17 | You should have received a copy of the GNU General Public License | ||||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
19 | *********************************************************************/ | ||||
20 | | ||||
21 | #ifndef __TOUCH_H__ | ||||
22 | #define __TOUCH_H__ | ||||
23 | | ||||
24 | #include <kcmodule.h> | ||||
25 | #include <ksharedconfig.h> | ||||
26 | | ||||
27 | #include "kwinglobals.h" | ||||
28 | | ||||
29 | #include "ui_touch.h" | ||||
30 | | ||||
31 | class QShowEvent; | ||||
32 | | ||||
33 | namespace KWin | ||||
34 | { | ||||
35 | enum class BuiltInEffect; | ||||
36 | | ||||
37 | class KWinScreenEdgesConfigForm : public QWidget, public Ui::KWinScreenEdgesConfigForm | ||||
38 | { | ||||
39 | Q_OBJECT | ||||
40 | | ||||
41 | public: | ||||
42 | explicit KWinScreenEdgesConfigForm(QWidget* parent); | ||||
43 | }; | ||||
44 | | ||||
45 | class KWinScreenEdgesConfig : public KCModule | ||||
46 | { | ||||
47 | Q_OBJECT | ||||
48 | | ||||
49 | public: | ||||
50 | explicit KWinScreenEdgesConfig(QWidget* parent, const QVariantList& args); | ||||
51 | ~KWinScreenEdgesConfig(); | ||||
52 | | ||||
53 | public Q_SLOTS: | ||||
54 | virtual void save(); | ||||
55 | virtual void load(); | ||||
56 | virtual void defaults(); | ||||
57 | protected: | ||||
58 | virtual void showEvent(QShowEvent* e); | ||||
59 | private: | ||||
60 | KWinScreenEdgesConfigForm* m_ui; | ||||
61 | KSharedConfigPtr m_config; | ||||
62 | QStringList m_scripts; //list of script IDs ordered in the list they are presented in the menu | ||||
63 | | ||||
64 | enum EffectActions { | ||||
65 | PresentWindowsAll = ELECTRIC_ACTION_COUNT, // Start at the end of built in actions | ||||
66 | PresentWindowsCurrent, | ||||
67 | PresentWindowsClass, | ||||
68 | DesktopGrid, | ||||
69 | Cube, | ||||
70 | Cylinder, | ||||
71 | Sphere, | ||||
72 | TabBox, | ||||
73 | TabBoxAlternative, | ||||
74 | EffectCount | ||||
75 | }; | ||||
76 | | ||||
77 | bool effectEnabled(const BuiltInEffect& effect, const KConfigGroup& cfg) const; | ||||
78 | | ||||
79 | void monitorAddItem(const QString& item); | ||||
80 | void monitorItemSetEnabled(int index, bool enabled); | ||||
81 | void monitorInit(); | ||||
82 | void monitorLoadAction(ElectricBorder edge, const QString& configName); | ||||
83 | void monitorLoad(); | ||||
84 | void monitorSaveAction(int edge, const QString& configName); | ||||
85 | void monitorSave(); | ||||
86 | void monitorDefaults(); | ||||
87 | void monitorShowEvent(); | ||||
88 | void monitorChangeEdge(ElectricBorder border, int index); | ||||
89 | void monitorHideEdge(ElectricBorder border, bool hidden); | ||||
90 | QList<int> monitorCheckEffectHasEdge(int index) const; | ||||
91 | }; | ||||
92 | | ||||
93 | } // namespace | ||||
94 | | ||||
95 | #endif |