Changeset View
Changeset View
Standalone View
Standalone View
globalshortcuts.h
Show First 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 50 | public: | |||
---|---|---|---|---|---|
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 | ||
61 | */ | 61 | **/ | ||
62 | void registerPointerShortcut(QAction *action, Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); | 62 | void registerPointerShortcut(QAction *action, Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); | ||
63 | /** | 63 | /** | ||
64 | * @brief Registers an internal global axis shortcut | 64 | * @brief Registers an internal global axis shortcut | ||
65 | * | 65 | * | ||
66 | * @param action The action to trigger if the shortcut is triggered | 66 | * @param action The action to trigger if the shortcut is triggered | ||
67 | * @param modifiers The modifiers which need to be hold to trigger the action | 67 | * @param modifiers The modifiers which need to be hold to trigger the action | ||
68 | * @param axis The pointer axis | 68 | * @param axis The pointer axis | ||
69 | */ | 69 | **/ | ||
70 | void registerAxisShortcut(QAction *action, Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); | 70 | void registerAxisShortcut(QAction *action, Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); | ||
71 | 71 | | |||
72 | void registerTouchpadSwipe(QAction *action, SwipeDirection direction); | 72 | void registerTouchpadSwipe(QAction *action, SwipeDirection direction); | ||
73 | 73 | | |||
74 | /** | 74 | /** | ||
75 | * @brief Processes a key event to decide whether a shortcut needs to be triggered. | 75 | * @brief Processes a key event to decide whether a shortcut needs to be triggered. | ||
76 | * | 76 | * | ||
77 | * If a shortcut triggered this method returns @c true to indicate to the caller that the event | 77 | * If a shortcut triggered this method returns @c true to indicate to the caller that the event | ||
78 | * should not be further processed. If there is no shortcut which triggered for the key, then | 78 | * should not be further processed. If there is no shortcut which triggered for the key, then | ||
79 | * @c false is returned. | 79 | * @c false is returned. | ||
80 | * | 80 | * | ||
81 | * @param modifiers The current hold modifiers | 81 | * @param modifiers The current hold modifiers | ||
82 | * @param keyQt The Qt::Key which got pressed | 82 | * @param keyQt The Qt::Key which got pressed | ||
83 | * @return @c true if a shortcut triggered, @c false otherwise | 83 | * @return @c true if a shortcut triggered, @c false otherwise | ||
84 | */ | 84 | **/ | ||
85 | bool processKey(Qt::KeyboardModifiers modifiers, int keyQt); | 85 | bool processKey(Qt::KeyboardModifiers modifiers, int keyQt); | ||
86 | bool processPointerPressed(Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); | 86 | bool processPointerPressed(Qt::KeyboardModifiers modifiers, Qt::MouseButtons pointerButtons); | ||
87 | /** | 87 | /** | ||
88 | * @brief Processes a pointer axis event to decide whether a shortcut needs to be triggered. | 88 | * @brief Processes a pointer axis event to decide whether a shortcut needs to be triggered. | ||
89 | * | 89 | * | ||
90 | * If a shortcut triggered this method returns @c true to indicate to the caller that the event | 90 | * If a shortcut triggered this method returns @c true to indicate to the caller that the event | ||
91 | * should not be further processed. If there is no shortcut which triggered for the key, then | 91 | * should not be further processed. If there is no shortcut which triggered for the key, then | ||
92 | * @c false is returned. | 92 | * @c false is returned. | ||
93 | * | 93 | * | ||
94 | * @param modifiers The current hold modifiers | 94 | * @param modifiers The current hold modifiers | ||
95 | * @param axis The axis direction which has triggered this event | 95 | * @param axis The axis direction which has triggered this event | ||
96 | * @return @c true if a shortcut triggered, @c false otherwise | 96 | * @return @c true if a shortcut triggered, @c false otherwise | ||
97 | */ | 97 | **/ | ||
98 | bool processAxis(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); | 98 | bool processAxis(Qt::KeyboardModifiers modifiers, PointerAxisDirection axis); | ||
99 | 99 | | |||
100 | void processSwipeStart(uint fingerCount); | 100 | void processSwipeStart(uint fingerCount); | ||
101 | void processSwipeUpdate(const QSizeF &delta); | 101 | void processSwipeUpdate(const QSizeF &delta); | ||
102 | void processSwipeCancel(); | 102 | void processSwipeCancel(); | ||
103 | void processSwipeEnd(); | 103 | void processSwipeEnd(); | ||
104 | 104 | | |||
105 | void setKGlobalAccelInterface(KGlobalAccelInterface *interface) { | 105 | void setKGlobalAccelInterface(KGlobalAccelInterface *interface) { | ||
▲ Show 20 Lines • Show All 87 Lines • Show Last 20 Lines |