MauiKit Controls
wheelhandler.h
148 * WheelHandler filters events from a Flickable, a vertical ScrollBar and a horizontal ScrollBar.
149 * Wheel and KeyPress events (when `keyNavigationEnabled` is true) are used to scroll the Flickable.
150 * When `filterMouseEvents` is true, WheelHandler blocks mouse button input from reaching the Flickable
155 * - Pixel delta is ignored unless angle delta is not available because pixel delta scrolling is too slow. Qt Widgets doesn't use pixel delta either, so the default scroll speed should be consistent with Qt Widgets.
156 * - When using angle delta, scroll using the step increments defined by `verticalStepSize` and `horizontalStepSize`.
158 * - When using a device that doesn't use 120 angle delta unit increments such as a touchpad, the `verticalStepSize`, `horizontalStepSize` and page increments (if using page scrolling) will be multiplied by `angle delta / 120` to keep scrolling smooth.
159 * - If scrolling has happened in the last 400ms, use an internal QQuickItem stacked over the Flickable's contentItem to catch wheel events and use those wheel events to scroll, if possible. This prevents controls inside the Flickable's contentItem that allow scrolling to change the value (e.g., Sliders, SpinBoxes) from conflicting with scrolling the page.
184 * The default value is equivalent to `20 * Qt.styleHints.wheelScrollLines`. This is consistent with the default increment for QScrollArea.
197 * The default value is equivalent to `20 * Qt.styleHints.wheelScrollLines`. This is consistent with the default increment for QScrollArea.
210 * The default value is equivalent to `Qt.ControlModifier | Qt.ShiftModifier`. This matches QScrollBar, which uses QAbstractSlider behavior.
219 * @brief This property holds whether the WheelHandler filters mouse events like a Qt Quick Controls ScrollView would.
225 * Hover events on the scrollbars and wheel events on anything also make the scrollbars interactive when this property is set to true.
255 * @brief This property holds whether the WheelHandler blocks all wheel events from reaching the Flickable.
257 * When this property is false, scrolling the Flickable with WheelHandler will only block an event from reaching the Flickable if the Flickable is actually scrolled by WheelHandler.
259 * NOTE: Wheel events created by touchpad gestures with pixel deltas will always be accepted no matter what. This is because they will cause the Flickable to jump back to where scrolling started unless the events are always accepted before they reach the Flickable.
266 * @brief This property holds whether the WheelHandler can use wheel events to scroll the Flickable.
270 Q_PROPERTY(bool scrollFlickableTarget MEMBER m_scrollFlickableTarget NOTIFY scrollFlickableTargetChanged)
272 Q_PROPERTY(Qt::Orientation primaryOrientation READ primaryOrientation WRITE setPrimaryOrientation NOTIFY primaryOrientationChanged)
302 * Scroll up one step. If the stepSize parameter is less than 0, the verticalStepSize will be used.
311 * Scroll down one step. If the stepSize parameter is less than 0, the verticalStepSize will be used.
320 * Scroll left one step. If the stepSize parameter is less than 0, the horizontalStepSize will be used.
329 * Scroll right one step. If the stepSize parameter is less than 0, the horizontalStepSize will be used.
348 * @brief This signal is emitted when a wheel event reaches the event filter, just before scrolling is handled.
391 constexpr static Qt::KeyboardModifiers m_defaultPageScrollModifiers = Qt::ControlModifier | Qt::ShiftModifier;
Handles scrolling for a Flickable and 2 attached ScrollBars.
Definition wheelhandler.h:171
bool filterMouseEvents
This property holds whether the WheelHandler filters mouse events like a Qt Quick Controls ScrollView...
Definition wheelhandler.h:232
Qt::KeyboardModifiers pageScrollModifiers
This property holds the keyboard modifiers that will be used to start page scrolling.
Definition wheelhandler.h:216
bool keyNavigationEnabled
This property holds whether the WheelHandler handles keyboard scrolling.
Definition wheelhandler.h:252
QML_ELEMENTQQuickItem * target
This property holds the Qt Quick Flickable that the WheelHandler will control.
Definition wheelhandler.h:179
Q_INVOKABLE bool scrollRight(qreal stepSize=-1)
Scroll right one step.
Definition wheelhandler.cpp:556
void wheel(KirigamiWheelEvent *wheel)
This signal is emitted when a wheel event reaches the event filter, just before scrolling is handled.
bool scrollFlickableTarget
This property holds whether the WheelHandler can use wheel events to scroll the Flickable.
Definition wheelhandler.h:270
bool blockTargetWheel
This property holds whether the WheelHandler blocks all wheel events from reaching the Flickable.
Definition wheelhandler.h:263
QStyleHints * styleHints()
QObject(QObject *parent)
Q_INTERFACES(...)
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
virtual bool event(QEvent *e)
QObject * parent() const const
wheelScrollLines
typedef KeyboardModifiers
Orientation
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:57:11 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.