Changeset View
Changeset View
Standalone View
Standalone View
keyboard_layout_switching.h
Show All 20 Lines | |||||
21 | #define KWIN_KEYBOARD_LAYOUT_SWITCHING_H | 21 | #define KWIN_KEYBOARD_LAYOUT_SWITCHING_H | ||
22 | 22 | | |||
23 | #include <QObject> | 23 | #include <QObject> | ||
24 | #include <QHash> | 24 | #include <QHash> | ||
25 | 25 | | |||
26 | namespace KWin | 26 | namespace KWin | ||
27 | { | 27 | { | ||
28 | 28 | | |||
29 | class AbstractClient; | ||||
29 | class KeyboardLayout; | 30 | class KeyboardLayout; | ||
30 | class Xkb; | 31 | class Xkb; | ||
31 | class VirtualDesktop; | 32 | class VirtualDesktop; | ||
32 | 33 | | |||
33 | namespace KeyboardLayoutSwitching | 34 | namespace KeyboardLayoutSwitching | ||
34 | { | 35 | { | ||
35 | 36 | | |||
36 | class Policy : public QObject | 37 | class Policy : public QObject | ||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 87 | protected: | |||
87 | void clearCache() override; | 88 | void clearCache() override; | ||
88 | void layoutChanged() override; | 89 | void layoutChanged() override; | ||
89 | 90 | | |||
90 | private: | 91 | private: | ||
91 | void desktopChanged(); | 92 | void desktopChanged(); | ||
92 | QHash<VirtualDesktop *, quint32> m_layouts; | 93 | QHash<VirtualDesktop *, quint32> m_layouts; | ||
93 | }; | 94 | }; | ||
94 | 95 | | |||
96 | class WindowPolicy : public Policy | ||||
97 | { | ||||
98 | Q_OBJECT | ||||
99 | public: | ||||
100 | explicit WindowPolicy(Xkb *xkb, KeyboardLayout *layout); | ||||
101 | ~WindowPolicy() override; | ||||
102 | | ||||
103 | QString name() const override { | ||||
104 | return QStringLiteral("Window"); | ||||
105 | } | ||||
106 | | ||||
107 | protected: | ||||
108 | void clearCache() override; | ||||
109 | void layoutChanged() override; | ||||
110 | | ||||
111 | private: | ||||
112 | QHash<AbstractClient*, quint32> m_layouts; | ||||
113 | }; | ||||
114 | | ||||
95 | } | 115 | } | ||
96 | } | 116 | } | ||
97 | 117 | | |||
98 | #endif | 118 | #endif |