aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Reinio <topi.reinio@digia.com>2013-07-16 15:01:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-01 14:15:52 +0200
commit78c325b7c51e6021de643fe791555a1b015948a0 (patch)
tree113f8712c4e9160b45af5eb31f832f4c01eb4bad /src
parent0a4efa39fafa017a232c5098c6d904377fc88ee9 (diff)
Doc: Clean up docs for PathView.highlightRangeMode enum values
Fix PathView.NoHighlightRange description, move the enum values into a list, and do some minor editing. Task-number: QTBUG-16160 Change-Id: I5356c21ea3244ce43defa346da11696a8706c71f Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src')
-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
{