aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickpathview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/items/qquickpathview.cpp')
-rw-r--r--src/quick/items/qquickpathview.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/quick/items/qquickpathview.cpp b/src/quick/items/qquickpathview.cpp
index 7798641fcd..091fb3eb4d 100644
--- a/src/quick/items/qquickpathview.cpp
+++ b/src/quick/items/qquickpathview.cpp
@@ -922,34 +922,37 @@ QQuickItem *QQuickPathView::highlightItem()
\qmlproperty enumeration QtQuick2::PathView::highlightRangeMode
These properties set the preferred range of the highlight (current item)
- within the view. The preferred values must be in the range 0.0-1.0.
+ within the view. The preferred values must be in the range 0.0-1.0.
- If highlightRangeMode is set to \e PathView.NoHighlightRange
+ Valid values for \c highlightRangeMode are:
- If highlightRangeMode is set to \e PathView.ApplyRange the view will
- attempt to maintain the highlight within the range, however
- the highlight can move outside of the range at the ends of the path
- or due to a mouse interaction.
+ \list
+ \li \e PathView.NoHighlightRange - no range is applied and the
+ highlight will move freely within the view.
+ \li \e PathView.ApplyRange - the view will attempt to maintain
+ the highlight within the range, however the highlight can
+ move outside of the range at the ends of the path or due to
+ a mouse interaction.
+ \li \e PathView.StrictlyEnforceRange - the highlight will never
+ move outside of the range. This means that the current item
+ will change if a keyboard or mouse action would cause the
+ highlight to move outside of the range.
+ \endlist
- If highlightRangeMode is set to \e PathView.StrictlyEnforceRange the highlight will never
- move outside of the range. This means that the current item will change
- if a keyboard or mouse action would cause the highlight to move
- outside of the range.
+ The default value is \e PathView.StrictlyEnforceRange.
- Note that this is the correct way to influence where the
+ Defining a highlight range is the correct way to influence where the
current item ends up when the view moves. For example, if you want the
currently selected item to be in the middle of the path, then set the
- highlight range to be 0.5,0.5 and highlightRangeMode to PathView.StrictlyEnforceRange.
+ highlight range to be 0.5,0.5 and highlightRangeMode to \e PathView.StrictlyEnforceRange.
Then, when the path scrolls,
the currently selected item will be the item at that position. This also applies to
when the currently selected item changes - it will scroll to within the preferred
highlight range. Furthermore, the behaviour of the current item index will occur
whether or not a highlight exists.
- The default value is \e PathView.StrictlyEnforceRange.
-
- Note that a valid range requires preferredHighlightEnd to be greater
- than or equal to preferredHighlightBegin.
+ \note A valid range requires \c preferredHighlightEnd to be greater
+ than or equal to \c preferredHighlightBegin.
*/
qreal QQuickPathView::preferredHighlightBegin() const
{