From 4728f66297bf3c4bfac56b12b05e4464bb79fc17 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Fri, 11 Nov 2016 10:27:41 +0100 Subject: Doc: rephase the "logical position" properties The previous phrasing was poor and somewhat confusing. The logical position is expressed as a fraction of the value, in the range 0-1. Change-Id: I6c2a4cbb1385af69392d214dd02224ec876131e5 Task-number: QTBUG-57069 Reviewed-by: Mitch Curtis --- .../controls/doc/src/includes/qquickswitch.qdocinc | 4 ++-- src/quicktemplates2/qquickdial.cpp | 4 ++-- src/quicktemplates2/qquickprogressbar.cpp | 4 ++-- src/quicktemplates2/qquickrangeslider.cpp | 16 ++++++++-------- src/quicktemplates2/qquickslider.cpp | 10 +++++----- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/imports/controls/doc/src/includes/qquickswitch.qdocinc b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc index 32ccbb89..985f85d9 100644 --- a/src/imports/controls/doc/src/includes/qquickswitch.qdocinc +++ b/src/imports/controls/doc/src/includes/qquickswitch.qdocinc @@ -2,7 +2,7 @@ This property holds the logical position of the thumb indicator. -The position is defined as a percentage of the indicator's size, scaled to +The position is expressed as a fraction of the indicator's size, in the range \c 0.0 - \c 1.0. The position can be used for example to determine whether the thumb has been dragged past the halfway point. For visualizing a thumb indicator, the right-to-left aware \l visualPosition should be used instead. @@ -16,7 +16,7 @@ indicator, the right-to-left aware \l visualPosition should be used instead. This property holds the visual position of the thumb indicator. -The position is defined as a percentage of the indicator's size, scaled to +The position is expressed as a fraction of the indicator's size, in the range \c 0.0 - \c 1.0. When the control is \l {Control::mirrored}{mirrored}, the value is equal to \c {1.0 - position}. This makes the value suitable for visualizing the thumb indicator taking right-to-left support into account. diff --git a/src/quicktemplates2/qquickdial.cpp b/src/quicktemplates2/qquickdial.cpp index 22c1133b..79aff781 100644 --- a/src/quicktemplates2/qquickdial.cpp +++ b/src/quicktemplates2/qquickdial.cpp @@ -280,8 +280,8 @@ void QQuickDial::setValue(qreal value) This property holds the logical position of the handle. - The position is defined as a percentage of the control's angle range (the - range within which the handle can be moved) scaled to \c {0.0 - 1.0}. + The position is expressed as a fraction of the control's angle range (the + range within which the handle can be moved) in the range \c {0.0 - 1.0}. Unlike the \l value property, the \c position is continuously updated while the handle is dragged. diff --git a/src/quicktemplates2/qquickprogressbar.cpp b/src/quicktemplates2/qquickprogressbar.cpp index 5d5503e6..d8ada6f4 100644 --- a/src/quicktemplates2/qquickprogressbar.cpp +++ b/src/quicktemplates2/qquickprogressbar.cpp @@ -192,7 +192,7 @@ void QQuickProgressBar::setValue(qreal value) This property holds the logical position of the progress. - The position is defined as a percentage of the value, scaled to + The position is expressed as a fraction of the value, in the range \c {0.0 - 1.0}. For visualizing the progress, the right-to-left aware \l visualPosition should be used instead. @@ -212,7 +212,7 @@ qreal QQuickProgressBar::position() const This property holds the visual position of the progress. - The position is defined as a percentage of the value, scaled to \c {0.0 - 1.0}. + The position is expressed as a fraction of the value, in the range \c {0.0 - 1.0}. When the control is \l {Control::mirrored}{mirrored}, \c visuaPosition is equal to \c {1.0 - position}. This makes \c visualPosition suitable for visualizing the progress, taking right-to-left support into account. diff --git a/src/quicktemplates2/qquickrangeslider.cpp b/src/quicktemplates2/qquickrangeslider.cpp index 17871cfe..602dcb0f 100644 --- a/src/quicktemplates2/qquickrangeslider.cpp +++ b/src/quicktemplates2/qquickrangeslider.cpp @@ -68,8 +68,8 @@ QT_BEGIN_NAMESPACE } \endcode - The \l {first.position} and \l {second.position} properties are defined as a - percentage of the control's size, scaled within the range \c {0.0 - 1.0}. + The \l {first.position} and \l {second.position} properties are expressed as a + fraction of the control's size, in the range \c {0.0 - 1.0}. The \l {first.visualPosition} and \l {second.visualPosition} properties are the same, except that they are reversed in a \l {Right-to-left User Interfaces}{right-to-left} application. @@ -455,7 +455,7 @@ void QQuickRangeSlider::setTo(qreal to) \li visualPosition \li This property holds the visual position of the first handle. - The position is defined as a percentage of the control's size, scaled to + The position is expressed as a fraction of the control's size, in the range \c {0.0 - 1.0}. When the control is \l {Control::mirrored}{mirrored}, the value is equal to \c {1.0 - position}. This makes the value suitable for visualizing the slider, taking right-to-left support into account. @@ -463,8 +463,8 @@ void QQuickRangeSlider::setTo(qreal to) \li position \li This property holds the logical position of the first handle. - The position is defined as a percentage of the control's size, scaled - to \c {0.0 - 1.0}. Unlike \l {first.value}{value}, position is + The position is expressed as a fraction of the control's size, in the range + \c {0.0 - 1.0}. Unlike \l {first.value}{value}, position is continuously updated while the handle is dragged. For visualizing a slider, the right-to-left aware \l {first.visualPosition}{visualPosition} should be used instead. @@ -512,7 +512,7 @@ QQuickRangeSliderNode *QQuickRangeSlider::first() const \li visualPosition \li This property holds the visual position of the second handle. - The position is defined as a percentage of the control's size, scaled to + The position is expressed as a fraction of the control's size, in the range \c {0.0 - 1.0}. When the control is \l {Control::mirrored}{mirrored}, the value is equal to \c {1.0 - position}. This makes the value suitable for visualizing the slider, taking right-to-left support into account. @@ -520,8 +520,8 @@ QQuickRangeSliderNode *QQuickRangeSlider::first() const \li position \li This property holds the logical position of the second handle. - The position is defined as a percentage of the control's size, scaled - to \c {0.0 - 1.0}. Unlike \l {second.value}{value}, position is + The position is expressed as a fraction of the control's size, in the range + \c {0.0 - 1.0}. Unlike \l {second.value}{value}, position is continuously updated while the handle is dragged. For visualizing a slider, the right-to-left aware \l {second.visualPosition}{visualPosition} should be used instead. diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp index e403aa6d..454002c2 100644 --- a/src/quicktemplates2/qquickslider.cpp +++ b/src/quicktemplates2/qquickslider.cpp @@ -64,8 +64,8 @@ QT_BEGIN_NAMESPACE } \endcode - The \l position property is defined as a percentage of the control's size, - scaled within the range \c {0.0 - 1.0}. The \l visualPosition property is + The \l position property is expressed as a fraction of the control's size, + in the range \c {0.0 - 1.0}. The \l visualPosition property is the same, except that it is reversed in a \l {Right-to-left User Interfaces}{right-to-left} application. The visualPosition is useful for positioning the handle when styling Slider. @@ -263,8 +263,8 @@ void QQuickSlider::setValue(qreal value) This property holds the logical position of the handle. - The position is defined as a percentage of the control's size, scaled - to \c {0.0 - 1.0}. Unlike the \l value property, the \c position is + The position is expressed as a fraction of the control's size, in the range + \c {0.0 - 1.0}. Unlike the \l value property, the \c position is continuously updated while the handle is dragged. For visualizing a slider, the right-to-left aware \l visualPosition should be used instead. @@ -282,7 +282,7 @@ qreal QQuickSlider::position() const This property holds the visual position of the handle. - The position is defined as a percentage of the control's size, scaled to + The position is expressed as a fraction of the control's size, in the range \c {0.0 - 1.0}. When the control is \l {Control::mirrored}{mirrored}, the value is equal to \c {1.0 - position}. This makes the value suitable for visualizing the slider, taking right-to-left support into account. -- cgit v1.2.3