aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.pngbin1019 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-focused.pngbin1154 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider-normal.pngbin1154 -> 0 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider.gifbin16972 -> 13697 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-slider.pngbin1117 -> 0 bytes
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml34
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml34
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml33
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-input.qdoc2
-rw-r--r--src/quicktemplates2/qquickslider.cpp21
10 files changed, 13 insertions, 111 deletions
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png
deleted file mode 100644
index 919a9a2b..00000000
--- a/src/imports/controls/doc/images/qtquickcontrols2-slider-disabled.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png
deleted file mode 100644
index e6c4179c..00000000
--- a/src/imports/controls/doc/images/qtquickcontrols2-slider-focused.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png b/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png
deleted file mode 100644
index e6c4179c..00000000
--- a/src/imports/controls/doc/images/qtquickcontrols2-slider-normal.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif
index 7cb84b56..2ee56334 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-slider.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-slider.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-slider.png b/src/imports/controls/doc/images/qtquickcontrols2-slider.png
deleted file mode 100644
index 2e27a604..00000000
--- a/src/imports/controls/doc/images/qtquickcontrols2-slider.png
+++ /dev/null
Binary files differ
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml
deleted file mode 100644
index bde161aa..00000000
--- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-disabled.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 2.0
-
-Slider {
- value: 0.5
- enabled: false
-}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml
deleted file mode 100644
index b32f8b5a..00000000
--- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-focused.qml
+++ /dev/null
@@ -1,34 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 2.0
-
-Slider {
- value: 0.5
- focus: true
-}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml
deleted file mode 100644
index 8363e862..00000000
--- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-slider-normal.qml
+++ /dev/null
@@ -1,33 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 2.0
-
-Slider {
- value: 0.5
-}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
index 70d5f54c..c3583fd1 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
@@ -85,7 +85,7 @@
\section1 Slider Control
- \image qtquickcontrols2-slider.png
+ \image qtquickcontrols2-slider.gif
\l Slider is used to select a value by sliding a handle along a track.
diff --git a/src/quicktemplates2/qquickslider.cpp b/src/quicktemplates2/qquickslider.cpp
index d01f26b9..e0df7e69 100644
--- a/src/quicktemplates2/qquickslider.cpp
+++ b/src/quicktemplates2/qquickslider.cpp
@@ -54,21 +54,24 @@ QT_BEGIN_NAMESPACE
Slider is used to select a value by sliding a handle along a track.
- \table
- \row \li \image qtquickcontrols2-slider-normal.png
- \li A slider in its normal state.
- \row \li \image qtquickcontrols2-slider-focused.png
- \li A slider that has active focus.
- \row \li \image qtquickcontrols2-slider-disabled.png
- \li A slider that is disabled.
- \endtable
+ In the example below, custom \l from, \l value, and \l to values are set:
\code
Slider {
- value: 0.5
+ from: 1
+ value: 25
+ to: 100
}
\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 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.
+ In the example above, \l visualPosition will be \c 0.24 in a left-to-right
+ application, and \c 0.76 in a right-to-left application.
+
\sa {Customizing Slider}, {Input Controls}
*/