diff options
author | Liang Qi <liang.qi@qt.io> | 2018-01-09 21:52:12 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-01-09 21:54:50 +0100 |
commit | ef5e426bed3b1362394c7cc0c97522bb20cacff0 (patch) | |
tree | 0450da77b661d2e97eb7628b4c667ee22c6dc443 /src/imports/controls | |
parent | 2cdec3eadc7ac1d1e5c4cd505b60196e44df1a7d (diff) | |
parent | 10b8f6af42a1cd80273d0a2d36e75b79078b5994 (diff) |
Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
.qmake.conf
src/quicktemplates2/qquickabstractbutton_p.h
Change-Id: I265cbd2ce51beaf2afef99292c2e2798dadb4ba3
Diffstat (limited to 'src/imports/controls')
68 files changed, 1629 insertions, 258 deletions
diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml index 5fe39101..087c9d75 100644 --- a/src/imports/controls/CheckDelegate.qml +++ b/src/imports/controls/CheckDelegate.qml @@ -76,7 +76,7 @@ T.CheckDelegate { implicitWidth: 28 implicitHeight: 28 - x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2 + x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding y: control.topPadding + (control.availableHeight - height) / 2 color: control.down ? control.palette.light : control.palette.base diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml index 3bfa2ea7..defbff29 100644 --- a/src/imports/controls/ComboBox.qml +++ b/src/imports/controls/ComboBox.qml @@ -80,7 +80,7 @@ T.ComboBox { enabled: control.editable autoScroll: control.editable - readOnly: control.popup.visible + readOnly: control.down inputMethodHints: control.inputMethodHints validator: control.validator @@ -103,7 +103,7 @@ T.ComboBox { implicitWidth: 140 implicitHeight: 40 - color: control.down || popup.visible ? control.palette.mid : control.palette.button + color: control.down ? control.palette.mid : control.palette.button border.color: control.palette.highlight border.width: !control.editable && control.visualFocus ? 2 : 0 visible: !control.flat || control.down @@ -119,7 +119,7 @@ T.ComboBox { contentItem: ListView { clip: true implicitHeight: contentHeight - model: control.popup.visible ? control.delegateModel : null + model: control.delegateModel currentIndex: control.highlightedIndex highlightMoveDuration: 0 diff --git a/src/imports/controls/designer/AbstractButtonSection.qml b/src/imports/controls/designer/AbstractButtonSection.qml new file mode 100644 index 00000000..3d3dad5d --- /dev/null +++ b/src/imports/controls/designer/AbstractButtonSection.qml @@ -0,0 +1,105 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + caption: qsTr("AbstractButton") + + SectionLayout { + Label { + text: qsTr("Text") + tooltip: qsTr("The text displayed on the button.") + } + SecondColumnLayout { + LineEdit { + backendValue: backendValues.text + Layout.fillWidth: true + } + } + + Label { + visible: checkable + text: qsTr("Checkable") + tooltip: qsTr("Whether the button is checkable.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.checkable.valueToString + backendValue: backendValues.checkable + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Checked") + tooltip: qsTr("Whether the button is checked.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.checked.valueToString + backendValue: backendValues.checked + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Exclusive") + tooltip: qsTr("Whether the button is exclusive.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.autoExclusive.valueToString + backendValue: backendValues.autoExclusive + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Repeat") + tooltip: qsTr("Whether the button repeats while pressed and held down.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.autoRepeat.valueToString + backendValue: backendValues.autoRepeat + Layout.fillWidth: true + } + } + } +} diff --git a/src/imports/controls/designer/BusyIndicatorSpecifics.qml b/src/imports/controls/designer/BusyIndicatorSpecifics.qml index 78a00e8e..cf51efd2 100644 --- a/src/imports/controls/designer/BusyIndicatorSpecifics.qml +++ b/src/imports/controls/designer/BusyIndicatorSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Busy Indicator") + caption: qsTr("BusyIndicator") SectionLayout { Label { diff --git a/src/imports/controls/designer/ButtonSection.qml b/src/imports/controls/designer/ButtonSection.qml index 05834fdf..15e23df9 100644 --- a/src/imports/controls/designer/ButtonSection.qml +++ b/src/imports/controls/designer/ButtonSection.qml @@ -40,22 +40,12 @@ import QtQuick.Layouts 1.0 Section { id: section + caption: qsTr("Button") SectionLayout { Label { - text: qsTr("Text") - tooltip: qsTr("The text displayed on the %1.").arg(section.caption.toLowerCase()) - } - SecondColumnLayout { - LineEdit { - backendValue: backendValues.text - Layout.fillWidth: true - } - } - - Label { text: qsTr("Highlighted") - tooltip: qsTr("Whether the %1 is highlighted.").arg(section.caption.toLowerCase()) + tooltip: qsTr("Whether the button is highlighted.") } SecondColumnLayout { CheckBox { @@ -64,54 +54,5 @@ Section { Layout.fillWidth: true } } - - Label { - visible: checkable - text: qsTr("Checkable") - tooltip: qsTr("Whether the %1 is checkable.").arg(section.caption.toLowerCase()) - } - SecondColumnLayout { - CheckBox { - text: backendValues.checkable.valueToString - backendValue: backendValues.checkable - Layout.fillWidth: true - } - } - - Label { - text: qsTr("Checked") - tooltip: qsTr("Whether the %1 is checked.").arg(section.caption.toLowerCase()) - } - SecondColumnLayout { - CheckBox { - text: backendValues.checked.valueToString - backendValue: backendValues.checked - Layout.fillWidth: true - } - } - - Label { - text: qsTr("Exclusive") - tooltip: qsTr("Whether the %1 is exclusive.").arg(section.caption.toLowerCase()) - } - SecondColumnLayout { - CheckBox { - text: backendValues.autoExclusive.valueToString - backendValue: backendValues.autoExclusive - Layout.fillWidth: true - } - } - - Label { - text: qsTr("Repeat") - tooltip: qsTr("Whether the %1 repeats while pressed and held down.").arg(section.caption.toLowerCase()) - } - SecondColumnLayout { - CheckBox { - text: backendValues.autoRepeat.valueToString - backendValue: backendValues.autoRepeat - Layout.fillWidth: true - } - } } } diff --git a/src/imports/controls/designer/ButtonSpecifics.qml b/src/imports/controls/designer/ButtonSpecifics.qml index 4a9e58c2..7b5d0a24 100644 --- a/src/imports/controls/designer/ButtonSpecifics.qml +++ b/src/imports/controls/designer/ButtonSpecifics.qml @@ -42,7 +42,10 @@ Column { width: parent.width ButtonSection { - caption: qsTr("Button") + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/CheckBoxSpecifics.qml b/src/imports/controls/designer/CheckBoxSpecifics.qml index bae0a03c..f11c55a1 100644 --- a/src/imports/controls/designer/CheckBoxSpecifics.qml +++ b/src/imports/controls/designer/CheckBoxSpecifics.qml @@ -41,8 +41,12 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Check Box") + CheckSection { + width: parent.width + caption: qsTr("CheckBox") + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/CheckDelegateSpecifics.qml b/src/imports/controls/designer/CheckDelegateSpecifics.qml index bd885430..d5c92d87 100644 --- a/src/imports/controls/designer/CheckDelegateSpecifics.qml +++ b/src/imports/controls/designer/CheckDelegateSpecifics.qml @@ -41,8 +41,16 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Check Delegate") + CheckSection { + width: parent.width + caption: qsTr("CheckDelegate") + } + + ItemDelegateSection { + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/CheckSection.qml b/src/imports/controls/designer/CheckSection.qml new file mode 100644 index 00000000..28353874 --- /dev/null +++ b/src/imports/controls/designer/CheckSection.qml @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + SectionLayout { + Label { + text: qsTr("Check State") + tooltip: qsTr("The current check state.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.checkState + model: [ "Unchecked", "PartiallyChecked", "Checked" ] + scope: "Qt" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Tri-state") + tooltip: qsTr("Whether the checkbox has three states.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.tristate.valueToString + backendValue: backendValues.tristate + Layout.fillWidth: true + } + } + } +} diff --git a/src/imports/controls/designer/ComboBoxSpecifics.qml b/src/imports/controls/designer/ComboBoxSpecifics.qml index 410ae51e..3ed283ca 100644 --- a/src/imports/controls/designer/ComboBoxSpecifics.qml +++ b/src/imports/controls/designer/ComboBoxSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Combo Box") + caption: qsTr("ComboBox") SectionLayout { Label { diff --git a/src/imports/controls/designer/ContainerSection.qml b/src/imports/controls/designer/ContainerSection.qml new file mode 100644 index 00000000..9a31069a --- /dev/null +++ b/src/imports/controls/designer/ContainerSection.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + caption: qsTr("Container") + + SectionLayout { + Label { + text: qsTr("Current") + tooltip: qsTr("The index of the current item.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.currentIndex + Layout.fillWidth: true + } + } + } +} diff --git a/src/imports/controls/designer/ControlSection.qml b/src/imports/controls/designer/ControlSection.qml index 7ecb5760..90dd3816 100644 --- a/src/imports/controls/designer/ControlSection.qml +++ b/src/imports/controls/designer/ControlSection.qml @@ -55,6 +55,31 @@ Section { } Label { + text: qsTr("Focus Policy") + tooltip: qsTr("Focus policy of the control.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.focusPolicy + model: [ "TabFocus", "ClickFocus", "StrongFocus", "WheelFocus", "NoFocus" ] + scope: "Qt" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Hover") + tooltip: qsTr("Whether control accepts hover evets.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.hoverEnabled.valueToString + backendValue: backendValues.hoverEnabled + Layout.fillWidth: true + } + } + + Label { text: qsTr("Spacing") tooltip: qsTr("Spacing between internal elements of the control.") } @@ -67,5 +92,17 @@ Section { Layout.fillWidth: true } } + + Label { + text: qsTr("Wheel") + tooltip: qsTr("Whether control accepts wheel evets.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.wheelEnabled.valueToString + backendValue: backendValues.wheelEnabled + Layout.fillWidth: true + } + } } } diff --git a/src/imports/controls/designer/DelayButtonSpecifics.qml b/src/imports/controls/designer/DelayButtonSpecifics.qml new file mode 100644 index 00000000..3821edc2 --- /dev/null +++ b/src/imports/controls/designer/DelayButtonSpecifics.qml @@ -0,0 +1,81 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("DelayButton") + + SectionLayout { + Label { + text: qsTr("Delay") + tooltip: qsTr("The delay in milliseconds.") + } + SecondColumnLayout { + SpinBox { + minimumValue: 0 + maximumValue: 9999999 + decimals: 0 + stepSize: 1 + backendValue: backendValues.delay + Layout.fillWidth: true + } + } + } + } + + AbstractButtonSection { + width: parent.width + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/DialSpecifics.qml b/src/imports/controls/designer/DialSpecifics.qml index 52bba078..6c9bda34 100644 --- a/src/imports/controls/designer/DialSpecifics.qml +++ b/src/imports/controls/designer/DialSpecifics.qml @@ -55,6 +55,7 @@ Column { minimumValue: Math.min(backendValues.from.value, backendValues.to.value) maximumValue: Math.max(backendValues.from.value, backendValues.to.value) decimals: 2 + stepSize: 0.1 backendValue: backendValues.value Layout.fillWidth: true } @@ -69,6 +70,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.from Layout.fillWidth: true } @@ -83,6 +85,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.to Layout.fillWidth: true } @@ -97,10 +100,36 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.stepSize Layout.fillWidth: true } } + + Label { + text: qsTr("Snap Mode") + tooltip: qsTr("The snap mode of the dial.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.orientation + model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ] + scope: "Dial" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Live") + tooltip: qsTr("Whether the dial provides live value updates.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.live.valueToString + backendValue: backendValues.live + Layout.fillWidth: true + } + } } } diff --git a/src/imports/controls/designer/FrameSpecifics.qml b/src/imports/controls/designer/FrameSpecifics.qml index 1eef1c68..8b2cd97d 100644 --- a/src/imports/controls/designer/FrameSpecifics.qml +++ b/src/imports/controls/designer/FrameSpecifics.qml @@ -41,6 +41,10 @@ import QtQuick.Layouts 1.0 Column { width: parent.width + PaneSection { + width: parent.width + } + ControlSection { width: parent.width } diff --git a/src/imports/controls/designer/GroupBoxSpecifics.qml b/src/imports/controls/designer/GroupBoxSpecifics.qml index 8629b991..59b3299d 100644 --- a/src/imports/controls/designer/GroupBoxSpecifics.qml +++ b/src/imports/controls/designer/GroupBoxSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Group Box") + caption: qsTr("GroupBox") SectionLayout { Label { @@ -59,6 +59,10 @@ Column { } } + PaneSection { + width: parent.width + } + ControlSection { width: parent.width } diff --git a/src/imports/controls/designer/ItemDelegateSection.qml b/src/imports/controls/designer/ItemDelegateSection.qml new file mode 100644 index 00000000..6f466439 --- /dev/null +++ b/src/imports/controls/designer/ItemDelegateSection.qml @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + id: section + caption: qsTr("ItemDelegate") + + SectionLayout { + Label { + text: qsTr("Highlighted") + tooltip: qsTr("Whether the delegate is highlighted.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.highlighted.valueToString + backendValue: backendValues.highlighted + Layout.fillWidth: true + } + } + } +} diff --git a/src/imports/controls/designer/ItemDelegateSpecifics.qml b/src/imports/controls/designer/ItemDelegateSpecifics.qml index 0e0a482e..6efb1bdc 100644 --- a/src/imports/controls/designer/ItemDelegateSpecifics.qml +++ b/src/imports/controls/designer/ItemDelegateSpecifics.qml @@ -41,8 +41,11 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Item Delegate") + ItemDelegateSection { + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/PageIndicatorSpecifics.qml b/src/imports/controls/designer/PageIndicatorSpecifics.qml index 02258c92..f8bf09d4 100644 --- a/src/imports/controls/designer/PageIndicatorSpecifics.qml +++ b/src/imports/controls/designer/PageIndicatorSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Indicator") + caption: qsTr("PageIndicator") SectionLayout { Label { diff --git a/src/imports/controls/designer/PageSpecifics.qml b/src/imports/controls/designer/PageSpecifics.qml new file mode 100644 index 00000000..32feedd7 --- /dev/null +++ b/src/imports/controls/designer/PageSpecifics.qml @@ -0,0 +1,101 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("Page") + + SectionLayout { + Label { + text: qsTr("Title") + tooltip: qsTr("Title of the page.") + } + SecondColumnLayout { + LineEdit { + backendValue: backendValues.title + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Width") + tooltip: qsTr("Content height used for calculating the total implicit width.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentWidth + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Height") + tooltip: qsTr("Content height used for calculating the total implicit height.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentHeight + Layout.fillWidth: true + } + } + } + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/PaneSection.qml b/src/imports/controls/designer/PaneSection.qml new file mode 100644 index 00000000..57aa53ae --- /dev/null +++ b/src/imports/controls/designer/PaneSection.qml @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Section { + caption: qsTr("Pane") + + SectionLayout { + Label { + text: qsTr("Content Width") + tooltip: qsTr("Content height used for calculating the total implicit width.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentWidth + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Height") + tooltip: qsTr("Content height used for calculating the total implicit height.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentHeight + Layout.fillWidth: true + } + } + } +} diff --git a/src/imports/controls/designer/PaneSpecifics.qml b/src/imports/controls/designer/PaneSpecifics.qml index 1eef1c68..8b2cd97d 100644 --- a/src/imports/controls/designer/PaneSpecifics.qml +++ b/src/imports/controls/designer/PaneSpecifics.qml @@ -41,6 +41,10 @@ import QtQuick.Layouts 1.0 Column { width: parent.width + PaneSection { + width: parent.width + } + ControlSection { width: parent.width } diff --git a/src/imports/controls/designer/ProgressBarSpecifics.qml b/src/imports/controls/designer/ProgressBarSpecifics.qml index 7abb895d..fb1eb838 100644 --- a/src/imports/controls/designer/ProgressBarSpecifics.qml +++ b/src/imports/controls/designer/ProgressBarSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Progress Bar") + caption: qsTr("ProgressBar") SectionLayout { Label { @@ -67,6 +67,7 @@ Column { minimumValue: Math.min(backendValues.from.value, backendValues.to.value) maximumValue: Math.max(backendValues.from.value, backendValues.to.value) decimals: 2 + stepSize: 0.1 backendValue: backendValues.value Layout.fillWidth: true } @@ -81,6 +82,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.from Layout.fillWidth: true } @@ -95,6 +97,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.to Layout.fillWidth: true } diff --git a/src/imports/controls/designer/RadioButtonSpecifics.qml b/src/imports/controls/designer/RadioButtonSpecifics.qml index a7a5a3f7..671218a8 100644 --- a/src/imports/controls/designer/RadioButtonSpecifics.qml +++ b/src/imports/controls/designer/RadioButtonSpecifics.qml @@ -41,8 +41,7 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Radio Button") + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/RadioDelegateSpecifics.qml b/src/imports/controls/designer/RadioDelegateSpecifics.qml index 09ee6590..6efb1bdc 100644 --- a/src/imports/controls/designer/RadioDelegateSpecifics.qml +++ b/src/imports/controls/designer/RadioDelegateSpecifics.qml @@ -41,8 +41,11 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Radio Delegate") + ItemDelegateSection { + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/RangeSliderSpecifics.qml b/src/imports/controls/designer/RangeSliderSpecifics.qml new file mode 100644 index 00000000..d1a81512 --- /dev/null +++ b/src/imports/controls/designer/RangeSliderSpecifics.qml @@ -0,0 +1,175 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.1 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("RangeSlider") + + SectionLayout { + Label { + text: qsTr("First Value") + tooltip: qsTr("The value of the first range slider handle.") + } + SecondColumnLayout { + SpinBox { + minimumValue: Math.min(backendValues.from.value, backendValues.to.value) + maximumValue: Math.max(backendValues.from.value, backendValues.to.value) + decimals: 2 + stepSize: 0.1 + backendValue: backendValues.first_value + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Second Value") + tooltip: qsTr("The value of the second range slider handle.") + } + SecondColumnLayout { + SpinBox { + minimumValue: Math.min(backendValues.from.value, backendValues.to.value) + maximumValue: Math.max(backendValues.from.value, backendValues.to.value) + decimals: 2 + stepSize: 0.1 + backendValue: backendValues.second_value + Layout.fillWidth: true + } + } + + Label { + text: qsTr("From") + tooltip: qsTr("The starting value of the range slider range.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 2 + stepSize: 0.1 + backendValue: backendValues.from + Layout.fillWidth: true + } + } + + Label { + text: qsTr("To") + tooltip: qsTr("The ending value of the range slider range.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 2 + stepSize: 0.1 + backendValue: backendValues.to + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Step Size") + tooltip: qsTr("The step size of the range slider.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 2 + stepSize: 0.1 + backendValue: backendValues.stepSize + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Snap Mode") + tooltip: qsTr("The snap mode of the range slider.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.orientation + model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ] + scope: "RangeSlider" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Orientation") + tooltip: qsTr("The orientation of the range slider.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.orientation + model: [ "Horizontal", "Vertical" ] + scope: "Qt" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Live") + tooltip: qsTr("Whether the range slider provides live value updates.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.live.valueToString + backendValue: backendValues.live + Layout.fillWidth: true + } + } + } + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/RoundButtonSpecifics.qml b/src/imports/controls/designer/RoundButtonSpecifics.qml new file mode 100644 index 00000000..1c1eed43 --- /dev/null +++ b/src/imports/controls/designer/RoundButtonSpecifics.qml @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + caption: qsTr("RoundButton") + + SectionLayout { + Label { + text: qsTr("Radius") + tooltip: qsTr("Radius of the button.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.radius + Layout.fillWidth: true + } + } + } + } + + ButtonSection { + width: parent.width + } + + AbstractButtonSection { + width: parent.width + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/ScrollViewSpecifics.qml b/src/imports/controls/designer/ScrollViewSpecifics.qml new file mode 100644 index 00000000..4ce7668a --- /dev/null +++ b/src/imports/controls/designer/ScrollViewSpecifics.qml @@ -0,0 +1,90 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("ScrollView") + + SectionLayout { + Label { + text: qsTr("Content Width") + tooltip: qsTr("Content height used for calculating the total implicit width.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentWidth + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Height") + tooltip: qsTr("Content height used for calculating the total implicit height.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentHeight + Layout.fillWidth: true + } + } + } + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/SliderSpecifics.qml b/src/imports/controls/designer/SliderSpecifics.qml index fb215001..69bc2574 100644 --- a/src/imports/controls/designer/SliderSpecifics.qml +++ b/src/imports/controls/designer/SliderSpecifics.qml @@ -55,6 +55,7 @@ Column { minimumValue: Math.min(backendValues.from.value, backendValues.to.value) maximumValue: Math.max(backendValues.from.value, backendValues.to.value) decimals: 2 + stepSize: 0.1 backendValue: backendValues.value Layout.fillWidth: true } @@ -69,6 +70,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.from Layout.fillWidth: true } @@ -83,6 +85,7 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.to Layout.fillWidth: true } @@ -97,12 +100,26 @@ Column { maximumValue: 9999999 minimumValue: -9999999 decimals: 2 + stepSize: 0.1 backendValue: backendValues.stepSize Layout.fillWidth: true } } Label { + text: qsTr("Snap Mode") + tooltip: qsTr("The snap mode of the slider.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.orientation + model: [ "NoSnap", "SnapOnRelease", "SnapAlways" ] + scope: "Slider" + Layout.fillWidth: true + } + } + + Label { text: qsTr("Orientation") tooltip: qsTr("The orientation of the slider.") } @@ -114,6 +131,18 @@ Column { Layout.fillWidth: true } } + + Label { + text: qsTr("Live") + tooltip: qsTr("Whether the slider provides live value updates.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.live.valueToString + backendValue: backendValues.live + Layout.fillWidth: true + } + } } } diff --git a/src/imports/controls/designer/SpinBoxSpecifics.qml b/src/imports/controls/designer/SpinBoxSpecifics.qml index 4290801a..335b15db 100644 --- a/src/imports/controls/designer/SpinBoxSpecifics.qml +++ b/src/imports/controls/designer/SpinBoxSpecifics.qml @@ -43,7 +43,7 @@ Column { Section { width: parent.width - caption: qsTr("Spin Box") + caption: qsTr("SpinBox") SectionLayout { Label { @@ -101,6 +101,18 @@ Column { Layout.fillWidth: true } } + + Label { + text: qsTr("Editable") + tooltip: qsTr("Whether the spinbox is editable.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.editable.valueToString + backendValue: backendValues.editable + Layout.fillWidth: true + } + } } } diff --git a/src/imports/controls/designer/StackViewSpecifics.qml b/src/imports/controls/designer/StackViewSpecifics.qml new file mode 100644 index 00000000..1eef1c68 --- /dev/null +++ b/src/imports/controls/designer/StackViewSpecifics.qml @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/SwipeDelegateSpecifics.qml b/src/imports/controls/designer/SwipeDelegateSpecifics.qml index 0e0a482e..6efb1bdc 100644 --- a/src/imports/controls/designer/SwipeDelegateSpecifics.qml +++ b/src/imports/controls/designer/SwipeDelegateSpecifics.qml @@ -41,8 +41,11 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Item Delegate") + ItemDelegateSection { + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/SwipeViewSpecifics.qml b/src/imports/controls/designer/SwipeViewSpecifics.qml new file mode 100644 index 00000000..ac91880c --- /dev/null +++ b/src/imports/controls/designer/SwipeViewSpecifics.qml @@ -0,0 +1,91 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("SwipeView") + + SectionLayout { + Label { + text: qsTr("Interactive") + tooltip: qsTr("Whether the view is interactive.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.interactive.valueToString + backendValue: backendValues.interactive + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Orientation") + tooltip: qsTr("Orientation of the view.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.orientation + model: [ "Horizontal", "Vertical" ] + scope: "Qt" + Layout.fillWidth: true + } + } + } + } + + ContainerSection { + width: parent.width + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/SwitchDelegateSpecifics.qml b/src/imports/controls/designer/SwitchDelegateSpecifics.qml index 84784758..c71cb13d 100644 --- a/src/imports/controls/designer/SwitchDelegateSpecifics.qml +++ b/src/imports/controls/designer/SwitchDelegateSpecifics.qml @@ -41,8 +41,11 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Switch Delegate") + ItemDelegateSection { + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/SwitchSpecifics.qml b/src/imports/controls/designer/SwitchSpecifics.qml index 53172765..671218a8 100644 --- a/src/imports/controls/designer/SwitchSpecifics.qml +++ b/src/imports/controls/designer/SwitchSpecifics.qml @@ -41,8 +41,7 @@ import QtQuick.Layouts 1.0 Column { width: parent.width - ButtonSection { - caption: qsTr("Switch") + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/TabBarSpecifics.qml b/src/imports/controls/designer/TabBarSpecifics.qml new file mode 100644 index 00000000..7a4984a1 --- /dev/null +++ b/src/imports/controls/designer/TabBarSpecifics.qml @@ -0,0 +1,107 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + Section { + width: parent.width + caption: qsTr("TabBar") + + SectionLayout { + Label { + text: qsTr("Position") + tooltip: qsTr("Position of the tabbar.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.position + model: [ "Header", "Footer" ] + scope: "TabBar" + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Width") + tooltip: qsTr("Content height used for calculating the total implicit width.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentWidth + Layout.fillWidth: true + } + } + + Label { + text: qsTr("Content Height") + tooltip: qsTr("Content height used for calculating the total implicit height.") + } + SecondColumnLayout { + SpinBox { + maximumValue: 9999999 + minimumValue: -9999999 + decimals: 0 + backendValue: backendValues.contentHeight + Layout.fillWidth: true + } + } + } + } + + ContainerSection { + width: parent.width + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/TabButtonSpecifics.qml b/src/imports/controls/designer/TabButtonSpecifics.qml new file mode 100644 index 00000000..671218a8 --- /dev/null +++ b/src/imports/controls/designer/TabButtonSpecifics.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL3$ +** 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 Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 3 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPLv3 included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 3 requirements +** will be met: https://www.gnu.org/licenses/lgpl.html. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 2.0 or later as published by the Free +** Software Foundation and appearing in the file LICENSE.GPL included in +** the packaging of this file. Please review the following information to +** ensure the GNU General Public License version 2.0 requirements will be +** met: http://www.gnu.org/licenses/gpl-2.0.html. +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.1 +import HelperWidgets 2.0 +import QtQuick.Layouts 1.0 + +Column { + width: parent.width + + AbstractButtonSection { + width: parent.width + } + + ControlSection { + width: parent.width + } + + FontSection { + width: parent.width + } + + PaddingSection { + width: parent.width + } +} diff --git a/src/imports/controls/designer/TextAreaSpecifics.qml b/src/imports/controls/designer/TextAreaSpecifics.qml index 20f5013b..e8bed83d 100644 --- a/src/imports/controls/designer/TextAreaSpecifics.qml +++ b/src/imports/controls/designer/TextAreaSpecifics.qml @@ -41,6 +41,25 @@ import QtQuick.Layouts 1.0 Column { width: parent.width + Section { + width: parent.width + caption: qsTr("TextArea") + + SectionLayout { + Label { + text: qsTr("Placeholder") + tooltip: qsTr("Placeholder text displayed when the editor is empty.") + } + SecondColumnLayout { + LineEdit { + backendValue: backendValues.placeholderText + Layout.fillWidth: true + } + + } + } + } + StandardTextSection { width: parent.width showIsWrapping: true diff --git a/src/imports/controls/designer/TextFieldSpecifics.qml b/src/imports/controls/designer/TextFieldSpecifics.qml index 3d604e6d..5faeb914 100644 --- a/src/imports/controls/designer/TextFieldSpecifics.qml +++ b/src/imports/controls/designer/TextFieldSpecifics.qml @@ -41,6 +41,25 @@ import QtQuick.Layouts 1.0 Column { width: parent.width + Section { + width: parent.width + caption: qsTr("TextField") + + SectionLayout { + Label { + text: qsTr("Placeholder") + tooltip: qsTr("Placeholder text displayed when the editor is empty.") + } + SecondColumnLayout { + LineEdit { + backendValue: backendValues.placeholderText + Layout.fillWidth: true + } + + } + } + } + StandardTextSection { width: parent.width } diff --git a/src/imports/controls/designer/ToolBarSpecifics.qml b/src/imports/controls/designer/ToolBarSpecifics.qml index 1eef1c68..9c0a3da1 100644 --- a/src/imports/controls/designer/ToolBarSpecifics.qml +++ b/src/imports/controls/designer/ToolBarSpecifics.qml @@ -41,6 +41,30 @@ import QtQuick.Layouts 1.0 Column { width: parent.width + Section { + width: parent.width + caption: qsTr("ToolBar") + + SectionLayout { + Label { + text: qsTr("Position") + tooltip: qsTr("Position of the toolbar.") + } + SecondColumnLayout { + ComboBox { + backendValue: backendValues.position + model: [ "Header", "Footer" ] + scope: "ToolBar" + Layout.fillWidth: true + } + } + } + } + + PaneSection { + width: parent.width + } + ControlSection { width: parent.width } diff --git a/src/imports/controls/designer/ToolButtonSpecifics.qml b/src/imports/controls/designer/ToolButtonSpecifics.qml index 3dc80b2c..7b5d0a24 100644 --- a/src/imports/controls/designer/ToolButtonSpecifics.qml +++ b/src/imports/controls/designer/ToolButtonSpecifics.qml @@ -42,7 +42,10 @@ Column { width: parent.width ButtonSection { - caption: qsTr("Tool Button") + width: parent.width + } + + AbstractButtonSection { width: parent.width } diff --git a/src/imports/controls/designer/TumblerSpecifics.qml b/src/imports/controls/designer/TumblerSpecifics.qml index 2018f796..0f1b2a74 100644 --- a/src/imports/controls/designer/TumblerSpecifics.qml +++ b/src/imports/controls/designer/TumblerSpecifics.qml @@ -73,6 +73,18 @@ Column { Layout.fillWidth: true } } + + Label { + text: qsTr("Wrap") + tooltip: qsTr("Whether the tumbler wrap.") + } + SecondColumnLayout { + CheckBox { + text: backendValues.wrap.valueToString + backendValue: backendValues.wrap + Layout.fillWidth: true + } + } } } diff --git a/src/imports/controls/designer/designer.pri b/src/imports/controls/designer/designer.pri index d8ce8d8a..5be660c2 100644 --- a/src/imports/controls/designer/designer.pri +++ b/src/imports/controls/designer/designer.pri @@ -2,33 +2,49 @@ QML_FILES += \ $$PWD/qtquickcontrols2.metainfo QML_FILES += \ + $$PWD/AbstractButtonSection.qml \ $$PWD/BusyIndicatorSpecifics.qml \ $$PWD/ButtonSection.qml \ $$PWD/ButtonSpecifics.qml \ $$PWD/CheckBoxSpecifics.qml \ $$PWD/CheckDelegateSpecifics.qml \ + $$PWD/CheckSection.qml \ $$PWD/ComboBoxSpecifics.qml \ + $$PWD/ContainerSection.qml \ $$PWD/ControlSection.qml \ $$PWD/ControlSpecifics.qml \ + $$PWD/DelayButtonSpecifics.qml \ $$PWD/DialSpecifics.qml \ $$PWD/FrameSpecifics.qml \ $$PWD/GroupBoxSpecifics.qml \ + $$PWD/ItemDelegateSection.qml \ $$PWD/ItemDelegateSpecifics.qml \ $$PWD/LabelSpecifics.qml \ $$PWD/PaddingSection.qml \ + $$PWD/PageSpecifics.qml \ $$PWD/PageIndicatorSpecifics.qml \ + $$PWD/PaneSection.qml \ $$PWD/PaneSpecifics.qml \ $$PWD/ProgressBarSpecifics.qml \ $$PWD/RadioButtonSpecifics.qml \ $$PWD/RadioDelegateSpecifics.qml \ + $$PWD/RangeSliderSpecifics.qml \ + $$PWD/RoundButtonSpecifics.qml \ + $$PWD/ScrollViewSpecifics.qml \ $$PWD/SliderSpecifics.qml \ $$PWD/SpinBoxSpecifics.qml \ + $$PWD/StackViewSpecifics.qml \ $$PWD/SwipeDelegateSpecifics.qml \ + $$PWD/SwipeViewSpecifics.qml \ $$PWD/SwitchSpecifics.qml \ + $$PWD/SwitchDelegateSpecifics.qml \ + $$PWD/TabBarSpecifics.qml \ + $$PWD/TabButtonSpecifics.qml \ $$PWD/TextAreaSpecifics.qml \ $$PWD/TextFieldSpecifics.qml \ $$PWD/ToolBarSpecifics.qml \ $$PWD/ToolButtonSpecifics.qml \ + $$PWD/ToolSeparatorSpecifics.qml \ $$PWD/TumblerSpecifics.qml QML_FILES += \ diff --git a/src/imports/controls/designer/images/delaybutton-icon.png b/src/imports/controls/designer/images/delaybutton-icon.png Binary files differnew file mode 100644 index 00000000..38a8f7e0 --- /dev/null +++ b/src/imports/controls/designer/images/delaybutton-icon.png diff --git a/src/imports/controls/designer/images/delaybutton-icon16.png b/src/imports/controls/designer/images/delaybutton-icon16.png Binary files differnew file mode 100644 index 00000000..b92dad21 --- /dev/null +++ b/src/imports/controls/designer/images/delaybutton-icon16.png diff --git a/src/imports/controls/designer/images/delaybutton-icon16@2x.png b/src/imports/controls/designer/images/delaybutton-icon16@2x.png Binary files differnew file mode 100644 index 00000000..8df985bb --- /dev/null +++ b/src/imports/controls/designer/images/delaybutton-icon16@2x.png diff --git a/src/imports/controls/designer/images/delaybutton-icon@2x.png b/src/imports/controls/designer/images/delaybutton-icon@2x.png Binary files differnew file mode 100644 index 00000000..556ecf6f --- /dev/null +++ b/src/imports/controls/designer/images/delaybutton-icon@2x.png diff --git a/src/imports/controls/designer/qtquickcontrols2.metainfo b/src/imports/controls/designer/qtquickcontrols2.metainfo index 1f861d41..9e6030b1 100644 --- a/src/imports/controls/designer/qtquickcontrols2.metainfo +++ b/src/imports/controls/designer/qtquickcontrols2.metainfo @@ -71,6 +71,21 @@ MetaInfo { } Type { + name: "QtQuick.Controls.DelayButton" + icon: "images/button-icon16.png" + + ItemLibraryEntry { + name: "Delay Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/delaybutton-icon.png" + version: "2.2" + requiredImport: "QtQuick.Controls" + + Property { name: "text"; type: "binding"; value: "qsTr(\"Delay Button\")" } + } + } + + Type { name: "QtQuick.Controls.Dial" icon: "images/dial-icon16.png" @@ -255,6 +270,20 @@ MetaInfo { } Type { + name: "QtQuick.Controls.RoundButton" + icon: "images/roundbutton-icon16.png" + + ItemLibraryEntry { + name: "Round Button" + category: "Qt Quick - Controls 2" + libraryIcon: "images/roundbutton-icon.png" + version: "2.1" + requiredImport: "QtQuick.Controls" + Property { name: "text"; type: "string"; value: "+" } + } + } + + Type { name: "QtQuick.Controls.Slider" icon: "images/slider-icon16.png" @@ -283,225 +312,211 @@ MetaInfo { } Type { - name: "QtQuick.Controls.SwipeDelegate" - icon: "images/itemdelegate-icon16.png" + name: "QtQuick.Controls.ScrollView" + icon: "images/scrollview-icon16.png" ItemLibraryEntry { - name: "Swipe Delegate" + name: "Scroll View" category: "Qt Quick - Controls 2" - libraryIcon: "images/itemdelegate-icon.png" - version: "2.0" + libraryIcon: "images/scrollview-icon.png" + version: "2.2" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" } + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } } } Type { - name: "QtQuick.Controls.Switch" - icon: "images/switch-icon16.png" + name: "QtQuick.Controls.StackView" + icon: "images/stackview-icon16.png" ItemLibraryEntry { - name: "Switch" + name: "Stack View" category: "Qt Quick - Controls 2" - libraryIcon: "images/switch-icon.png" + libraryIcon: "images/stackview-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" } + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } } } Type { - name: "QtQuick.Controls.SwitchDelegate" - icon: "images/switch-icon16.png" + name: "QtQuick.Controls.SwipeDelegate" + icon: "images/itemdelegate-icon16.png" ItemLibraryEntry { - name: "Switch Delegate" + name: "Swipe Delegate" category: "Qt Quick - Controls 2" - libraryIcon: "images/switch-icon.png" + libraryIcon: "images/itemdelegate-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" } + Property { name: "text"; type: "binding"; value: "qsTr(\"Swipe Delegate\")" } } } Type { - name: "QtQuick.Controls.TextArea" - icon: "images/textarea-icon16.png" + name: "QtQuick.Controls.SwipeView" + icon: "images/swipeview-icon16.png" ItemLibraryEntry { - name: "Text Area" + name: "Swipe View" category: "Qt Quick - Controls 2" - libraryIcon: "images/textarea-icon.png" + libraryIcon: "images/swipeview-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Text Area\")" } + Property { name: "width"; type: "int"; value: 200 } + Property { name: "height"; type: "int"; value: 200 } } } Type { - name: "QtQuick.Controls.TextField" - icon: "images/textfield-icon16.png" + name: "QtQuick.Controls.Switch" + icon: "images/switch-icon16.png" ItemLibraryEntry { - name: "Text Field" + name: "Switch" category: "Qt Quick - Controls 2" - libraryIcon: "images/textfield-icon.png" + libraryIcon: "images/switch-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Text Field\")" } + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch\")" } } } Type { - name: "QtQuick.Controls.ToolButton" - icon: "images/toolbutton-icon16.png" + name: "QtQuick.Controls.SwitchDelegate" + icon: "images/switch-icon16.png" ItemLibraryEntry { - name: "Tool Button" + name: "Switch Delegate" category: "Qt Quick - Controls 2" - libraryIcon: "images/toolbutton-icon.png" + libraryIcon: "images/switch-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" } + Property { name: "text"; type: "binding"; value: "qsTr(\"Switch Delegate\")" } } } Type { - name: "QtQuick.Controls.ToolBar" + name: "QtQuick.Controls.TabBar" icon: "images/toolbar-icon16.png" ItemLibraryEntry { - name: "Tool Bar" + name: "Tab Bar" category: "Qt Quick - Controls 2" libraryIcon: "images/toolbar-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - - Property { name: "width"; type: "int"; value: 360 } + Property { name: "width"; type: "int"; value: 240 } } } Type { - name: "QtQuick.Controls.ToolSeparator" - icon: "images/toolseparator-icon16.png" + name: "QtQuick.Controls.TabButton" + icon: "images/toolbutton-icon16.png" ItemLibraryEntry { - name: "ToolSeparator" + name: "Tab Button" category: "Qt Quick - Controls 2" - libraryIcon: "images/toolseparator-icon.png" - version: "2.1" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" requiredImport: "QtQuick.Controls" + Property { name: "text"; type: "binding"; value: "qsTr(\"Tab Button\")" } } } Type { - name: "QtQuick.Controls.Tumbler" - icon: "images/tumbler-icon16.png" + name: "QtQuick.Controls.TextArea" + icon: "images/textarea-icon16.png" ItemLibraryEntry { - name: "Tumbler" + name: "Text Area" category: "Qt Quick - Controls 2" - libraryIcon: "images/tumbler-icon.png" + libraryIcon: "images/textarea-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "model"; type: "int"; value: "10" } + Property { name: "text"; type: "binding"; value: "qsTr(\"Text Area\")" } } } Type { - name: "QtQuick.Controls.TabBar" - icon: "images/toolbar-icon16.png" + name: "QtQuick.Controls.TextField" + icon: "images/textfield-icon16.png" ItemLibraryEntry { - name: "Tab Bar" + name: "Text Field" category: "Qt Quick - Controls 2" - libraryIcon: "images/toolbar-icon.png" + libraryIcon: "images/textfield-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "width"; type: "int"; value: 240 } + + Property { name: "text"; type: "binding"; value: "qsTr(\"Text Field\")" } } } Type { - name: "QtQuick.Controls.TabButton" - icon: "images/toolbutton-icon16.png" + name: "QtQuick.Controls.ToolBar" + icon: "images/toolbar-icon16.png" ItemLibraryEntry { - name: "Tab Button" + name: "Tool Bar" category: "Qt Quick - Controls 2" - libraryIcon: "images/toolbutton-icon.png" + libraryIcon: "images/toolbar-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "binding"; value: "qsTr(\"Tab Button\")" } + + Property { name: "width"; type: "int"; value: 360 } } } Type { - name: "QtQuick.Controls.RoundButton" - icon: "images/roundbutton-icon16.png" + name: "QtQuick.Controls.ToolButton" + icon: "images/toolbutton-icon16.png" ItemLibraryEntry { - name: "Round Button" + name: "Tool Button" category: "Qt Quick - Controls 2" - libraryIcon: "images/roundbutton-icon.png" - version: "2.1" + libraryIcon: "images/toolbutton-icon.png" + version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "text"; type: "string"; value: "+" } + + Property { name: "text"; type: "binding"; value: "qsTr(\"Tool Button\")" } } } Type { - name: "QtQuick.Controls.StackView" - icon: "images/stackview-icon16.png" + name: "QtQuick.Controls.ToolSeparator" + icon: "images/toolseparator-icon16.png" ItemLibraryEntry { - name: "Stack View" - category: "Qt Quick - Views" - libraryIcon: "images/stackview-icon.png" + name: "Tool Separator" + category: "Qt Quick - Controls 2" + libraryIcon: "images/toolseparator-icon.png" version: "2.1" requiredImport: "QtQuick.Controls" - - Property { name: "width"; type: "int"; value: 200 } - Property { name: "height"; type: "int"; value: 200 } } } Type { - name: "QtQuick.Controls.SwipeView" - icon: "images/swipeview-icon16.png" + name: "QtQuick.Controls.Tumbler" + icon: "images/tumbler-icon16.png" ItemLibraryEntry { - name: "Swipe View" - category: "Qt Quick - Views" - libraryIcon: "images/swipeview-icon.png" + name: "Tumbler" + category: "Qt Quick - Controls 2" + libraryIcon: "images/tumbler-icon.png" version: "2.0" requiredImport: "QtQuick.Controls" - Property { name: "width"; type: "int"; value: 200 } - Property { name: "height"; type: "int"; value: 200 } - } - } - - Type { - name: "QtQuick.Controls.ScrollView" - icon: "images/scrollview-icon16.png" - - ItemLibraryEntry { - name: "Scroll View" - category: "Qt Quick - Views" - libraryIcon: "images/scrollview-icon.png" - version: "2.2" - requiredImport: "QtQuick.Controls" - - Property { name: "width"; type: "int"; value: 200 } - Property { name: "height"; type: "int"; value: 200 } + Property { name: "model"; type: "int"; value: "10" } } } } diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc index 69e8bc59..eed9ff94 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc @@ -458,7 +458,7 @@ ComboBox consists of \l {Control::background}{background}, \l {Control::contentItem}{content item}, \l {ComboBox::popup}{popup}, - and \l {ComboBox::delegate}{delegate}. + \l {ComboBox::indicator}{indicator}, and \l {ComboBox::delegate}{delegate}. \image qtquickcontrols2-combobox-custom.png diff --git a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc index 9f736e36..cabd66da 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-imagine.qdoc @@ -2446,5 +2446,7 @@ \list \li \l{Styling Qt Quick Controls 2} + \li \l{Qt Quick Controls 2 - Imagine Style Example: Automotive}{Automotive Example} + \li \l{Qt Quick Controls 2 - Imagine Style Example: Music Player}{Music Player Example} \endlist */ diff --git a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc index 661266aa..43c38745 100644 --- a/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc +++ b/src/imports/controls/doc/src/qtquickcontrols2-index.qdoc @@ -137,6 +137,8 @@ \li \l{Qt Quick Controls 2 - Chat Tutorial}{Chat Tutorial} \li \l{Qt Quick Controls 2 - Text Editor}{Text Editor} \li \l{Qt Quick Controls 2 - Wearable Demo}{Wearable Demo} + \li \l{Qt Quick Controls 2 - Imagine Style Example: Automotive}{Automotive Example} + \li \l{Qt Quick Controls 2 - Imagine Style Example: Music Player}{Music Player Example} \li \l{Qt Quick Controls 2 Examples}{All Examples} \endlist diff --git a/src/imports/controls/fusion/CheckBox.qml b/src/imports/controls/fusion/CheckBox.qml index e2774b7c..4a10238d 100644 --- a/src/imports/controls/fusion/CheckBox.qml +++ b/src/imports/controls/fusion/CheckBox.qml @@ -68,8 +68,6 @@ T.CheckBox { font: control.font color: control.palette.windowText elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } } diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml index 80128f1e..c4d49e0f 100644 --- a/src/imports/controls/fusion/ComboBox.qml +++ b/src/imports/controls/fusion/ComboBox.qml @@ -89,7 +89,6 @@ T.ComboBox { color: control.editable ? control.palette.text : control.palette.buttonText selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter background: PaddedRectangle { diff --git a/src/imports/controls/fusion/GroupBox.qml b/src/imports/controls/fusion/GroupBox.qml index a43686c7..a98cc9a8 100644 --- a/src/imports/controls/fusion/GroupBox.qml +++ b/src/imports/controls/fusion/GroupBox.qml @@ -64,7 +64,6 @@ T.GroupBox { font: control.font color: control.palette.windowText elide: Text.ElideRight - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/src/imports/controls/fusion/RadioButton.qml b/src/imports/controls/fusion/RadioButton.qml index d6f5ddc4..612319b4 100644 --- a/src/imports/controls/fusion/RadioButton.qml +++ b/src/imports/controls/fusion/RadioButton.qml @@ -68,8 +68,6 @@ T.RadioButton { font: control.font color: control.palette.windowText elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } } diff --git a/src/imports/controls/fusion/Switch.qml b/src/imports/controls/fusion/Switch.qml index 6cd0140b..0f5d484b 100644 --- a/src/imports/controls/fusion/Switch.qml +++ b/src/imports/controls/fusion/Switch.qml @@ -68,8 +68,6 @@ T.Switch { font: control.font color: control.palette.text elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } } diff --git a/src/imports/controls/imagine/CheckBox.qml b/src/imports/controls/imagine/CheckBox.qml index db0a6680..8c5cd918 100644 --- a/src/imports/controls/imagine/CheckBox.qml +++ b/src/imports/controls/imagine/CheckBox.qml @@ -82,8 +82,6 @@ T.CheckBox { font: control.font color: control.palette.windowText elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml index fc9fce61..eae8569e 100644 --- a/src/imports/controls/imagine/ComboBox.qml +++ b/src/imports/controls/imagine/ComboBox.qml @@ -98,7 +98,6 @@ T.ComboBox { color: control.flat ? control.palette.windowText : control.editable ? control.palette.text : control.palette.buttonText selectionColor: control.palette.highlight selectedTextColor: control.palette.highlightedText - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/src/imports/controls/imagine/GroupBox.qml b/src/imports/controls/imagine/GroupBox.qml index 88e8d21c..b2b199a3 100644 --- a/src/imports/controls/imagine/GroupBox.qml +++ b/src/imports/controls/imagine/GroupBox.qml @@ -68,7 +68,6 @@ T.GroupBox { text: control.title font: control.font elide: Text.ElideRight - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter color: control.palette.windowText diff --git a/src/imports/controls/imagine/RadioButton.qml b/src/imports/controls/imagine/RadioButton.qml index 4a111bc3..57bdedaa 100644 --- a/src/imports/controls/imagine/RadioButton.qml +++ b/src/imports/controls/imagine/RadioButton.qml @@ -81,8 +81,6 @@ T.RadioButton { font: control.font color: control.palette.windowText elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/src/imports/controls/imagine/Switch.qml b/src/imports/controls/imagine/Switch.qml index f9878851..44e5d68e 100644 --- a/src/imports/controls/imagine/Switch.qml +++ b/src/imports/controls/imagine/Switch.qml @@ -110,8 +110,6 @@ T.Switch { font: control.font color: control.palette.windowText elide: Text.ElideRight - visible: control.text - horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } diff --git a/src/imports/controls/imagine/plugins.qmltypes b/src/imports/controls/imagine/plugins.qmltypes new file mode 100644 index 00000000..b09ae141 --- /dev/null +++ b/src/imports/controls/imagine/plugins.qmltypes @@ -0,0 +1,21 @@ +import QtQuick.tooling 1.2 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable QtQuick.Controls.Imagine 2.3' + +Module { + dependencies: [] + Component { name: "QQuickAttachedObject"; prototype: "QObject" } + Component { + name: "QQuickImagineStyle" + prototype: "QQuickAttachedObject" + exports: ["QtQuick.Controls.Imagine/Imagine 2.3"] + isCreatable: false + exportMetaObjectRevisions: [0] + Property { name: "path"; type: "string" } + Property { name: "url"; type: "QUrl"; isReadonly: true } + } +} diff --git a/src/imports/controls/imagine/qquickimaginetheme.cpp b/src/imports/controls/imagine/qquickimaginetheme.cpp index 17fb920f..5505e7ce 100644 --- a/src/imports/controls/imagine/qquickimaginetheme.cpp +++ b/src/imports/controls/imagine/qquickimaginetheme.cpp @@ -43,20 +43,8 @@ QT_BEGIN_NAMESPACE QQuickImagineTheme::QQuickImagineTheme() : QQuickTheme(QStringLiteral("Imagine")) { - QFont font; - font.setFamily(QLatin1String("Open Sans")); - const QString family = QFontInfo(font).family(); - if (family == QLatin1String("Open Sans")) { - buttonFont.setFamily(family); - checkBoxFont.setFamily(family); - editorFont.setFamily(family); - groupBoxFont.setFamily(family); - labelFont.setFamily(family); - itemViewFont.setFamily(family); - menuItemFont.setFamily(family); - systemFont.setFamily(family); - toolTipFont.setFamily(family); - } + systemFont.setFamily(QLatin1String("Open Sans")); + systemFont = resolveFont(systemFont); const QColor accentColor = QColor::fromRgb(0x4fc1e9); const QColor windowTextColor = QColor::fromRgb(0x434a54); @@ -76,29 +64,8 @@ QQuickImagineTheme::QQuickImagineTheme() const QFont *QQuickImagineTheme::font(QPlatformTheme::Font type) const { - switch (type) { - case QPlatformTheme::TabButtonFont: - case QPlatformTheme::PushButtonFont: - case QPlatformTheme::ToolButtonFont: - return &buttonFont; - case QPlatformTheme::CheckBoxFont: - return &checkBoxFont; - case QPlatformTheme::GroupBoxTitleFont: - return &groupBoxFont; - case QPlatformTheme::LabelFont: - return &labelFont; - case QPlatformTheme::TipLabelFont: - return &toolTipFont; - case QPlatformTheme::ItemViewFont: - return &itemViewFont; - case QPlatformTheme::MenuItemFont: - case QPlatformTheme::ComboMenuItemFont: - return &menuItemFont; - case QPlatformTheme::EditorFont: - return &editorFont; - default: - return &systemFont; - } + Q_UNUSED(type); + return &systemFont; } const QPalette *QQuickImagineTheme::palette(QPlatformTheme::Palette type) const diff --git a/src/imports/controls/imagine/qquickimaginetheme_p.h b/src/imports/controls/imagine/qquickimaginetheme_p.h index 9006e6ef..ea3a1cbd 100644 --- a/src/imports/controls/imagine/qquickimaginetheme_p.h +++ b/src/imports/controls/imagine/qquickimaginetheme_p.h @@ -61,16 +61,7 @@ public: const QPalette *palette(Palette type = SystemPalette) const override; private: - QFont buttonFont; - QFont checkBoxFont; - QFont editorFont; - QFont groupBoxFont; - QFont labelFont; - QFont itemViewFont; - QFont menuItemFont; QFont systemFont; - QFont toolTipFont; - QPalette systemPalette; }; diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml index 0c7c7e74..a58f1a37 100644 --- a/src/imports/controls/material/ComboBox.qml +++ b/src/imports/controls/material/ComboBox.qml @@ -84,7 +84,7 @@ T.ComboBox { enabled: control.editable autoScroll: control.editable - readOnly: control.popup.visible + readOnly: control.down inputMethodHints: control.inputMethodHints validator: control.validator @@ -161,7 +161,7 @@ T.ComboBox { contentItem: ListView { clip: true implicitHeight: contentHeight - model: control.popup.visible ? control.delegateModel : null + model: control.delegateModel currentIndex: control.highlightedIndex highlightMoveDuration: 0 @@ -170,7 +170,7 @@ T.ComboBox { background: Rectangle { radius: 2 - color: control.popup.Material.dialogColor + color: parent.Material.dialogColor layer.enabled: control.enabled layer.effect: ElevationEffect { diff --git a/src/imports/controls/material/plugins.qmltypes b/src/imports/controls/material/plugins.qmltypes index 0ff64084..2ddf99a7 100644 --- a/src/imports/controls/material/plugins.qmltypes +++ b/src/imports/controls/material/plugins.qmltypes @@ -4,13 +4,14 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.Controls.Material 2.0' +// 'qmlplugindump -nonrelocatable QtQuick.Controls.Material 2.3' Module { dependencies: [] + Component { name: "QQuickAttachedObject"; prototype: "QObject" } Component { name: "QQuickMaterialStyle" - prototype: "QQuickStyle" + prototype: "QQuickAttachedObject" exports: ["QtQuick.Controls.Material/Material 2.0"] isCreatable: false exportMetaObjectRevisions: [0] @@ -18,7 +19,8 @@ Module { name: "Theme" values: { "Light": 0, - "Dark": 1 + "Dark": 1, + "System": 2 } } Enum { @@ -69,6 +71,7 @@ Module { Property { name: "accent"; type: "QVariant" } Property { name: "foreground"; type: "QVariant" } Property { name: "background"; type: "QVariant" } + Property { name: "elevation"; type: "int" } Signal { name: "paletteChanged" } Method { name: "color" @@ -88,5 +91,4 @@ Module { Parameter { name: "shade"; type: "Shade" } } } - Component { name: "QQuickStyle"; prototype: "QObject" } } diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml index 2bb605c9..2a5a4f3f 100644 --- a/src/imports/controls/universal/ComboBox.qml +++ b/src/imports/controls/universal/ComboBox.qml @@ -91,7 +91,7 @@ T.ComboBox { enabled: control.editable autoScroll: control.editable - readOnly: control.popup.visible + readOnly: control.down inputMethodHints: control.inputMethodHints validator: control.validator @@ -111,7 +111,7 @@ T.ComboBox { border.width: control.flat ? 0 : 2 // ComboBoxBorderThemeThickness border.color: !control.enabled ? control.Universal.baseLowColor : control.editable && control.activeFocus ? control.Universal.accent : - control.down || popup.visible ? control.Universal.baseMediumLowColor : + control.down ? control.Universal.baseMediumLowColor : control.hovered ? control.Universal.baseMediumColor : control.Universal.baseMediumLowColor color: !control.enabled ? control.Universal.baseLowColor : control.down ? control.Universal.listMediumColor : @@ -143,7 +143,7 @@ T.ComboBox { contentItem: ListView { clip: true implicitHeight: contentHeight - model: control.popup.visible ? control.delegateModel : null + model: control.delegateModel currentIndex: control.highlightedIndex highlightMoveDuration: 0 diff --git a/src/imports/controls/universal/plugins.qmltypes b/src/imports/controls/universal/plugins.qmltypes index 165e658e..979e8437 100644 --- a/src/imports/controls/universal/plugins.qmltypes +++ b/src/imports/controls/universal/plugins.qmltypes @@ -4,14 +4,14 @@ import QtQuick.tooling 1.2 // It is used for QML tooling purposes only. // // This file was auto-generated by: -// 'qmlplugindump -nonrelocatable QtQuick.Controls.Universal 2.0' +// 'qmlplugindump -nonrelocatable QtQuick.Controls.Universal 2.3' Module { dependencies: [] - Component { name: "QQuickStyle"; prototype: "QObject" } + Component { name: "QQuickAttachedObject"; prototype: "QObject" } Component { name: "QQuickUniversalStyle" - prototype: "QQuickStyle" + prototype: "QQuickAttachedObject" exports: ["QtQuick.Controls.Universal/Universal 2.0"] isCreatable: false exportMetaObjectRevisions: [0] @@ -19,7 +19,8 @@ Module { name: "Theme" values: { "Light": 0, - "Dark": 1 + "Dark": 1, + "System": 2 } } Enum { |