diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-06-19 18:05:14 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2018-07-12 20:24:38 +0000 |
commit | 8092c5617092195d7df02775f423f5e420eb764f (patch) | |
tree | c9c5c09b4327a395da2169497139e81197b4afea /src/quick/handlers/qquickpointerhandler.cpp | |
parent | fa3c840ef1ff2100ccca6866528ac1f008c8e3a7 (diff) |
Rename Pointer Handlers to Input Handlers (as a concept)
This is a documentation change to alleviate some confusion that we've
seen during the Tech Preview period.
It doesn't make sense to actually rename the base class though, because
it is intended to handle QQuickPointerEvents, not QEvents. The reason
for that is that refactoring the QEvent hierarchy has to wait until
Qt 6. So maybe in Qt 6 we can remove QQuickPointerEvent and have
a QQuickInputHandler base class which handles QInputEvents; but for
now, this conceptual renaming seems about as far as we can go.
Task-number: QTBUG-66651
Change-Id: I84a41dc282c480d08f4d4a0d9a857e37e074aa7a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/quick/handlers/qquickpointerhandler.cpp')
-rw-r--r-- | src/quick/handlers/qquickpointerhandler.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp index b2fead32fd..8e10003c6a 100644 --- a/src/quick/handlers/qquickpointerhandler.cpp +++ b/src/quick/handlers/qquickpointerhandler.cpp @@ -57,8 +57,8 @@ Q_LOGGING_CATEGORY(lcPointerHandlerActive, "qt.quick.handler.active") \ingroup qtquick-handlers \brief Abstract handler for pointer events. - PointerHandler is the base class handler (not registered as a QML type) for - pointer events without regard to source (touch, mouse or graphics tablet). + PointerHandler is the base class Input Handler (not registered as a QML type) for + events from any kind of pointing device (touch, mouse or graphics tablet). */ QQuickPointerHandler::QQuickPointerHandler(QObject *parent) @@ -115,12 +115,12 @@ void QQuickPointerHandler::setMargin(qreal pointDistanceThreshold) /*! Notification that the grab has changed in some way which is relevant to this handler. - The \a grabber (subject) will be the PointerHandler whose state is changing, + The \a grabber (subject) will be the Input Handler whose state is changing, or null if the state change regards an Item. The \a stateChange (verb) tells what happened. The \a point (object) is the point that was grabbed or ungrabbed. EventPoint has the sole responsibility to call this function. - The PointerHandler must react in whatever way is appropriate, and must + The Input Handler must react in whatever way is appropriate, and must emit the relevant signals (for the benefit of QML code). A subclass is allowed to override this virtual function, but must always call its parent class's implementation in addition to (usually after) @@ -164,10 +164,10 @@ void QQuickPointerHandler::onGrabChanged(QQuickPointerHandler *grabber, QQuickEv /*! Acquire or give up a passive grab of the given \a point, according to the \a grab state. - Unlike the exclusive grab, multiple PointerHandlers can have passive grabs + Unlike the exclusive grab, multiple Input Handlers can have passive grabs simultaneously. This means that each of them will receive further events - when the \a point moves, and when it is finally released. Typically a - PointerHandler should acquire a passive grab as soon as a point is pressed, + when the \a point moves, and when it is finally released. Typically an + Input Handler should acquire a passive grab as soon as a point is pressed, if the handler's constraints do not clearly rule out any interest in that point. For example, DragHandler needs a passive grab in order to watch the movement of a point to see whether it will be dragged past the drag @@ -464,7 +464,7 @@ bool QQuickPointerHandler::wantsEventPoint(QQuickEventPoint *point) \readonly \qmlproperty bool QtQuick::PointerHandler::active - This holds true whenever this PointerHandler has taken sole responsibility + This holds true whenever this Input Handler has taken sole responsibility for handing one or more EventPoints, by successfully taking an exclusive grab of those points. This means that it is keeping its properties up-to-date according to the movements of those Event Points and actively |