aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/doc
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/controls/doc')
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-delaybutton-custom.pngbin0 -> 7340 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-delaybutton.gifbin0 -> 12595 bytes
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml37
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-listView.qml2
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml4
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-delaybutton-custom.qml82
-rw-r--r--src/imports/controls/doc/src/includes/inputmethodhints.qdocinc38
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc16
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc10
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc1
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc2
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc6
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-index.qdoc2
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-input.qdoc1
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-material.qdoc2
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc4
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc2
17 files changed, 197 insertions, 12 deletions
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-delaybutton-custom.png b/src/imports/controls/doc/images/qtquickcontrols2-delaybutton-custom.png
new file mode 100644
index 00000000..be7f2586
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-delaybutton-custom.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-delaybutton.gif b/src/imports/controls/doc/images/qtquickcontrols2-delaybutton.gif
new file mode 100644
index 00000000..16a198f9
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-delaybutton.gif
Binary files differ
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
new file mode 100644
index 00000000..a5e81ab7
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-swipedelegate-transition.qml
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 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.9
+import QtQuick.Controls 2.2
+
+//! [1]
+SwipeDelegate {
+ swipe.transition: Transition {
+ SmoothedAnimation { velocity: 3; easing.type: Easing.InOutCubic }
+ }
+}
+//! [1]
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-listView.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-listView.qml
index ff3ecd81..e742aba7 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-listView.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-tumbler-listView.qml
@@ -39,7 +39,7 @@ Tumbler {
snapMode: ListView.SnapToItem
highlightRangeMode: ListView.StrictlyEnforceRange
preferredHighlightBegin: height / 2 - (height / tumbler.visibleItemCount / 2)
- preferredHighlightEnd: height / 2 + (height / tumbler.visibleItemCount / 2)
+ preferredHighlightEnd: height / 2 + (height / tumbler.visibleItemCount / 2)
clip: true
}
}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml
index 12d56a56..f7d6792f 100644
--- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-combobox-custom.qml
@@ -92,12 +92,12 @@ ComboBox {
popup: Popup {
y: control.height - 1
width: control.width
- implicitHeight: listview.contentHeight
+ implicitHeight: contentItem.implicitHeight
padding: 1
contentItem: ListView {
- id: listview
clip: true
+ implicitHeight: contentHeight
model: control.popup.visible ? control.delegateModel : null
currentIndex: control.highlightedIndex
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-delaybutton-custom.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-delaybutton-custom.qml
new file mode 100644
index 00000000..2453e2d6
--- /dev/null
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-delaybutton-custom.qml
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 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$
+**
+****************************************************************************/
+
+//! [file]
+import QtQuick 2.6
+import QtQuick.Controls 2.2
+
+DelayButton {
+ id: control
+ checked: true
+ text: qsTr("Delay\nButton")
+
+ contentItem: Text {
+ text: control.text
+ font: control.font
+ opacity: enabled ? 1.0 : 0.3
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ elide: Text.ElideRight
+ }
+
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 100
+ opacity: enabled ? 1 : 0.3
+ color: control.down ? "#17a81a" : "#21be2b"
+ radius: size / 2
+
+ readonly property real size: Math.min(control.width, control.height)
+ width: size
+ height: size
+ anchors.centerIn: parent
+
+ Canvas {
+ id: canvas
+ anchors.fill: parent
+
+ Connections {
+ target: control
+ onProgressChanged: canvas.requestPaint()
+ }
+
+ onPaint: {
+ var ctx = getContext("2d")
+ ctx.clearRect(0, 0, width, height)
+ ctx.strokeStyle = "white"
+ ctx.lineWidth = parent.size / 20
+ ctx.beginPath()
+ var startAngle = Math.PI / 5 * 3
+ var endAngle = startAngle + control.progress * Math.PI / 5 * 9
+ ctx.arc(width / 2, height / 2, width / 2 - ctx.lineWidth / 2 - 2, startAngle, endAngle)
+ ctx.stroke()
+ }
+ }
+ }
+}
+//! [file]
diff --git a/src/imports/controls/doc/src/includes/inputmethodhints.qdocinc b/src/imports/controls/doc/src/includes/inputmethodhints.qdocinc
new file mode 100644
index 00000000..73710e1e
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/inputmethodhints.qdocinc
@@ -0,0 +1,38 @@
+//! [flags]
+The value is a bit-wise combination of flags or \c Qt.ImhNone if no hints are set.
+
+Flags that alter behavior are:
+
+\list
+\li Qt.ImhHiddenText - Characters should be hidden, as is typically used when entering passwords.
+\li Qt.ImhSensitiveData - Typed text should not be stored by the active input method
+ in any persistent storage like predictive user dictionary.
+\li Qt.ImhNoAutoUppercase - The input method should not try to automatically switch to upper case
+ when a sentence ends.
+\li Qt.ImhPreferNumbers - Numbers are preferred (but not required).
+\li Qt.ImhPreferUppercase - Upper case letters are preferred (but not required).
+\li Qt.ImhPreferLowercase - Lower case letters are preferred (but not required).
+\li Qt.ImhNoPredictiveText - Do not use predictive text (i.e. dictionary lookup) while typing.
+
+\li Qt.ImhDate - The text editor functions as a date field.
+\li Qt.ImhTime - The text editor functions as a time field.
+\endlist
+
+Flags that restrict input (exclusive flags) are:
+
+\list
+\li Qt.ImhDigitsOnly - Only digits are allowed.
+\li Qt.ImhFormattedNumbersOnly - Only number input is allowed. This includes decimal point and minus sign.
+\li Qt.ImhUppercaseOnly - Only upper case letter input is allowed.
+\li Qt.ImhLowercaseOnly - Only lower case letter input is allowed.
+\li Qt.ImhDialableCharactersOnly - Only characters suitable for phone dialing are allowed.
+\li Qt.ImhEmailCharactersOnly - Only characters suitable for email addresses are allowed.
+\li Qt.ImhUrlCharactersOnly - Only characters suitable for URLs are allowed.
+\endlist
+
+Masks:
+
+\list
+\li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
+\endlist
+//! [flags]
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
index d79dd198..6080d7b1 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
@@ -41,7 +41,6 @@
\section1 Button Control
-
\l Button is a clickable control that starts an action, or opens or
closes a popup. A button usually has a text label but it can also
contain an icon.
@@ -100,6 +99,21 @@
\b {See also} \l CheckBox
+ \section1 DelayButton Control
+
+ \l DelayButton is a button that incorporates a delay before triggering an action.
+ This delay prevents accidental presses.
+
+ \image qtquickcontrols2-delaybutton.gif
+
+ Recommendations:
+ \list
+ \li Use in touch user interfaces.
+ \li Use for actions that must be triggered with care.
+ \endlist
+
+ \b {See also} \l Button and \l AbstractButton
+
\section1 RadioButton Control
\image qtquickcontrols2-radiobutton.gif
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
index 06201404..82914610 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -419,6 +419,16 @@
\snippet qtquickcontrols2-combobox-custom.qml file
+ \section2 Customizing DelayButton
+
+ DelayButton consists of two visual items: \l {Control::background}{background}
+ and \l {Control::contentItem}{content item}.
+
+ \image qtquickcontrols2-delaybutton-custom.png
+
+ \snippet qtquickcontrols2-delaybutton-custom.qml file
+
+
\section2 Customizing Dial
Dial consists of two visual items: \l {Control::background}{background}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc
index 33b97850..c3399d43 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-delegates.qdoc
@@ -77,4 +77,3 @@
\li \l {Qt Quick Controls 2 Guidelines}
\endlist
*/
-
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
index 01429b94..4ea5e4e6 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-differences.qdoc
@@ -471,7 +471,7 @@
\li
\row
\li \l [QML QtQuickExtras] {DelayButton}
- \li \mdash
+ \li \l [QML QtQuickControls2] {DelayButton}
\li
\li
\row
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
index c83adf4b..93ab0bbb 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-environment.qdoc
@@ -47,6 +47,12 @@
\li Specifies a fallback style for \l {Creating a Custom Style}{custom styles}.
The value can be one of the built-in styles, for example \c "Material",
\row
+ \li \c QT_QUICK_CONTROLS_STYLE_PATH
+ \li Specifies a list of additional paths that are used to lookup \l {Styling Qt Quick Controls 2}
+ {Qt Quick Controls 2 styles}. Multiple path entries must be \l {QDir::listSeparator}{separated}
+ by \c ':' under Unix and \c ';' under Windows. By default, styles are looked up from
+ \c $QML2_IMPORT_PATH/QtQuick/Controls.2.
+ \row
\li \c QT_QUICK_CONTROLS_CONF
\li Specifies the location of the \l {Qt Quick Controls 2 configuration file}.
By default, the configuration file is loaded from the application's
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
index d3f3ec52..a7a5abe4 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc
@@ -41,7 +41,7 @@
application using the following import statement in your \c {.qml} file:
\code
- import QtQuick.Controls 2.1
+ import QtQuick.Controls 2.2
\endcode
The \l{Qt Quick Controls 2 C++ Classes}{C++ classes} can be included into
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
index ce7b6aa4..fb609428 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-input.qdoc
@@ -96,7 +96,6 @@
\l RangeSlider is used to select a range specified by two values,
by sliding each handle along a track.
-
\b {See also} \l {Slider Control}.
\section1 Tumbler Control
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
index d841c46d..d6670c76 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-material.qdoc
@@ -32,7 +32,7 @@
The Material Style is based on the Google Material Design Guidelines.
\l{detailed-desc-material}{More...}
- \styleimport {QtQuick.Controls.Material 2.1} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Material 2.2} {Qt 5.7}
\section1 Attached Properties
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
index 2add71b2..4ddc2677 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-qmltypes.qdoc
@@ -26,7 +26,7 @@
****************************************************************************/
/*!
- \qmlmodule QtQuick.Controls 2.1
+ \qmlmodule QtQuick.Controls 2.2
\title Qt Quick Controls 2 QML Types
\ingroup qmlmodules
\brief Provides QML types for user interfaces (Qt Quick Controls 2).
@@ -39,7 +39,7 @@
using the following import statement in your .qml file:
\badcode
- import QtQuick.Controls 2.1
+ import QtQuick.Controls 2.2
\endcode
\section1 QML Types
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
index 104c682f..d28d507e 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-universal.qdoc
@@ -32,7 +32,7 @@
The Universal Style is based on the Microsoft Universal Design Guidelines.
\l {detailed-desc-universal}{More...}
- \styleimport {QtQuick.Controls.Universal 2.1} {Qt 5.7}
+ \styleimport {QtQuick.Controls.Universal 2.2} {Qt 5.7}
\section1 Attached Properties