diff options
Diffstat (limited to 'src/quick/handlers')
-rw-r--r-- | src/quick/handlers/qquickdragaxis.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickdraghandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickhandlerpoint.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickhoverhandler.cpp | 94 | ||||
-rw-r--r-- | src/quick/handlers/qquickmultipointhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickpinchhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickpointerdevicehandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickpointerhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickpointhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquicksinglepointhandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquicktaphandler.cpp | 2 | ||||
-rw-r--r-- | src/quick/handlers/qquickwheelhandler.cpp | 2 |
12 files changed, 116 insertions, 0 deletions
diff --git a/src/quick/handlers/qquickdragaxis.cpp b/src/quick/handlers/qquickdragaxis.cpp index 88470c8a7d..806b5d705a 100644 --- a/src/quick/handlers/qquickdragaxis.cpp +++ b/src/quick/handlers/qquickdragaxis.cpp @@ -76,3 +76,5 @@ void QQuickDragAxis::setEnabled(bool enabled) } QT_END_NAMESPACE + +#include "moc_qquickdragaxis_p.cpp" diff --git a/src/quick/handlers/qquickdraghandler.cpp b/src/quick/handlers/qquickdraghandler.cpp index 492897b68b..b9a2c183c2 100644 --- a/src/quick/handlers/qquickdraghandler.cpp +++ b/src/quick/handlers/qquickdraghandler.cpp @@ -343,3 +343,5 @@ void QQuickDragHandler::setTranslation(const QVector2D &trans) */ QT_END_NAMESPACE + +#include "moc_qquickdraghandler_p.cpp" diff --git a/src/quick/handlers/qquickhandlerpoint.cpp b/src/quick/handlers/qquickhandlerpoint.cpp index 72efdfd0f4..7103206470 100644 --- a/src/quick/handlers/qquickhandlerpoint.cpp +++ b/src/quick/handlers/qquickhandlerpoint.cpp @@ -348,3 +348,5 @@ void QQuickHandlerPoint::reset(const QVector<QQuickHandlerPoint> &points) */ QT_END_NAMESPACE + +#include "moc_qquickhandlerpoint_p.cpp" diff --git a/src/quick/handlers/qquickhoverhandler.cpp b/src/quick/handlers/qquickhoverhandler.cpp index 3361415eac..a65730607a 100644 --- a/src/quick/handlers/qquickhoverhandler.cpp +++ b/src/quick/handlers/qquickhoverhandler.cpp @@ -154,6 +154,98 @@ void QQuickHoverHandler::setHovered(bool hovered) } /*! + \internal + \qmlproperty flags QtQuick::HoverHandler::acceptedButtons + + This property is not used in HoverHandler. +*/ + +/*! + \qmlproperty flags QtQuick::HoverHandler::acceptedDevices + + The types of pointing devices that can activate the pointer handler. + + By default, this property is set to + \l{QInputDevice::DeviceType}{PointerDevice.AllDevices}. + If you set it to an OR combination of device types, it will ignore pointer + events from the non-matching devices. + + For example, an item could be made to respond to mouse hover in one way, + and stylus hover in another way, with two handlers: + + \snippet pointerHandlers/hoverMouseOrStylus.qml 0 + + The available device types are as follows: + + \value PointerDevice.Mouse A mouse. + \value PointerDevice.TouchScreen A touchscreen. + \value PointerDevice.TouchPad A touchpad or trackpad. + \value PointerDevice.Stylus A stylus on a graphics tablet. + \value PointerDevice.Airbrush An airbrush on a graphics tablet. + \value PointerDevice.Puck A digitizer with crosshairs, on a graphics tablet. + \value PointerDevice.AllDevices Any type of pointing device. + + \sa QInputDevice::DeviceType +*/ + +/*! + \qmlproperty flags QtQuick::HoverHandler::acceptedPointerTypes + + The types of pointing instruments (generic, stylus, eraser, and so on) + that can activate the pointer handler. + + By default, this property is set to + \l {QPointingDevice::PointerType} {PointerDevice.AllPointerTypes}. + If you set it to an OR combination of device types, it will ignore events + from non-matching events. + + For example, you could provide feedback by changing the cursor depending on + whether a stylus or eraser is hovering over a graphics tablet: + + \snippet pointerHandlers/hoverStylusOrEraser.qml 0 + + The available pointer types are as follows: + + \value PointerDevice.Generic A mouse or a device that emulates a mouse. + \value PointerDevice.Finger A finger on a touchscreen (hover detection is unlikely). + \value PointerDevice.Pen A stylus on a graphics tablet. + \value PointerDevice.Eraser An eraser on a graphics tablet. + \value PointerDevice.Cursor A digitizer with crosshairs, on a graphics tablet. + \value PointerDevice.AllPointerTypes Any type of pointing device. + + \sa QPointingDevice::PointerType +*/ + +/*! + \qmlproperty flags QtQuick::HoverHandler::acceptedModifiers + + If this property is set, a hover event is handled only if the given keyboard + modifiers are pressed. The event is ignored without the modifiers. + + This property is set to \c Qt.KeyboardModifierMask by default, resulting + in handling hover events regardless of any modifier keys. + + For example, an \l[QML]{Item} could have two handlers of the same type, one + of which is enabled only if the required keyboard modifiers are pressed: + + \snippet pointerHandlers/hoverModifiers.qml 0 + + The available modifiers are as follows: + + \value Qt.NoModifier No modifier key is allowed. + \value Qt.ShiftModifier A Shift key on the keyboard must be pressed. + \value Qt.ControlModifier A Ctrl key on the keyboard must be pressed. + \value Qt.AltModifier An Alt key on the keyboard must be pressed. + \value Qt.MetaModifier A Meta key on the keyboard must be pressed. + \value Qt.KeypadModifier A keypad button must be pressed. + \value Qt.GroupSwitchModifier A Mode_switch key on the keyboard must be pressed. + X11 only (unless activated on Windows by a command line argument). + \value Qt.KeyboardModifierMask The handler ignores modifier keys. + + \sa Qt::KeyboardModifier +*/ + +/*! \since 5.15 \qmlproperty Qt::CursorShape QtQuick::HoverHandler::cursorShape This property holds the cursor shape that will appear whenever @@ -202,3 +294,5 @@ void QQuickHoverHandler::setHovered(bool hovered) */ QT_END_NAMESPACE + +#include "moc_qquickhoverhandler_p.cpp" diff --git a/src/quick/handlers/qquickmultipointhandler.cpp b/src/quick/handlers/qquickmultipointhandler.cpp index 2a9ecd341c..443cf4ffbc 100644 --- a/src/quick/handlers/qquickmultipointhandler.cpp +++ b/src/quick/handlers/qquickmultipointhandler.cpp @@ -436,3 +436,5 @@ QMetaProperty &QQuickMultiPointHandlerPrivate::yMetaProperty() const } QT_END_NAMESPACE + +#include "moc_qquickmultipointhandler_p.cpp" diff --git a/src/quick/handlers/qquickpinchhandler.cpp b/src/quick/handlers/qquickpinchhandler.cpp index bf43d56a93..7232f0bb2f 100644 --- a/src/quick/handlers/qquickpinchhandler.cpp +++ b/src/quick/handlers/qquickpinchhandler.cpp @@ -546,3 +546,5 @@ void QQuickPinchHandler::handlePointerEventImpl(QQuickPointerEvent *event) */ QT_END_NAMESPACE + +#include "moc_qquickpinchhandler_p.cpp" diff --git a/src/quick/handlers/qquickpointerdevicehandler.cpp b/src/quick/handlers/qquickpointerdevicehandler.cpp index 90f31bf9fd..b7f0580648 100644 --- a/src/quick/handlers/qquickpointerdevicehandler.cpp +++ b/src/quick/handlers/qquickpointerdevicehandler.cpp @@ -314,3 +314,5 @@ bool QQuickPointerDeviceHandler::wantsPointerEvent(QQuickPointerEvent *event) } QT_END_NAMESPACE + +#include "moc_qquickpointerdevicehandler_p.cpp" diff --git a/src/quick/handlers/qquickpointerhandler.cpp b/src/quick/handlers/qquickpointerhandler.cpp index 25c5e684b7..908c616d74 100644 --- a/src/quick/handlers/qquickpointerhandler.cpp +++ b/src/quick/handlers/qquickpointerhandler.cpp @@ -742,3 +742,5 @@ bool QQuickPointerHandlerPrivate::dragOverThreshold(const QQuickEventPoint *poin } QT_END_NAMESPACE + +#include "moc_qquickpointerhandler_p.cpp" diff --git a/src/quick/handlers/qquickpointhandler.cpp b/src/quick/handlers/qquickpointhandler.cpp index 30f62332ba..6b7b70f17a 100644 --- a/src/quick/handlers/qquickpointhandler.cpp +++ b/src/quick/handlers/qquickpointhandler.cpp @@ -163,3 +163,5 @@ QVector2D QQuickPointHandler::translation() const } QT_END_NAMESPACE + +#include "moc_qquickpointhandler_p.cpp" diff --git a/src/quick/handlers/qquicksinglepointhandler.cpp b/src/quick/handlers/qquicksinglepointhandler.cpp index b51f53b74f..d785d8c0ca 100644 --- a/src/quick/handlers/qquicksinglepointhandler.cpp +++ b/src/quick/handlers/qquicksinglepointhandler.cpp @@ -218,3 +218,5 @@ void QQuickSinglePointHandlerPrivate::reset() } QT_END_NAMESPACE + +#include "moc_qquicksinglepointhandler_p.cpp" diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp index 2284750f15..b722cf7538 100644 --- a/src/quick/handlers/qquicktaphandler.cpp +++ b/src/quick/handlers/qquicktaphandler.cpp @@ -431,3 +431,5 @@ void QQuickTapHandler::updateTimeHeld() from the previous \c tapCount. */ QT_END_NAMESPACE + +#include "moc_qquicktaphandler_p.cpp" diff --git a/src/quick/handlers/qquickwheelhandler.cpp b/src/quick/handlers/qquickwheelhandler.cpp index 16f38af962..7e48d67b8b 100644 --- a/src/quick/handlers/qquickwheelhandler.cpp +++ b/src/quick/handlers/qquickwheelhandler.cpp @@ -527,3 +527,5 @@ QMetaProperty &QQuickWheelHandlerPrivate::targetMetaProperty() const } QT_END_NAMESPACE + +#include "moc_qquickwheelhandler_p.cpp" |