on xenial help sign in
improve docu
28d24b0Lukáš Tinkl
plugins/Utils/WindowInputMonitor.h+26−15
@@ -23,20 +23,12 @@
23#include "Timer.h"
23#include "Timer.h"
24#include "ElapsedTimer.h"
24#include "ElapsedTimer.h"
25
25
26−/*
26+/**
27− Signals when the home key seems to be have been intentionally tapped.
27+ * Monitors input events received by the window holding this item and the Home (Win aka Super_L)
28−
28+ * key presses.
29− It only says the home key has been activated if it has been tapped in isolation,
29+ *
30− that is, without being accompanied by touches on the screen. Home key taps that
31− happen along with (or immediately after, or immediately before) touches on the
32− screen are considered to have happened unintentionally and are thus ignored.
33−
34− Rationale being that it's easy to accidentally hit the home key while performing
35− a swipe from a screen edge, for instance. That's particularly the case when the
36− home key is a capacitive key.
37−
38− Additionally, this class monitors for generic touch events on the screen, to
30+ * Additionally, this class monitors for generic touch events on the screen, to
39− help with hiding/revealing the mouse pointer.
31+ * help with hiding/revealing the mouse pointer.
40 */
32 */
41class WindowInputMonitor : public QQuickItem
33class WindowInputMonitor : public QQuickItem
42{
34{
@@ -59,10 +51,29 @@ public:
59 const qint64 msecsWithoutTouches = 150;
51 const qint64 msecsWithoutTouches = 150;
60
52
61Q_SIGNALS:
53Q_SIGNALS:
54+ /**
62− // Emitted when the home key has been intentionally tapped
55+ * Emitted when the home key has been intentionally tapped
56+ *
57+ * It only says the home key has been activated if it has been tapped in isolation,
58+ * that is, without being accompanied by touches on the screen. Home key taps that
59+ * happen along with (or immediately after, or immediately before) touches on the
60+ * screen are considered to have happened unintentionally and are thus ignored.
61+ *
62+ * Rationale being that it's easy to accidentally hit the home key while performing
63+ * a swipe from a screen edge, for instance. That's particularly the case when the
64+ * home key is a capacitive key.
65+ */
63 void homeKeyActivated();
66 void homeKeyActivated();
64
67
68+ /**
69+ * Emitted when a touch begin event is detected
70+ */
65 void touchBegun();
71 void touchBegun();
72+
73+ /**
74+ * Emitted when a touch end event is detected
75+ * @param pos the position in screen coordinates
76+ */
66 void touchEnded(const QPointF &pos);
77 void touchEnded(const QPointF &pos);
67
78
68private Q_SLOTS:
79private Q_SLOTS: