Changeset View
Changeset View
Standalone View
Standalone View
globalshortcuts.h
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
44 | * For internal shortcut handling (those which are delivered inside KWin) QActions are used and | 44 | * For internal shortcut handling (those which are delivered inside KWin) QActions are used and | ||
45 | * triggered if the shortcut matches. For external shortcut handling a DBus interface is used. | 45 | * triggered if the shortcut matches. For external shortcut handling a DBus interface is used. | ||
46 | **/ | 46 | **/ | ||
47 | class GlobalShortcutsManager : public QObject | 47 | class GlobalShortcutsManager : public QObject | ||
48 | { | 48 | { | ||
49 | Q_OBJECT | 49 | Q_OBJECT | ||
50 | public: | 50 | public: | ||
51 | explicit GlobalShortcutsManager(QObject *parent = nullptr); | 51 | explicit GlobalShortcutsManager(QObject *parent = nullptr); | ||
52 | virtual ~GlobalShortcutsManager(); | 52 | ~GlobalShortcutsManager() override; | ||
53 | void init(); | 53 | void init(); | ||
54 | 54 | | |||
55 | /** | 55 | /** | ||
56 | * @brief Registers an internal global pointer shortcut | 56 | * @brief Registers an internal global pointer shortcut | ||
57 | * | 57 | * | ||
58 | * @param action The action to trigger if the shortcut is pressed | 58 | * @param action The action to trigger if the shortcut is pressed | ||
59 | * @param modifiers The modifiers which need to be hold to trigger the action | 59 | * @param modifiers The modifiers which need to be hold to trigger the action | ||
60 | * @param pointerButtons The pointer button which needs to be pressed | 60 | * @param pointerButtons The pointer button which needs to be pressed | ||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | |||||
144 | 144 | | |||
145 | class InternalGlobalShortcut : public GlobalShortcut | 145 | class InternalGlobalShortcut : public GlobalShortcut | ||
146 | { | 146 | { | ||
147 | public: | 147 | public: | ||
148 | InternalGlobalShortcut(Qt::KeyboardModifiers modifiers, const QKeySequence &shortcut, QAction *action); | 148 | InternalGlobalShortcut(Qt::KeyboardModifiers modifiers, const QKeySequence &shortcut, QAction *action); | ||
149 | InternalGlobalShortcut(Qt::KeyboardModifiers pointerButtonModifiers, Qt::MouseButtons pointerButtons, QAction *action); | 149 | InternalGlobalShortcut(Qt::KeyboardModifiers pointerButtonModifiers, Qt::MouseButtons pointerButtons, QAction *action); | ||
150 | InternalGlobalShortcut(Qt::KeyboardModifiers axisModifiers, PointerAxisDirection axis, QAction *action); | 150 | InternalGlobalShortcut(Qt::KeyboardModifiers axisModifiers, PointerAxisDirection axis, QAction *action); | ||
151 | InternalGlobalShortcut(Qt::KeyboardModifiers swipeModifier, SwipeDirection direction, QAction *action); | 151 | InternalGlobalShortcut(Qt::KeyboardModifiers swipeModifier, SwipeDirection direction, QAction *action); | ||
152 | virtual ~InternalGlobalShortcut(); | 152 | ~InternalGlobalShortcut() override; | ||
153 | 153 | | |||
154 | void invoke() override; | 154 | void invoke() override; | ||
155 | 155 | | |||
156 | QAction *action() const; | 156 | QAction *action() const; | ||
157 | 157 | | |||
158 | SwipeGesture *swipeGesture() const { | 158 | SwipeGesture *swipeGesture() const { | ||
159 | return m_swipe.data(); | 159 | return m_swipe.data(); | ||
160 | } | 160 | } | ||
Show All 32 Lines |