diff options
Diffstat (limited to 'tests/manual/quickcontrols/gifs/data')
37 files changed, 1262 insertions, 0 deletions
diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-busyindicator.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-busyindicator.qml new file mode 100644 index 0000000000..1463a48e42 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-busyindicator.qml @@ -0,0 +1,20 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: busyIndicator.implicitWidth + height: busyIndicator.implicitHeight + visible: true + + property alias busyIndicator: busyIndicator + + BusyIndicator { + id: busyIndicator + running: true + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-flat.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-flat.qml new file mode 100644 index 0000000000..c08885ccf7 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-flat.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: button.width + height: button.height + visible: true + + Button { + id: button + text: pressed ? "Pressed" : "Button" + flat: true + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-highlighted.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-highlighted.qml new file mode 100644 index 0000000000..7d6baef42a --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button-highlighted.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: button.width + height: button.height + visible: true + + Button { + id: button + text: pressed ? "Pressed" : "Button" + highlighted: true + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button.qml new file mode 100644 index 0000000000..895a143762 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-button.qml @@ -0,0 +1,18 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: button.width + height: button.height + visible: true + + Button { + id: button + text: pressed ? "Pressed" : "Button" + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox-tristate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox-tristate.qml new file mode 100644 index 0000000000..55d9bc28e3 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox-tristate.qml @@ -0,0 +1,40 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property alias english: english + property alias norwegian: norwegian + + ColumnLayout { + id: column + anchors.centerIn: parent + + CheckBox { + text: qsTr("Languages") + checkState: english.checked && norwegian.checked + ? Qt.Checked : (english.checked || norwegian.checked) ? Qt.PartiallyChecked : Qt.Unchecked + tristate: true + } + CheckBox { + id: english + text: qsTr("English") + checked: true + leftPadding: indicator.width + } + CheckBox { + id: norwegian + text: qsTr("Norwegian") + checked: true + leftPadding: indicator.width + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox.qml new file mode 100644 index 0000000000..867bb6142e --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkbox.qml @@ -0,0 +1,35 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property alias control2: control2 + property alias control3: control3 + + ColumnLayout { + id: column + anchors.centerIn: parent + + CheckBox { + checked: true + text: qsTr("First") + } + CheckBox { + id: control2 + text: qsTr("Second") + } + CheckBox { + id: control3 + checked: true + text: qsTr("Third") + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate-tristate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate-tristate.qml new file mode 100644 index 0000000000..3dfec43cf5 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate-tristate.qml @@ -0,0 +1,44 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window + +Window { + id: window + width: 170 + height: column.implicitHeight + visible: true + + property alias english: english + property alias norwegian: norwegian + + ColumnLayout { + id: column + anchors.fill: parent + + CheckDelegate { + text: qsTr("Languages") + checkState: english.checked && norwegian.checked + ? Qt.Checked : (english.checked || norwegian.checked) ? Qt.PartiallyChecked : Qt.Unchecked + tristate: true + Layout.fillWidth: true + } + CheckDelegate { + id: english + text: qsTr("English") + checked: true + leftPadding: indicator.width + 14 + Layout.fillWidth: true + } + CheckDelegate { + id: norwegian + text: qsTr("Norwegian") + checked: true + leftPadding: indicator.width + 14 + Layout.fillWidth: true + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate.qml new file mode 100644 index 0000000000..274f7580e9 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-checkdelegate.qml @@ -0,0 +1,27 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property var delegate: repeater.count > 0 ? repeater.itemAt(0) : null + + Column { + id: column + anchors.centerIn: parent + + Repeater { + id: repeater + model: ["Option 1", "Option 2", "Option 3"] + delegate: CheckDelegate { + text: modelData + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-combobox.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-combobox.qml new file mode 100644 index 0000000000..0982ff0bf0 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-combobox.qml @@ -0,0 +1,22 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window + +Window { + width: 140 + height: 180 + visible: true + + property alias comboBox: comboBox + + ComboBox { + id: comboBox + model: ["First", "Second", "Third"] + y: 10 + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-delaybutton.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-delaybutton.qml new file mode 100644 index 0000000000..e044dc7744 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-delaybutton.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: button.width + height: button.height + visible: true + + DelayButton { + id: button + progress: 0.69 + text: "DelayButton" + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-no-wrap.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-no-wrap.qml new file mode 100644 index 0000000000..13641e17f4 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-no-wrap.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: dial.implicitWidth + 20 + height: dial.implicitHeight + 20 + visible: true + + property alias dial: dial + + Dial { + id: dial + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-wrap.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-wrap.qml new file mode 100644 index 0000000000..3a47350a4f --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-dial-wrap.qml @@ -0,0 +1,20 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: dial.implicitWidth + 20 + height: dial.implicitHeight + 20 + visible: true + + property alias dial: dial + + Dial { + id: dial + wrap: true + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-drawer.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-drawer.qml new file mode 100644 index 0000000000..2cf05730af --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-drawer.qml @@ -0,0 +1,52 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Window + +ApplicationWindow { + id: window + width: 300 + height: 300 + visible: true + + property alias drawer: drawer + + Drawer { + id: drawer + width: window.width * 0.66 + height: window.height + rightPadding: 0 + + Rectangle { + border.width: 1 + anchors.fill: parent + + Label { + text: "Drawer" + font.pixelSize: 32 + anchors.centerIn: parent + } + } + } + + Rectangle { + border.width: 1 + anchors.fill: parent + + Label { + text: "Content" + font.pixelSize: 32 + anchors.centerIn: parent + } + } + + Rectangle { + z: 1 + color: "black" + width: 1 + height: parent.height + parent: window.overlay + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-itemdelegate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-itemdelegate.qml new file mode 100644 index 0000000000..b4c7f29ec8 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-itemdelegate.qml @@ -0,0 +1,26 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property var delegate: repeater.count > 0 ? repeater.itemAt(0) : null + + Column { + id: column + + Repeater { + id: repeater + model: ["Option 1", "Option 2", "Option 3"] + delegate: ItemDelegate { + text: modelData + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-menu.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-menu.qml new file mode 100644 index 0000000000..f39cc8f7c5 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-menu.qml @@ -0,0 +1,38 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +// TODO: restore and finish https://codereview.qt-project.org/#/c/123948/ +ApplicationWindow { + width: menu.contentItem.width + 20 + height: menu.contentItem.height + fileButton.height + 20 + + property alias fileButton: fileButton + property alias menu: menu + + Button { + id: fileButton + text: "File" + onClicked: menu.open() + x: 10 + y: 10 + } + Menu { + id: menu + // TODO + contentItem.x: fileButton.x + contentItem.y: fileButton.y + fileButton.height + + MenuItem { + text: "New..." + } + MenuItem { + text: "Open..." + } + MenuItem { + text: "Save" + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar-indeterminate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar-indeterminate.qml new file mode 100644 index 0000000000..818c1a28ec --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar-indeterminate.qml @@ -0,0 +1,20 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: progressBar.implicitWidth + height: 64 + visible: true + + property alias progressBar: progressBar + + ProgressBar { + id: progressBar + indeterminate: true + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar.qml new file mode 100644 index 0000000000..2faca20388 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-progressbar.qml @@ -0,0 +1,34 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: progressBar.implicitWidth + height: 64 + visible: true + + property alias progressBar: progressBar + + ProgressBar { + id: progressBar + value: 0.5 + anchors.centerIn: parent + + Timer { + running: true + interval: 500 + onTriggered: animation.start() + } + + NumberAnimation { + id: animation + target: progressBar + property: "value" + to: 1 + duration: 2000 + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiobutton.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiobutton.qml new file mode 100644 index 0000000000..7e4c391673 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiobutton.qml @@ -0,0 +1,36 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import QtQuick.Window + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property alias control1: control1 + property alias control2: control2 + property alias control3: control3 + + ColumnLayout { + id: column + anchors.centerIn: parent + + RadioButton { + id: control1 + text: qsTr("First") + checked: true + } + RadioButton { + id: control2 + text: qsTr("Second") + } + RadioButton { + id: control3 + text: qsTr("Third") + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiodelegate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiodelegate.qml new file mode 100644 index 0000000000..7569c8d7b2 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-radiodelegate.qml @@ -0,0 +1,33 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property var delegate: repeater.count > 0 ? repeater.itemAt(0) : null + + ButtonGroup { + id: buttonGroup + } + + Column { + id: column + anchors.centerIn: parent + + Repeater { + id: repeater + model: ["Option 1", "Option 2", "Option 3"] + delegate: RadioDelegate { + checked: index == 0 + text: modelData + ButtonGroup.group: buttonGroup + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-rangeslider.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-rangeslider.qml new file mode 100644 index 0000000000..6c7f548f48 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-rangeslider.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: slider.implicitWidth + height: slider.implicitHeight + visible: true + + property alias slider: slider + + RangeSlider { + id: slider + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar-snap.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar-snap.qml new file mode 100644 index 0000000000..06c8bd96d5 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar-snap.qml @@ -0,0 +1,24 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 100 + maximumHeight: 20 + visible: true + + property alias scrollbar: scrollbar + + ScrollBar { + id: scrollbar + size: 0.2 + stepSize: 0.25 + active: true + width: parent.width + anchors.centerIn: parent + orientation: Qt.Horizontal + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar.qml new file mode 100644 index 0000000000..63afabbefe --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollbar.qml @@ -0,0 +1,33 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 100 + height: 120 + visible: true + color: "#eeeeee" + + property alias scrollBar: scrollBar + + ListView { + anchors.fill: parent + + ScrollBar.vertical: ScrollBar { + id: scrollBar + active: true + } + + model: 10 + delegate: Label { + text: qsTr("Item %1").arg(index + 1) + width: 100 + height: 40 + leftPadding: 10 + verticalAlignment: Text.AlignVCenter + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollindicator.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollindicator.qml new file mode 100644 index 0000000000..f2f12bbe91 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-scrollindicator.qml @@ -0,0 +1,30 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 100 + height: 120 + visible: true + color: "#eeeeee" + + ListView { + anchors.fill: parent + + ScrollIndicator.vertical: ScrollIndicator { + active: true + } + + model: 10 + delegate: Label { + text: qsTr("Item %1").arg(index + 1) + width: 100 + height: 40 + leftPadding: 10 + verticalAlignment: Text.AlignVCenter + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider-snap.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider-snap.qml new file mode 100644 index 0000000000..ae5d8cf6cb --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider-snap.qml @@ -0,0 +1,42 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: slider.implicitWidth + height: slider.implicitHeight + visible: true + + property alias slider: slider + + Slider { + id: slider + stepSize: 0.2 + anchors.centerIn: parent + + Rectangle { + anchors.fill: slider.handle + radius: width / 2 + color: slider.pressed ? "#aa666666" : "transparent" + } + + contentItem: Item { + Repeater { + id: repeater + model: 6 + + Rectangle { + x: ((slider.contentItem.width - slider.handle.width) * (index / (repeater.count - 1))) + - width / 2 + slider.handle.width / 2 + y: parent.height + width: 1 + height: 4 + color: "#888" + } + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider.qml new file mode 100644 index 0000000000..134341ccfa --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-slider.qml @@ -0,0 +1,19 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: slider.implicitWidth + height: slider.implicitHeight + visible: true + + property alias slider: slider + + Slider { + id: slider + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-pop.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-pop.qml new file mode 100644 index 0000000000..64c44063a6 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-pop.qml @@ -0,0 +1,65 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +ApplicationWindow { + width: 160 + height: 160 + visible: true + color: "#eeeeee" + + property int maxDepth: 3 + + function itemText(index) { + return String.fromCharCode(65 + index); + } + + Component { + id: labelComponent + + Label { + font.pixelSize: 60 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + StackView { + id: stackView + anchors.fill: parent + + Component.onCompleted: { + for (var i = 0; i < maxDepth; ++i) { + stackView.push(labelComponent, { text: itemText(i) }, StackView.Immediate); + } + } + } + + Label { + id: operationLabel + text: "pop()" + font.pixelSize: 16 + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: 10 + } + + Timer { + id: operationTimer + running: true + interval: 1500 + onTriggered: { + stackView.pop(); + hideOperationTimer.start(); + } + } + + Timer { + id: hideOperationTimer + interval: operationTimer.interval + onTriggered: operationLabel.visible = false + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-push.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-push.qml new file mode 100644 index 0000000000..523c482de8 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-push.qml @@ -0,0 +1,60 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +ApplicationWindow { + width: 160 + height: 160 + visible: true + color: "#eeeeee" + + property int itemIndex: 0 + property int maxDepth: 3 + + function itemText(index) { + return String.fromCharCode(65 + index); + } + + Component { + id: labelComponent + + Label { + font.pixelSize: 60 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + StackView { + id: stackView + anchors.fill: parent + } + + Label { + id: operationLabel + text: "push(" + itemText(Math.max(0, Math.min(maxDepth - 1, itemIndex - 1))) + ")" + font.pixelSize: 16 + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: 10 + } + + Timer { + id: operationTimer + running: true + interval: 1500 + repeat: stackView.depth < maxDepth - 1 + onRepeatChanged: if (!repeat) hideOperationTimer.start() + + onTriggered: stackView.push(labelComponent, { text: itemText(itemIndex++) }) + } + + Timer { + id: hideOperationTimer + interval: operationTimer.interval * 2 + onTriggered: operationLabel.visible = false + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-replace.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-replace.qml new file mode 100644 index 0000000000..f1ba010b93 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-replace.qml @@ -0,0 +1,65 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +ApplicationWindow { + width: 160 + height: 160 + visible: true + color: "#eeeeee" + + property int maxDepth: 3 + + function itemText(index) { + return String.fromCharCode(65 + index); + } + + Component { + id: labelComponent + + Label { + font.pixelSize: 60 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + StackView { + id: stackView + anchors.fill: parent + + Component.onCompleted: { + for (var i = 0; i < maxDepth; ++i) { + stackView.push(labelComponent, { text: itemText(i) }, StackView.Immediate); + } + } + } + + Label { + id: operationLabel + text: "replace(D)" + font.pixelSize: 16 + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: 10 + } + + Timer { + id: operationTimer + running: true + interval: 1500 + onTriggered: { + stackView.replace(labelComponent, { text: "D" }); + hideOperationTimer.start(); + } + } + + Timer { + id: hideOperationTimer + interval: operationTimer.interval + onTriggered: operationLabel.visible = false + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-unwind.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-unwind.qml new file mode 100644 index 0000000000..4631dce66a --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-stackview-unwind.qml @@ -0,0 +1,65 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +ApplicationWindow { + width: 160 + height: 160 + visible: true + color: "#eeeeee" + + property int maxDepth: 3 + + function itemText(index) { + return String.fromCharCode(65 + index); + } + + Component { + id: labelComponent + + Label { + font.pixelSize: 60 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + StackView { + id: stackView + anchors.fill: parent + + Component.onCompleted: { + for (var i = 0; i < maxDepth; ++i) { + stackView.push(labelComponent, { text: itemText(i) }, StackView.Immediate); + } + } + } + + Label { + id: operationLabel + text: "pop(null)" + font.pixelSize: 16 + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter + anchors.margins: 10 + } + + Timer { + id: operationTimer + running: true + interval: 1500 + onTriggered: { + stackView.pop(null); + hideOperationTimer.start(); + } + } + + Timer { + id: hideOperationTimer + interval: operationTimer.interval + onTriggered: operationLabel.visible = false + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-behind.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-behind.qml new file mode 100644 index 0000000000..9a059e8c3d --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-behind.qml @@ -0,0 +1,34 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: swipeDelegate.implicitWidth + height: swipeDelegate.implicitHeight + visible: true + + property alias swipeDelegate: swipeDelegate + + SwipeDelegate { + id: swipeDelegate + text: "SwipeDelegate" + anchors.centerIn: parent + + swipe.left: null + swipe.right: null + swipe.behind: Rectangle { + width: swipeDelegate.width + height: swipeDelegate.height + color: swipeDelegate.pressed ? "#333" : "#444" + + Label { + text: "Behind Action" + color: "#fff" + anchors.centerIn: parent + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-leading-trailing.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-leading-trailing.qml new file mode 100644 index 0000000000..7e09e7bcc6 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate-leading-trailing.qml @@ -0,0 +1,46 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: swipeDelegate.implicitWidth + height: swipeDelegate.implicitHeight + visible: true + + property alias swipeDelegate: swipeDelegate + + SwipeDelegate { + id: swipeDelegate + text: "SwipeDelegate" + anchors.centerIn: parent + + swipe.left: Rectangle { + width: swipeDelegate.width + height: swipeDelegate.height + color: swipeDelegate.pressed ? "#333" : "#444" + anchors.right: parent.left + + Label { + text: "Left Action" + color: "#fff" + anchors.centerIn: parent + } + } + + swipe.right: Rectangle { + width: swipeDelegate.width + height: swipeDelegate.height + color: swipeDelegate.pressed ? "#333" : "#444" + anchors.left: parent.right + + Label { + text: "Right Action" + color: "#fff" + anchors.centerIn: parent + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate.qml new file mode 100644 index 0000000000..a203f6fe83 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipedelegate.qml @@ -0,0 +1,45 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: swipeDelegate.implicitWidth + height: swipeDelegate.implicitHeight + visible: true + + property alias swipeDelegate: swipeDelegate + + SwipeDelegate { + id: swipeDelegate + text: "SwipeDelegate" + anchors.centerIn: parent + + swipe.left: Rectangle { + width: swipeDelegate.width + height: swipeDelegate.height + color: swipeDelegate.pressed ? "#333" : "#444" + + Label { + text: "Left Action" + color: "#fff" + anchors.centerIn: parent + } + } + + swipe.right: Rectangle { + anchors.fill: parent + width: swipeDelegate.width + height: swipeDelegate.height + color: swipeDelegate.pressed ? "#333" : "#444" + + Label { + text: "Right Action" + color: "#fff" + anchors.centerIn: parent + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipeview.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipeview.qml new file mode 100644 index 0000000000..dcdc8832c9 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-swipeview.qml @@ -0,0 +1,52 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 300 + height: 300 + visible: true + + property alias swipeView: view + + Rectangle { + border.width: 1 + anchors.fill: parent + } + + SwipeView { + id: view + anchors.fill: parent + + Label { + text: "First\nPage" + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + } + + Label { + text: "Second\nPage" + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + } + + Label { + text: "Third\nPage" + horizontalAlignment: Qt.AlignHCenter + verticalAlignment: Qt.AlignVCenter + } + } + + PageIndicator { + id: indicator + + count: view.count + currentIndex: view.currentIndex + + anchors.bottom: view.bottom + anchors.horizontalCenter: parent.horizontalCenter + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switch.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switch.qml new file mode 100644 index 0000000000..7099def2fc --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switch.qml @@ -0,0 +1,17 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 100 + height: 50 + visible: true + + Switch { + id: theSwitch + anchors.centerIn: parent + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switchdelegate.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switchdelegate.qml new file mode 100644 index 0000000000..123c4aec00 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-switchdelegate.qml @@ -0,0 +1,27 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: column.implicitWidth + height: column.implicitHeight + visible: true + + property var delegate: repeater.count > 0 ? repeater.itemAt(0) : null + + Column { + id: column + anchors.centerIn: parent + + Repeater { + id: repeater + model: ["Option 1", "Option 2", "Option 3"] + delegate: SwitchDelegate { + text: modelData + } + } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tabbar.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tabbar.qml new file mode 100644 index 0000000000..2a2da93f87 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tabbar.qml @@ -0,0 +1,21 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: 300 + height: tabBar.height + visible: true + + TabBar { + id: tabBar + width: parent.width + + TabButton { text: qsTr("Home") } + TabButton { text: qsTr("Discover") } + TabButton { text: qsTr("Activity") } + } +} diff --git a/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tumbler-wrap.qml b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tumbler-wrap.qml new file mode 100644 index 0000000000..1d6832bbc2 --- /dev/null +++ b/tests/manual/quickcontrols/gifs/data/qtquickcontrols2-tumbler-wrap.qml @@ -0,0 +1,57 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Window +import QtQuick.Controls + +Window { + width: frame.implicitWidth + 10 + height: frame.implicitHeight + 10 + visible: true + + function formatText(count, modelData) { + var data = count === 12 ? modelData + 1 : modelData; + return data.toString().length < 2 ? "0" + data : data; + } + + Component { + id: delegateComponent + + Label { + text: formatText(Tumbler.tumbler.count, modelData) + opacity: 1.0 - Math.abs(Tumbler.displacement) / (Tumbler.tumbler.visibleItemCount / 2) + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + Frame { + id: frame + padding: 0 + anchors.centerIn: parent + + Row { + id: row + + Tumbler { + id: hoursTumbler + model: 12 + delegate: delegateComponent + } + + Tumbler { + id: minutesTumbler + model: 60 + delegate: delegateComponent + } + + Tumbler { + id: amPmTumbler + wrap: false + model: ["AM", "PM"] + delegate: delegateComponent + } + } + } +} |