aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2020-04-14 18:27:36 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2020-04-14 18:30:20 +0200
commitd0ce76e5423414b92a2d00295e269c5f490a19c3 (patch)
tree9fc5482cd35339acc8077cc706c3c574859cbc98 /examples
parentdd2da5d14a1f8371ea3ae2aff4cad0d3b6d01ee8 (diff)
Update FlowView
* Add meta data for item library * Add property editor sheets * Some fixes Change-Id: I16e5fdc1d875ba0c777bbe93d7666db1f9b29122 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/imports/FlowView/FlowActionArea.qml24
-rw-r--r--examples/imports/FlowView/designer/FlowDecisionSpecifics.qml58
-rw-r--r--examples/imports/FlowView/designer/FlowEffectSpecifics.qml105
-rw-r--r--examples/imports/FlowView/designer/FlowViewSpecifics.qml104
-rw-r--r--examples/imports/FlowView/designer/FlowWildcardSpecifics.qml58
-rw-r--r--examples/imports/FlowView/designer/plugin.metainfo67
6 files changed, 404 insertions, 12 deletions
diff --git a/examples/imports/FlowView/FlowActionArea.qml b/examples/imports/FlowView/FlowActionArea.qml
index 9d42d9a..da019e0 100644
--- a/examples/imports/FlowView/FlowActionArea.qml
+++ b/examples/imports/FlowView/FlowActionArea.qml
@@ -36,18 +36,6 @@ MouseArea {
id: root
function trigger() {
- target.trigger()
- }
-
- property Connections connections : Connections {
- id: connections
- }
-
- property QtObject target
-
- enabled: target !== null || root.goBack
-
- onClicked: {
if (root.goBack) {
print("go back")
var par = root.parent
@@ -63,6 +51,18 @@ MouseArea {
}
}
+ property Connections connections : Connections {
+ id: connections
+ }
+
+ property QtObject target
+
+ enabled: target !== null || root.goBack
+
+ onClicked: {
+ root.trigger()
+ }
+
property bool goBack: false
}
diff --git a/examples/imports/FlowView/designer/FlowDecisionSpecifics.qml b/examples/imports/FlowView/designer/FlowDecisionSpecifics.qml
new file mode 100644
index 0000000..37e9807
--- /dev/null
+++ b/examples/imports/FlowView/designer/FlowDecisionSpecifics.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Designer Components.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Outline Color")
+
+ ColorEditor {
+ backendValue: backendValues.color__AUX
+ supportGradient: false
+ }
+ }
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Fill Color")
+
+ ColorEditor {
+ backendValue: backendValues.fillColor__AUX
+ supportGradient: false
+ }
+ }
+}
diff --git a/examples/imports/FlowView/designer/FlowEffectSpecifics.qml b/examples/imports/FlowView/designer/FlowEffectSpecifics.qml
new file mode 100644
index 0000000..f7b688b
--- /dev/null
+++ b/examples/imports/FlowView/designer/FlowEffectSpecifics.qml
@@ -0,0 +1,105 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Designer Components.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+import QtGraphicalEffects 1.1
+import StudioTheme 1.0 as StudioTheme
+
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Transition Effect")
+
+ SectionLayout {
+ rows: 2
+ columns: 2
+
+ Label {
+ text: qsTr("duration")
+ tooltip: qsTr("Sets the duration of the effect")
+ }
+ SpinBox {
+ backendValue: backendValues.duration
+ maximumValue: 10000
+ minimumValue: 0
+ }
+ Label {
+ text: "Easing Curve"
+ }
+ Item {
+ height: StudioTheme.Values.squareComponentWidth
+ width: height * 2
+ AbstractButton {
+ id: button
+ x: StudioTheme.Values.squareComponentWidth
+ onClicked: easingCurveEditor.runDialog()
+ //buttonIcon: ":/timelineplugin/images/curve_editor.png"
+ tooltip: qsTr("Anchor item to the top.")
+
+ EasingCurveEditor {
+ id: easingCurveEditor
+
+ modelNodeBackendProperty: modelNodeBackend
+ }
+
+ Image {
+ id: mask
+ source: "qrc:///timelineplugin/images/curve_editor.png"
+ visible: false
+ anchors.centerIn: parent
+ }
+
+ Rectangle {
+ id: rect
+ anchors.fill: mask
+
+ visible: false
+ }
+
+
+ Blend {
+ id: blend
+ anchors.fill: mask
+ source: mask
+ foregroundSource: rect
+ mode: "negation"
+ opacity: button.hovered ? 1 : 0.9
+ }
+
+ }
+ }
+ }
+ }
+}
diff --git a/examples/imports/FlowView/designer/FlowViewSpecifics.qml b/examples/imports/FlowView/designer/FlowViewSpecifics.qml
new file mode 100644
index 0000000..a0f342e
--- /dev/null
+++ b/examples/imports/FlowView/designer/FlowViewSpecifics.qml
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Designer Components.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Flow View Parameters")
+
+ SectionLayout {
+ rows: 1
+ columns: 2
+
+ Label {
+ text: qsTr("Current Index")
+ tooltip: qsTr("Current Index of the FlowView")
+ }
+ SpinBox {
+ backendValue: backendValues.currentIndex__AUX
+ maximumValue: 22
+ minimumValue: 1
+ }
+
+ }
+ }
+
+ Section {
+ visible: !anchorBackend.hasParent
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Transition Color")
+
+ ColorEditor {
+ backendValue: backendValues.transitionColor__AUX
+ supportGradient: false
+ }
+ }
+ Section {
+ visible: !anchorBackend.hasParent
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Area Outline Color")
+
+ ColorEditor {
+ backendValue: backendValues.areaColor__AUX
+ supportGradient: false
+ }
+ }
+ Section {
+ visible: !anchorBackend.hasParent
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Area Fill Color")
+
+ ColorEditor {
+ backendValue: backendValues.areaFillColor__AUX
+ supportGradient: false
+ }
+ }
+ Section {
+ visible: !anchorBackend.hasParent
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Block Item Color")
+
+ ColorEditor {
+ backendValue: backendValues.blockColor__AUX
+ supportGradient: false
+ }
+ }
+}
diff --git a/examples/imports/FlowView/designer/FlowWildcardSpecifics.qml b/examples/imports/FlowView/designer/FlowWildcardSpecifics.qml
new file mode 100644
index 0000000..37e9807
--- /dev/null
+++ b/examples/imports/FlowView/designer/FlowWildcardSpecifics.qml
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Quick Designer Components.
+**
+** $QT_BEGIN_LICENSE:GPL$
+** 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 https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 or (at your option) any later version
+** approved by the KDE Free Qt Foundation. The licenses are as published by
+** the Free Software Foundation and appearing in the file LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.1
+import HelperWidgets 2.0
+import QtQuick.Layouts 1.0
+
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Outline Color")
+
+ ColorEditor {
+ backendValue: backendValues.color__AUX
+ supportGradient: false
+ }
+ }
+ Section {
+ anchors.left: parent.left
+ anchors.right: parent.right
+ caption: qsTr("Fill Color")
+
+ ColorEditor {
+ backendValue: backendValues.fillColor__AUX
+ supportGradient: false
+ }
+ }
+}
diff --git a/examples/imports/FlowView/designer/plugin.metainfo b/examples/imports/FlowView/designer/plugin.metainfo
new file mode 100644
index 0000000..72f7f9c
--- /dev/null
+++ b/examples/imports/FlowView/designer/plugin.metainfo
@@ -0,0 +1,67 @@
+MetaInfo {
+ Type {
+ name: "FlowView.FlowView"
+ icon: ":/qtquickplugin/images/item-icon16.png"
+
+ Hints {
+ visibleInNavigator: true
+ canBeDroppedInNavigator: true
+ canBeDroppedInFormEditor: true
+ canBeContainer: false
+ visibleInLibrary: true
+ visibleInNavigator: true
+ visibleNonDefaultProperties: "flowDecisions, flowWildcards, flowTransitions"
+ }
+ ItemLibraryEntry {
+ name: "Flow View"
+ category: "Flow View"
+ libraryIcon: ":/qtquickplugin/images/item-icon.png"
+ version: "1.0"
+ requiredImport: "FlowView"
+ }
+ }
+ Type {
+ name: "FlowView.FlowDecision"
+ icon: ":/qtquickplugin/images/item-icon16.png"
+
+ Hints {
+ visibleInNavigator: true
+ canBeDroppedInNavigator: true
+ canBeDroppedInFormEditor: true
+ canBeContainer: false
+ visibleInLibrary: true
+ visibleInNavigator: true
+ forceNonDefaultProperty: "flowDecisions"
+ }
+
+ ItemLibraryEntry {
+ name: "Flow Decision"
+ category: "Flow View"
+ libraryIcon: ":/qtquickplugin/images/item-icon.png"
+ version: "1.0"
+ requiredImport: "FlowView"
+ }
+ }
+ Type {
+ name: "FlowView.FlowWildcard"
+ icon: ":/qtquickplugin/images/item-icon16.png"
+
+ Hints {
+ visibleInNavigator: true
+ canBeDroppedInNavigator: true
+ canBeDroppedInFormEditor: true
+ canBeContainer: false
+ visibleInLibrary: true
+ visibleInNavigator: true
+ forceNonDefaultProperty: "flowWildcards"
+ }
+
+ ItemLibraryEntry {
+ name: "Flow Wildcard"
+ category: "Flow View"
+ libraryIcon: ":/qtquickplugin/images/item-icon.png"
+ version: "1.0"
+ requiredImport: "FlowView"
+ }
+ }
+}