Kirigami2
wheelhandler.h
87 * for instance it can be used to block the handler to manage the scroll of a view on some scenarios
145 * WheelHandler filters events from a Flickable, a vertical ScrollBar and a horizontal ScrollBar.
146 * Wheel and KeyPress events (when `keyNavigationEnabled` is true) are used to scroll the Flickable.
147 * When `filterMouseEvents` is true, WheelHandler blocks mouse button input from reaching the Flickable
152 * - 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.
153 * - When using angle delta, scroll using the step increments defined by `verticalStepSize` and `horizontalStepSize`.
155 * - 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.
156 * - 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.
179 * The default value is equivalent to `20 * Qt.styleHints.wheelScrollLines`. This is consistent with the default increment for QScrollArea.
187 NOTIFY verticalStepSizeChanged FINAL)
192 * The default value is equivalent to `20 * Qt.styleHints.wheelScrollLines`. This is consistent with the default increment for QScrollArea.
200 NOTIFY horizontalStepSizeChanged FINAL)
205 * The default value is equivalent to `Qt.ControlModifier | Qt.ShiftModifier`. This matches QScrollBar, which uses QAbstractSlider behavior.
211 NOTIFY pageScrollModifiersChanged FINAL)
214 * @brief This property holds whether the WheelHandler filters mouse events like a Qt Quick Controls ScrollView would.
220 * Hover events on the scrollbars and wheel events on anything also make the scrollbars interactive when this property is set to true.
227 WRITE setFilterMouseEvents NOTIFY filterMouseEventsChanged FINAL)
247 WRITE setKeyNavigationEnabled NOTIFY keyNavigationEnabledChanged FINAL)
250 * @brief This property holds whether the WheelHandler blocks all wheel events from reaching the Flickable.
252 * 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.
254 * 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.
261 * @brief This property holds whether the WheelHandler can use wheel events to scroll the Flickable.
265 Q_PROPERTY(bool scrollFlickableTarget MEMBER m_scrollFlickableTarget NOTIFY scrollFlickableTargetChanged)
293 * Scroll up one step. If the stepSize parameter is less than 0, the verticalStepSize will be used.
302 * Scroll down one step. If the stepSize parameter is less than 0, the verticalStepSize will be used.
311 * Scroll left one step. If the stepSize parameter is less than 0, the horizontalStepSize will be used.
320 * Scroll right one step. If the stepSize parameter is less than 0, the horizontalStepSize will be used.
339 * @brief This signal is emitted when a wheel event reaches the event filter, just before scrolling is handled.
379 constexpr static Qt::KeyboardModifiers m_defaultPageScrollModifiers = Qt::ControlModifier | Qt::ShiftModifier;
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SLOTSQ_SLOTS
Handles scrolling for a Flickable and 2 attached ScrollBars.
Definition: wheelhandler.h:167
wheelScrollLines
virtual bool eventFilter(QObject *watched, QEvent *event)
virtual bool event(QEvent *e)
QStyleHints * styleHints()
Q_INVOKABLEQ_INVOKABLE
Q_SIGNALSQ_SIGNALS
void setTarget(const SkyPoint &targetCoord)
typedef KeyboardModifiers
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Jan 29 2023 04:11:03 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.