Changeset View
Changeset View
Standalone View
Standalone View
keyboard_layout.h
Show All 29 Lines | |||||
30 | class KStatusNotifierItem; | 30 | class KStatusNotifierItem; | ||
31 | class QAction; | 31 | class QAction; | ||
32 | 32 | | |||
33 | namespace KWin | 33 | namespace KWin | ||
34 | { | 34 | { | ||
35 | class Xkb; | 35 | class Xkb; | ||
36 | class KeyboardLayoutDBusInterface; | 36 | class KeyboardLayoutDBusInterface; | ||
37 | 37 | | |||
38 | namespace KeyboardLayoutSwitching | ||||
39 | { | ||||
40 | class Policy; | ||||
41 | } | ||||
42 | | ||||
38 | class KeyboardLayout : public QObject, public InputEventSpy | 43 | class KeyboardLayout : public QObject, public InputEventSpy | ||
39 | { | 44 | { | ||
40 | Q_OBJECT | 45 | Q_OBJECT | ||
41 | public: | 46 | public: | ||
42 | explicit KeyboardLayout(Xkb *xkb); | 47 | explicit KeyboardLayout(Xkb *xkb); | ||
43 | ~KeyboardLayout() override; | 48 | ~KeyboardLayout() override; | ||
44 | 49 | | |||
45 | void setConfig(KSharedConfigPtr config) { | 50 | void setConfig(KSharedConfigPtr config) { | ||
Show All 25 Lines | 68 | private: | |||
71 | void reinitNotifierMenu(); | 76 | void reinitNotifierMenu(); | ||
72 | void loadShortcuts(); | 77 | void loadShortcuts(); | ||
73 | Xkb *m_xkb; | 78 | Xkb *m_xkb; | ||
74 | xkb_layout_index_t m_layout = 0; | 79 | xkb_layout_index_t m_layout = 0; | ||
75 | KStatusNotifierItem *m_notifierItem; | 80 | KStatusNotifierItem *m_notifierItem; | ||
76 | KSharedConfigPtr m_config; | 81 | KSharedConfigPtr m_config; | ||
77 | QVector<QAction*> m_layoutShortcuts; | 82 | QVector<QAction*> m_layoutShortcuts; | ||
78 | KeyboardLayoutDBusInterface *m_dbusInterface = nullptr; | 83 | KeyboardLayoutDBusInterface *m_dbusInterface = nullptr; | ||
84 | KeyboardLayoutSwitching::Policy *m_policy = nullptr; | ||||
79 | }; | 85 | }; | ||
80 | 86 | | |||
81 | class KeyboardLayoutDBusInterface : public QObject | 87 | class KeyboardLayoutDBusInterface : public QObject | ||
82 | { | 88 | { | ||
83 | Q_OBJECT | 89 | Q_OBJECT | ||
84 | Q_CLASSINFO("D-Bus Interface", "org.kde.KeyboardLayouts") | 90 | Q_CLASSINFO("D-Bus Interface", "org.kde.KeyboardLayouts") | ||
85 | 91 | | |||
86 | public: | 92 | public: | ||
Show All 21 Lines |