summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGatis Paeglis <gatis.paeglis@digia.com>2014-09-08 10:47:53 +0200
committerGatis Paeglis <gatis.paeglis@digia.com>2014-09-09 12:13:22 +0300
commit86aac52e1ffa4023d772694262f937f2d14345d9 (patch)
tree1d4163623edb09c111d9b50320cf367d8aed58bb
parentce3de5de51f092d715d0f2a3371c0dec64c9404f (diff)
Enterprise controls: keep only metadata.
Keep only metadata about enterprise controls demos. Demos itself are prepared and added to b2qt-demos package during build process. Task-number: QTEE-758 Change-Id: I4f931b8f232f484c87563584407d380c8acdc7ad Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
-rw-r--r--basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml144
-rw-r--r--basicsuite/enterprise-dashboard/IconGaugeStyle.qml103
-rw-r--r--basicsuite/enterprise-dashboard/TachometerStyle.qml95
-rw-r--r--basicsuite/enterprise-dashboard/TurnIndicator.qml88
-rw-r--r--basicsuite/enterprise-dashboard/ValueSource.qml300
-rw-r--r--basicsuite/enterprise-dashboard/enterprise-dashboard.pro5
-rw-r--r--basicsuite/enterprise-dashboard/fonts/DejaVuSans.ttfbin720856 -> 0 bytes
-rw-r--r--basicsuite/enterprise-dashboard/images/fuel-icon.pngbin666 -> 0 bytes
-rw-r--r--basicsuite/enterprise-dashboard/images/temperature-icon.pngbin3302 -> 0 bytes
-rw-r--r--basicsuite/enterprise-dashboard/main.qml154
-rw-r--r--basicsuite/enterprise-gallery/BlackButtonBackground.qml51
-rw-r--r--basicsuite/enterprise-gallery/BlackButtonStyle.qml44
-rw-r--r--basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml76
-rw-r--r--basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml26
-rw-r--r--basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml77
-rw-r--r--basicsuite/enterprise-gallery/CircularGaugeView.qml204
-rw-r--r--basicsuite/enterprise-gallery/ControlLabel.qml28
-rw-r--r--basicsuite/enterprise-gallery/ControlView.qml168
-rw-r--r--basicsuite/enterprise-gallery/ControlViewToolbar.qml81
-rw-r--r--basicsuite/enterprise-gallery/CustomizerLabel.qml28
-rw-r--r--basicsuite/enterprise-gallery/CustomizerSlider.qml55
-rw-r--r--basicsuite/enterprise-gallery/CustomizerSwitch.qml26
-rw-r--r--basicsuite/enterprise-gallery/FlickableMoreIndicator.qml56
-rw-r--r--basicsuite/enterprise-gallery/PieMenuControlView.qml168
-rw-r--r--basicsuite/enterprise-gallery/PieMenuDarkStyle.qml26
-rw-r--r--basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml24
-rw-r--r--basicsuite/enterprise-gallery/StylePicker.qml79
-rw-r--r--basicsuite/enterprise-gallery/enterprise-gallery.pro4
-rw-r--r--basicsuite/enterprise-gallery/fonts/LICENSE.txt202
-rw-r--r--basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttfbin217360 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/background-light.pngbin46832 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/background.pngbin45497 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/center-light.pngbin2113 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/center.pngbin2392 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/icon-go.pngbin536 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/icon-settings.pngbin576 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/info.pngbin709 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/needle-light.pngbin2105 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/needle.pngbin4891 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/qt-logo.pngbin5149 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/zoom_in.pngbin829 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/images/zoom_out.pngbin779 -> 0 bytes
-rw-r--r--basicsuite/enterprise-gallery/main.qml355
43 files changed, 9 insertions, 2658 deletions
diff --git a/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml b/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml
deleted file mode 100644
index 632b63b..0000000
--- a/basicsuite/enterprise-dashboard/DashboardGaugeStyle.qml
+++ /dev/null
@@ -1,144 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-CircularGaugeStyle {
- tickmarkInset: toPixels(0.04)
- minorTickmarkInset: tickmarkInset
- labelStepSize: 20
- labelInset: toPixels(0.23)
-
- property real xCenter: outerRadius
- property real yCenter: outerRadius
- property real needleLength: outerRadius - tickmarkInset * 1.25
- property real needleTipWidth: toPixels(0.02)
- property real needleBaseWidth: toPixels(0.06)
- property bool halfGauge: false
-
- function toPixels(percentage) {
- return percentage * outerRadius;
- }
-
- function degToRad(degrees) {
- return degrees * (Math.PI / 180);
- }
-
- function radToDeg(radians) {
- return radians * (180 / Math.PI);
- }
-
- function paintBackground(ctx) {
- if (halfGauge) {
- ctx.beginPath();
- ctx.rect(0, 0, ctx.canvas.width, ctx.canvas.height / 2);
- ctx.clip();
- }
-
- ctx.beginPath();
- ctx.fillStyle = "black";
- ctx.ellipse(0, 0, ctx.canvas.width, ctx.canvas.height);
- ctx.fill();
-
- ctx.beginPath();
- ctx.lineWidth = tickmarkInset;
- ctx.strokeStyle = "black";
- ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2);
- ctx.stroke();
-
- ctx.beginPath();
- ctx.lineWidth = tickmarkInset / 2;
- ctx.strokeStyle = "#222";
- ctx.arc(xCenter, yCenter, outerRadius - ctx.lineWidth / 2, outerRadius - ctx.lineWidth / 2, 0, Math.PI * 2);
- ctx.stroke();
-
- ctx.beginPath();
- var gradient = ctx.createRadialGradient(xCenter, yCenter, outerRadius * 0.8, xCenter, yCenter, outerRadius);
- gradient.addColorStop(0, Qt.rgba(1, 1, 1, 0));
- gradient.addColorStop(0.7, Qt.rgba(1, 1, 1, 0.13));
- gradient.addColorStop(1, Qt.rgba(1, 1, 1, 1));
- ctx.fillStyle = gradient;
- ctx.arc(xCenter, yCenter, outerRadius - tickmarkInset, outerRadius - tickmarkInset, 0, Math.PI * 2);
- ctx.fill();
- }
-
- background: Canvas {
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
- paintBackground(ctx);
- }
-
- Text {
- id: speedText
- font.pixelSize: toPixels(0.3)
- text: kphInt
- color: "white"
- horizontalAlignment: Text.AlignRight
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.verticalCenter
- anchors.topMargin: toPixels(0.1)
-
- readonly property int kphInt: control.value
- }
- Text {
- text: "km/h"
- color: "white"
- font.pixelSize: toPixels(0.09)
- anchors.top: speedText.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
-
- needle: Canvas {
- width: needleBaseWidth
- height: needleLength
-
- property real xCenter: width / 2
- property real yCenter: height / 2
-
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
-
- ctx.beginPath();
- ctx.moveTo(xCenter, height);
- ctx.lineTo(xCenter - needleBaseWidth / 2, height - needleBaseWidth / 2);
- ctx.lineTo(xCenter - needleTipWidth / 2, 0);
- ctx.lineTo(xCenter, yCenter - needleLength);
- ctx.lineTo(xCenter, 0);
- ctx.closePath();
- ctx.fillStyle = Qt.rgba(0.66, 0, 0, 0.66);
- ctx.fill();
-
- ctx.beginPath();
- ctx.moveTo(xCenter, height)
- ctx.lineTo(width, height - needleBaseWidth / 2);
- ctx.lineTo(xCenter + needleTipWidth / 2, 0);
- ctx.lineTo(xCenter, 0);
- ctx.closePath();
- ctx.fillStyle = Qt.lighter(Qt.rgba(0.66, 0, 0, 0.66));
- ctx.fill();
- }
- }
-
- foreground: null
-}
diff --git a/basicsuite/enterprise-dashboard/IconGaugeStyle.qml b/basicsuite/enterprise-dashboard/IconGaugeStyle.qml
deleted file mode 100644
index a04d0e9..0000000
--- a/basicsuite/enterprise-dashboard/IconGaugeStyle.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-DashboardGaugeStyle {
- id: fuelGaugeStyle
- minimumValueAngle: 300
- maximumValueAngle: 60
- tickmarkStepSize: 1
- labelStepSize: 1
- labelInset: toPixels(-0.25)
- minorTickmarkCount: 3
-
- needleLength: toPixels(0.85)
- needleBaseWidth: toPixels(0.08)
- needleTipWidth: toPixels(0.03)
-
- halfGauge: true
-
- property string icon: ""
- property color minWarningColor: "transparent"
- property color maxWarningColor: "transparent"
- readonly property real minWarningStartAngle: minimumValueAngle - 90
- readonly property real maxWarningStartAngle: maximumValueAngle - 90
-
- tickmark: Rectangle {
- width: toPixels(0.06)
- antialiasing: true
- height: toPixels(0.2)
- color: "#c8c8c8"
- }
-
- minorTickmark: Rectangle {
- width: toPixels(0.03)
- antialiasing: true
- height: toPixels(0.15)
- color: "#c8c8c8"
- }
-
- background: Item {
- Canvas {
- anchors.fill: parent
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
-
- paintBackground(ctx);
-
- if (minWarningColor != "transparent") {
- ctx.beginPath();
- ctx.lineWidth = fuelGaugeStyle.toPixels(0.08);
- ctx.strokeStyle = minWarningColor;
- ctx.arc(outerRadius, outerRadius,
- // Start the line in from the decorations, and account for the width of the line itself.
- outerRadius - tickmarkInset - ctx.lineWidth / 2,
- degToRad(minWarningStartAngle),
- degToRad(minWarningStartAngle + angleRange / (minorTickmarkCount + 1)), false);
- ctx.stroke();
- }
- if (maxWarningColor != "transparent") {
- ctx.beginPath();
- ctx.lineWidth = fuelGaugeStyle.toPixels(0.08);
- ctx.strokeStyle = maxWarningColor;
- ctx.arc(outerRadius, outerRadius,
- // Start the line in from the decorations, and account for the width of the line itself.
- outerRadius - tickmarkInset - ctx.lineWidth / 2,
- degToRad(maxWarningStartAngle - angleRange / (minorTickmarkCount + 1)),
- degToRad(maxWarningStartAngle), false);
- ctx.stroke();
- }
- }
- }
-
- Image {
- source: icon
- anchors.bottom: parent.verticalCenter
- anchors.bottomMargin: toPixels(0.3)
- anchors.horizontalCenter: parent.horizontalCenter
- width: toPixels(0.3)
- height: width
- fillMode: Image.PreserveAspectFit
- }
- }
-}
diff --git a/basicsuite/enterprise-dashboard/TachometerStyle.qml b/basicsuite/enterprise-dashboard/TachometerStyle.qml
deleted file mode 100644
index 15a2601..0000000
--- a/basicsuite/enterprise-dashboard/TachometerStyle.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-DashboardGaugeStyle {
- id: tachometerStyle
- tickmarkStepSize: 1
- labelStepSize: 1
- needleLength: toPixels(0.85)
- needleBaseWidth: toPixels(0.08)
- needleTipWidth: toPixels(0.03)
-
- tickmark: Rectangle {
- width: toPixels(0.03)
- antialiasing: true
- height: toPixels(0.08)
- color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8"
- }
-
- minorTickmark: null
-
- tickmarkLabel: Text {
- font.pixelSize: Math.max(6, toPixels(0.12))
- text: styleData.value
- color: styleData.index === 7 || styleData.index === 8 ? Qt.rgba(0.5, 0, 0, 1) : "#c8c8c8"
- antialiasing: true
- }
-
- background: Canvas {
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
- paintBackground(ctx);
-
- ctx.beginPath();
- ctx.lineWidth = tachometerStyle.toPixels(0.08);
- ctx.strokeStyle = Qt.rgba(0.5, 0, 0, 1);
- var warningCircumference = maximumValueAngle - minimumValueAngle * 0.1;
- var startAngle = maximumValueAngle - 90;
- ctx.arc(outerRadius, outerRadius,
- // Start the line in from the decorations, and account for the width of the line itself.
- outerRadius - tickmarkInset - ctx.lineWidth / 2,
- degToRad(startAngle - angleRange / 8 + angleRange * 0.015),
- degToRad(startAngle - angleRange * 0.015), false);
- ctx.stroke();
- }
-
- Text {
- id: rpmText
- font.pixelSize: tachometerStyle.toPixels(0.3)
- text: rpmInt
- color: "white"
- horizontalAlignment: Text.AlignRight
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.top: parent.verticalCenter
- anchors.topMargin: 20
-
- readonly property int rpmInt: valueSource.rpm
- }
- Text {
- text: "x1000"
- color: "white"
- font.pixelSize: tachometerStyle.toPixels(0.1)
- anchors.top: parent.top
- anchors.topMargin: parent.height / 4
- anchors.horizontalCenter: parent.horizontalCenter
- }
- Text {
- text: "RPM"
- color: "white"
- font.pixelSize: tachometerStyle.toPixels(0.1)
- anchors.top: rpmText.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
-}
diff --git a/basicsuite/enterprise-dashboard/TurnIndicator.qml b/basicsuite/enterprise-dashboard/TurnIndicator.qml
deleted file mode 100644
index 22d0ea9..0000000
--- a/basicsuite/enterprise-dashboard/TurnIndicator.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-Item {
- // This enum is actually keyboard-related, but it serves its purpose
- // as an indication of direction for us.
- property int direction: Qt.LeftArrow
- property bool on: false
-
- property bool flashing: false
-
- scale: direction === Qt.LeftArrow ? 1 : -1
-
- Timer {
- id: flashTimer
- interval: 500
- running: on
- repeat: true
- onTriggered: flashing = !flashing
- }
-
- function paintOutlinePath(ctx) {
- ctx.beginPath();
- ctx.moveTo(0, height * 0.5);
- ctx.lineTo(0.6 * width, 0);
- ctx.lineTo(0.6 * width, height * 0.28);
- ctx.lineTo(width, height * 0.28);
- ctx.lineTo(width, height * 0.72);
- ctx.lineTo(0.6 * width, height * 0.72);
- ctx.lineTo(0.6 * width, height);
- ctx.lineTo(0, height * 0.5);
- }
-
- Canvas {
- id: backgroundCanvas
- anchors.fill: parent
-
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
-
- paintOutlinePath(ctx);
-
- ctx.lineWidth = 1;
- ctx.strokeStyle = "black";
- ctx.stroke();
-
-// ctx.fillStyle = "#552222";
-// ctx.fill();
- }
- }
-
- Canvas {
- id: foregroundCanvas
- anchors.fill: parent
- visible: on && flashing
-
- onPaint: {
- var ctx = getContext("2d");
- ctx.reset();
-
- paintOutlinePath(ctx);
-
- ctx.fillStyle = "green";
- ctx.fill();
- }
- }
-}
diff --git a/basicsuite/enterprise-dashboard/ValueSource.qml b/basicsuite/enterprise-dashboard/ValueSource.qml
deleted file mode 100644
index 6bd1952..0000000
--- a/basicsuite/enterprise-dashboard/ValueSource.qml
+++ /dev/null
@@ -1,300 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: valueSource
- property real kph: 0
- property real rpm: 1
- property real fuel: 0.85
- property string gear: {
- var g;
- if (kph == 0) {
- return "P";
- }
- if (kph < 30) {
- return "1";
- }
- if (kph < 50) {
- return "2";
- }
- if (kph < 80) {
- return "3";
- }
- if (kph < 120) {
- return "4";
- }
- if (kph < 160) {
- return "5";
- }
- }
- property int turnSignal: gear == "P" && !start ? randomDirection() : -1
- property real temperature: 0.6
- property bool start: true
-
- function randomDirection() {
- return Math.random() > 0.5 ? Qt.LeftArrow : Qt.RightArrow;
- }
-
- SequentialAnimation {
- running: true
- loops: 1
-
- // We want a small pause at the beginning, but we only want it to happen once.
- PauseAnimation {
- duration: 1000
- }
-
- PropertyAction {
- target: valueSource
- property: "start"
- value: false
- }
-
- SequentialAnimation {
- loops: Animation.Infinite
-
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- from: 0
- to: 30
- duration: 3000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- from: 1
- to: 6.1
- duration: 3000
- }
- }
- ParallelAnimation {
- // We changed gears so we lost a bit of speed.
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- from: 30
- to: 26
- duration: 600
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- from: 6
- to: 2.4
- duration: 600
- }
- }
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 60
- duration: 3000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 5.6
- duration: 3000
- }
- }
- ParallelAnimation {
- // We changed gears so we lost a bit of speed.
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 56
- duration: 600
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 2.3
- duration: 600
- }
- }
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 100
- duration: 3000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 5.1
- duration: 3000
- }
- }
- ParallelAnimation {
- // We changed gears so we lost a bit of speed.
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 96
- duration: 600
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 2.2
- duration: 600
- }
- }
-
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 140
- duration: 3000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 6.2
- duration: 3000
- }
- }
-
- // Start downshifting.
-
- // Fifth to fourth gear.
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.Linear
- to: 100
- duration: 5000
- }
-
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 3.1
- duration: 5000
- }
- }
-
- // Fourth to third gear.
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 5.5
- duration: 600
- }
-
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 60
- duration: 5000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 2.6
- duration: 5000
- }
- }
-
- // Third to second gear.
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 6.3
- duration: 600
- }
-
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 30
- duration: 5000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 2.6
- duration: 5000
- }
- }
-
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 6.5
- duration: 600
- }
-
- // Second to first gear.
- ParallelAnimation {
- NumberAnimation {
- target: valueSource
- property: "kph"
- easing.type: Easing.InOutSine
- to: 0
- duration: 5000
- }
- NumberAnimation {
- target: valueSource
- property: "rpm"
- easing.type: Easing.InOutSine
- to: 1
- duration: 4500
- }
- }
-
- PauseAnimation {
- duration: 5000
- }
- }
- }
-}
diff --git a/basicsuite/enterprise-dashboard/enterprise-dashboard.pro b/basicsuite/enterprise-dashboard/enterprise-dashboard.pro
index 9fb29f2..9692d78 100644
--- a/basicsuite/enterprise-dashboard/enterprise-dashboard.pro
+++ b/basicsuite/enterprise-dashboard/enterprise-dashboard.pro
@@ -4,10 +4,11 @@ include(../shared/shared.pri)
b2qtdemo_deploy_defaults()
content.files = \
- *.qml \
+ qml/*.qml \
images
content.path = $$DESTPATH
OTHER_FILES += $${content.files}
-INSTALLS += target content \ No newline at end of file
+INSTALLS += target content
+
diff --git a/basicsuite/enterprise-dashboard/fonts/DejaVuSans.ttf b/basicsuite/enterprise-dashboard/fonts/DejaVuSans.ttf
deleted file mode 100644
index 19ed0b4..0000000
--- a/basicsuite/enterprise-dashboard/fonts/DejaVuSans.ttf
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-dashboard/images/fuel-icon.png b/basicsuite/enterprise-dashboard/images/fuel-icon.png
deleted file mode 100644
index f521e90..0000000
--- a/basicsuite/enterprise-dashboard/images/fuel-icon.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-dashboard/images/temperature-icon.png b/basicsuite/enterprise-dashboard/images/temperature-icon.png
deleted file mode 100644
index 5a4334e..0000000
--- a/basicsuite/enterprise-dashboard/images/temperature-icon.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-dashboard/main.qml b/basicsuite/enterprise-dashboard/main.qml
index 7f8ee75..7b9fa28 100644
--- a/basicsuite/enterprise-dashboard/main.qml
+++ b/basicsuite/enterprise-dashboard/main.qml
@@ -1,155 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
import QtQuick 2.0
-import QtQuick.Window 2.1
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-import QtQuick.Enterprise.Controls 1.1
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-Rectangle {
- id: root
- visible: true
- width: 1024
- height: 600
-
- color: "#161616"
- //title: "QtQuick Enterprise Controls Demo"
-
- ValueSource {
- id: valueSource
- }
-
- // Dashboards are typically in a landscape orientation, so we need to ensure
- // our height is never greater than our width.
- Item {
- id: container
- width: root.width
- height: Math.min(root.width, root.height)
- anchors.centerIn: parent
-
- Row {
- id: gaugeRow
- spacing: container.width * 0.02
- anchors.centerIn: parent
-
- TurnIndicator {
- id: leftIndicator
- anchors.verticalCenter: parent.verticalCenter
- width: height
- height: container.height * 0.1 - gaugeRow.spacing
-
- direction: Qt.LeftArrow
- on: valueSource.turnSignal == Qt.LeftArrow
- }
-
- Item {
- width: height
- height: container.height * 0.25 - gaugeRow.spacing
- anchors.verticalCenter: parent.verticalCenter
-
- CircularGauge {
- id: fuelGauge
- value: valueSource.fuel
- maximumValue: 1
- y: parent.height / 2 - height / 2 - container.height * 0.01
- width: parent.width
- height: parent.height * 0.7
-
- style: IconGaugeStyle {
- id: fuelGaugeStyle
-
- icon: "images/fuel-icon.png"
- minWarningColor: Qt.rgba(0.5, 0, 0, 1)
-
- tickmarkLabel: Text {
- color: "white"
- visible: styleData.value === 0 || styleData.value === 1
- font.pixelSize: fuelGaugeStyle.toPixels(0.225)
- text: styleData.value === 0 ? "E" : (styleData.value === 1 ? "F" : "")
- }
- }
- }
-
- CircularGauge {
- value: valueSource.temperature
- maximumValue: 1
- width: parent.width
- height: parent.height * 0.7
- y: parent.height / 2 + container.height * 0.01
-
- style: IconGaugeStyle {
- id: tempGaugeStyle
-
- icon: "images/temperature-icon.png"
- maxWarningColor: Qt.rgba(0.5, 0, 0, 1)
-
- tickmarkLabel: Text {
- color: "white"
- visible: styleData.value === 0 || styleData.value === 1
- font.pixelSize: tempGaugeStyle.toPixels(0.225)
- text: styleData.value === 0 ? "C" : (styleData.value === 1 ? "H" : "")
- }
- }
- }
- }
-
- CircularGauge {
- id: speedometer
- value: valueSource.kph
- anchors.verticalCenter: parent.verticalCenter
- maximumValue: 280
- // We set the width to the height, because the height will always be
- // the more limited factor. Also, all circular controls letterbox
- // their contents to ensure that they remain circular. However, we
- // don't want to extra space on the left and right of our gauges,
- // because they're laid out horizontally, and that would create
- // large horizontal gaps between gauges on wide screens.
- width: height
- height: container.height * 0.5
-
- style: DashboardGaugeStyle {}
- }
-
- CircularGauge {
- id: tachometer
- width: height
- height: container.height * 0.25 - gaugeRow.spacing
- value: valueSource.rpm
- maximumValue: 8
- anchors.verticalCenter: parent.verticalCenter
-
- style: TachometerStyle {}
- }
-
- TurnIndicator {
- id: rightIndicator
- anchors.verticalCenter: parent.verticalCenter
- width: height
- height: container.height * 0.1 - gaugeRow.spacing
-
- direction: Qt.RightArrow
- on: valueSource.turnSignal == Qt.RightArrow
- }
- }
- }
+Loader {
+ source: "qml/dashboard.qml"
}
diff --git a/basicsuite/enterprise-gallery/BlackButtonBackground.qml b/basicsuite/enterprise-gallery/BlackButtonBackground.qml
deleted file mode 100644
index 008668f..0000000
--- a/basicsuite/enterprise-gallery/BlackButtonBackground.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-
-Rectangle {
- property bool pressed: false
-
- gradient: Gradient {
- GradientStop {
- color: pressed ? "#222" : "#333"
- position: 0
- }
- GradientStop {
- color: "#222"
- position: 1
- }
- }
- Rectangle {
- height: 1
- width: parent.width
- anchors.top: parent.top
- color: "#444"
- visible: !pressed
- }
- Rectangle {
- height: 1
- width: parent.width
- anchors.bottom: parent.bottom
- color: "#000"
- }
-}
diff --git a/basicsuite/enterprise-gallery/BlackButtonStyle.qml b/basicsuite/enterprise-gallery/BlackButtonStyle.qml
deleted file mode 100644
index 73f6373..0000000
--- a/basicsuite/enterprise-gallery/BlackButtonStyle.qml
+++ /dev/null
@@ -1,44 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-
-ButtonStyle {
- property color fontColor;
-
- background: BlackButtonBackground {
- pressed: control.pressed
- }
- label: Item {
- Text {
- text: control.text
- color: fontColor
- font.pixelSize: control.height * 0.25
- font.family: openSans.name
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- anchors.verticalCenter: parent.verticalCenter
- anchors.left: parent.left
- anchors.leftMargin: 20
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml
deleted file mode 100644
index 0de1180..0000000
--- a/basicsuite/enterprise-gallery/CircularGaugeDarkStyle.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-CircularGaugeStyle {
- id: root
- tickmarkStepSize: 10
- minorTickmarkCount: 1
- labelStepSize: 20
- tickmarkInset: outerRadius * 0.06
- minorTickmarkInset: tickmarkInset
- labelInset: outerRadius * 0.23
-
- background: Image {
- source: "images/background.png"
- }
-
- needle: Image {
- id: needleImage
- transformOrigin: Item.Bottom
- source: "images/needle.png"
- scale: {
- var distanceFromLabelToRadius = labelInset / 2;
- var idealHeight = outerRadius - distanceFromLabelToRadius;
- var originalImageHeight = needleImage.sourceSize.height;
- idealHeight / originalImageHeight;
- }
- }
-
- foreground: Item {
- Image {
- anchors.centerIn: parent
- source: "images/center.png"
- scale: (outerRadius * 0.25) / sourceSize.height
- }
- }
-
- tickmark: Rectangle {
- width: outerRadius * 0.02
- antialiasing: true
- height: outerRadius * 0.05
- color: "#888"
- }
-
- minorTickmark: Rectangle {
- width: outerRadius * 0.01
- antialiasing: true
- height: outerRadius * 0.02
- color: "#444"
- }
-
- tickmarkLabel: Text {
- font.pixelSize: Math.max(6, outerRadius * 0.1)
- text: styleData.value
- color: "white"
- }
-}
diff --git a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml
deleted file mode 100644
index 23b25c4..0000000
--- a/basicsuite/enterprise-gallery/CircularGaugeDefaultStyle.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-CircularGaugeStyle {
- labelStepSize: 20
-}
diff --git a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml b/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml
deleted file mode 100644
index 87afa7d..0000000
--- a/basicsuite/enterprise-gallery/CircularGaugeLightStyle.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-CircularGaugeStyle {
- id: root
- tickmarkStepSize: 10
- minorTickmarkCount: 2
- labelStepSize: 40
- tickmarkInset: outerRadius * 0.06
- minorTickmarkInset: tickmarkInset
- labelInset: outerRadius * 0.23
-
- background: Image {
- source: "images/background-light.png"
- }
-
- needle: Image {
- id: needleImage
- source: "images/needle-light.png"
- transformOrigin: Item.Bottom
- scale: {
- var distanceFromLabelToRadius = labelInset / 2;
- var idealHeight = outerRadius - distanceFromLabelToRadius;
- var originalImageHeight = needleImage.sourceSize.height;
- idealHeight / originalImageHeight;
- }
- }
-
- foreground: Item {
- Image {
- anchors.centerIn: parent
- source: "images/center-light.png"
- scale: (outerRadius * 0.25) / sourceSize.height
- }
- }
-
- tickmark: Rectangle {
- width: outerRadius * 0.01
- antialiasing: true
- height: outerRadius * 0.04
- color: "#999"
- }
-
- minorTickmark: Rectangle {
- width: outerRadius * 0.01
- antialiasing: true
- height: outerRadius * 0.02
- color: "#bbb"
- }
-
- tickmarkLabel: Text {
- font.family: "Helvetica neue"
- font.pixelSize: Math.max(6, outerRadius * 0.1)
- text: styleData.value
- color: "#333"
- }
-}
diff --git a/basicsuite/enterprise-gallery/CircularGaugeView.qml b/basicsuite/enterprise-gallery/CircularGaugeView.qml
deleted file mode 100644
index a24b980..0000000
--- a/basicsuite/enterprise-gallery/CircularGaugeView.qml
+++ /dev/null
@@ -1,204 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import QtQuick.Enterprise.Controls 1.1
-
-ControlView {
- id: controlView
- darkBackground: customizerItem.currentStyleDark
-
- property color fontColor: darkBackground ? "white" : "black"
-
- property bool accelerating: false
-
- Keys.onSpacePressed: accelerating = true
- Keys.onReleased: {
- if (event.key === Qt.Key_Space) {
- accelerating = false;
- event.accepted = true;
- }
- }
-
- Button {
- id: accelerate
- text: "Accelerate"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom
- height: root.height * 0.125
-
- onPressedChanged: accelerating = pressed
-
- style: BlackButtonStyle {
- background: BlackButtonBackground {
- pressed: control.pressed
- }
- label: Text {
- text: control.text
- color: "white"
- font.pixelSize: root.toPixels(0.04)
- font.family: openSans.name
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- control: CircularGauge {
- id: gauge
- minimumValue: customizerItem.minimumValue
- maximumValue: customizerItem.maximumValue
- width: controlBounds.width
- height: controlBounds.height
-
- value: accelerating ? maximumValue : 0
- style: styleMap[customizerItem.currentStylePath]
-
- // This stops the styles being recreated when a new one is chosen.
- property var styleMap: {
- var styles = {};
- for (var i = 0; i < customizerItem.allStylePaths.length; ++i) {
- var path = customizerItem.allStylePaths[i];
- styles[path] = Qt.createComponent(path, gauge);
- }
- styles;
- }
-
- // Called to update the style after the user has edited a property.
- Connections {
- target: customizerItem
- onMinimumValueAngleChanged: __style.minimumValueAngle = customizerItem.minimumValueAngle
- onMaximumValueAngleChanged: __style.maximumValueAngle = customizerItem.maximumValueAngle
- onLabelStepSizeChanged: __style.tickmarkStepSize = __style.labelStepSize = customizerItem.labelStepSize
- }
-
- Behavior on value {
- NumberAnimation {
- easing.type: Easing.OutCubic
- duration: 6000
- }
- }
- }
-
- customizer: Column {
- readonly property var allStylePaths: {
- var paths = [];
- for (var i = 0; i < stylePicker.model.count; ++i) {
- paths.push(stylePicker.model.get(i).path);
- }
- paths;
- }
- property alias currentStylePath: stylePicker.currentStylePath
- property alias currentStyleDark: stylePicker.currentStyleDark
- property alias minimumValue: minimumValueSlider.value
- property alias maximumValue: maximumValueSlider.value
- property alias minimumValueAngle: minimumAngleSlider.value
- property alias maximumValueAngle: maximumAngleSlider.value
- property alias labelStepSize: labelStepSizeSlider.value
-
- id: circularGaugeColumn
- spacing: customizerPropertySpacing
-
- readonly property bool isDefaultStyle: stylePicker.model.get(stylePicker.currentIndex).name === "Default"
-
- StylePicker {
- id: stylePicker
- currentIndex: 1
-
- model: ListModel {
- ListElement {
- name: "Default"
- path: "CircularGaugeDefaultStyle.qml"
- dark: true
- }
- ListElement {
- name: "Dark"
- path: "CircularGaugeDarkStyle.qml"
- dark: true
- }
- ListElement {
- name: "Light"
- path: "CircularGaugeLightStyle.qml"
- dark: false
- }
- }
- }
-
- CustomizerLabel {
- text: "Minimum angle"
- }
-
- CustomizerSlider {
- id: minimumAngleSlider
- minimumValue: 0
- value: 215
- maximumValue: 360
- width: parent.width
- }
-
- CustomizerLabel {
- text: "Maximum angle"
- }
-
- CustomizerSlider {
- id: maximumAngleSlider
- minimumValue: 0
- value: 145
- maximumValue: 360
- }
-
- CustomizerLabel {
- text: "Minimum value"
- }
-
- CustomizerSlider {
- id: minimumValueSlider
- minimumValue: 0
- value: 0
- maximumValue: 360
- stepSize: 1
- }
-
- CustomizerLabel {
- text: "Maximum value"
- }
-
- CustomizerSlider {
- id: maximumValueSlider
- minimumValue: 0
- value: 240
- maximumValue: 300
- stepSize: 1
- }
-
- CustomizerLabel {
- text: "Label step size"
- }
-
- CustomizerSlider {
- id: labelStepSizeSlider
- minimumValue: 10
- value: 20
- maximumValue: 100
- stepSize: 20
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/ControlLabel.qml b/basicsuite/enterprise-gallery/ControlLabel.qml
deleted file mode 100644
index 0335342..0000000
--- a/basicsuite/enterprise-gallery/ControlLabel.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Text {
- font.pixelSize: Math.min(32, root.toPixels(0.045))
- color: "#4e4e4e"
- styleColor: "#ffffff"
- style: Text.Raised
-}
diff --git a/basicsuite/enterprise-gallery/ControlView.qml b/basicsuite/enterprise-gallery/ControlView.qml
deleted file mode 100644
index 2c6a7cf..0000000
--- a/basicsuite/enterprise-gallery/ControlView.qml
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-
-Rectangle {
- id: view
- color: darkBackground ? "transparent" : lightBackgroundColor
-
- Keys.onReleased: {
- if (event.key === Qt.Key_Back) {
- stackView.pop();
- event.accepted = true;
- }
- }
-
- property bool darkBackground: true
-
- property Component control
- property Component customizer
-
- property alias controlItem: controlLoader.item
- property alias customizerItem: customizerLoader.item
-
- property bool isCustomizerVisible: false
-
- property real margin: root.toPixels(0.05)
-
- property rect controlBounds: Qt.rect(largestControlItem.x + controlBoundsItem.x,
- largestControlItem.y + controlBoundsItem.y, controlBoundsItem.width, controlBoundsItem.height)
-
- Item {
- id: largestControlItem
- x: margin
- y: margin
- width: isCustomizerVisible ? widthWhenCustomizing : widthWhenNotCustomizing
- height: isCustomizerVisible ? heightWhenCustomizing : heightWhenNotCustomizing
-
- readonly property real widthWhenCustomizing: (!isScreenPortrait ? parent.width / 2 : parent.width) - margin * 2
- readonly property real heightWhenCustomizing: (isScreenPortrait ? parent.height / 2 : parent.height - toolbar.height) - margin * 2
- readonly property real widthWhenNotCustomizing: parent.width - margin * 2
- readonly property real heightWhenNotCustomizing: parent.height - toolbar.height - margin * 2
-
- Item {
- id: controlBoundsItem
- x: parent.width / 2 - controlBoundsItem.width / 2
- y: customizer && customizerItem.visible ? 0 : (isScreenPortrait ? (parent.height / 2) - (controlBoundsItem.height / 2) : 0)
- width: Math.min(parent.widthWhenCustomizing, parent.widthWhenNotCustomizing)
- height: Math.min(parent.heightWhenCustomizing, parent.heightWhenNotCustomizing)
-
- Behavior on x {
- id: controlXBehavior
- enabled: false
- NumberAnimation {}
- }
-
- Behavior on y {
- id: controlYBehavior
- enabled: false
- NumberAnimation {}
- }
-
- Loader {
- id: controlLoader
- sourceComponent: control
- anchors.centerIn: parent
-
- property alias view: view
- }
- }
- }
-
- Flickable {
- id: flickable
- // Hide the customizer on the right of the screen if it's not visible.
- x: (isScreenPortrait ? 0 : (isCustomizerVisible ? largestControlItem.x + largestControlItem.width + margin : view.width)) + margin
- y: (isScreenPortrait ? largestControlItem.y + largestControlItem.height : 0) + margin
- width: largestControlItem.width
- height: parent.height - y - toolbar.height - margin
- anchors.leftMargin: margin
- anchors.rightMargin: margin
- visible: customizerLoader.opacity > 0
-
- flickableDirection: Flickable.VerticalFlick
-
- clip: true
- contentWidth: width
- contentHeight: customizerLoader.height
-
- Behavior on x {
- id: flickableXBehavior
- enabled: false
- NumberAnimation {}
- }
-
- Behavior on y {
- id: flickableYBehavior
- enabled: false
- NumberAnimation {}
- }
-
- Loader {
- id: customizerLoader
- sourceComponent: customizer
- opacity: 0
- width: flickable.width
-
- property alias view: view
-
- Behavior on opacity {
- NumberAnimation {
- duration: 300
- }
- }
- }
- }
-
- ControlViewToolbar {
- id: toolbar
-
- onCustomizeClicked: {
- controlXBehavior.enabled = !isScreenPortrait;
- controlYBehavior.enabled = isScreenPortrait;
-
- isCustomizerVisible = !isCustomizerVisible;
-
- if (isScreenPortrait) {
- flickableXBehavior.enabled = false;
- flickableYBehavior.enabled = true;
- } else {
- flickableXBehavior.enabled = true;
- flickableYBehavior.enabled = false;
- }
-
- customizerLoader.opacity = isCustomizerVisible ? 1 : 0;
- }
- }
-
- FlickableMoreIndicator {
- flickable: flickable
- atTop: true
- gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor
- }
-
- FlickableMoreIndicator {
- flickable: flickable
- atTop: false
- gradientColor: view.darkBackground ? darkBackgroundColor : lightBackgroundColor
- }
-}
diff --git a/basicsuite/enterprise-gallery/ControlViewToolbar.qml b/basicsuite/enterprise-gallery/ControlViewToolbar.qml
deleted file mode 100644
index f3dd07b..0000000
--- a/basicsuite/enterprise-gallery/ControlViewToolbar.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-
-BlackButtonBackground {
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- height: root.height * 0.125
-
- signal customizeClicked
-
- gradient: Gradient {
- GradientStop {
- color: "#333"
- position: 0
- }
- GradientStop {
- color: "#222"
- position: 1
- }
- }
-
- Button {
- id: back
- width: parent.height
- height: parent.height
- anchors.left: parent.left
- anchors.bottom: parent.bottom
-
- onClicked: stackView.pop()
-
- style: BlackButtonStyle {
- }
-
- Image {
- source: "images/icon-go.png"
- anchors.verticalCenter: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- scale: -1
- }
- }
-
- Button {
- id: customize
- width: parent.height
- height: parent.height
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- visible: customizer
-
- style: BlackButtonStyle {
- }
-
- onClicked: customizeClicked()
-
- Image {
- source: "images/icon-settings.png"
- anchors.centerIn: parent
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/CustomizerLabel.qml b/basicsuite/enterprise-gallery/CustomizerLabel.qml
deleted file mode 100644
index c85807c..0000000
--- a/basicsuite/enterprise-gallery/CustomizerLabel.qml
+++ /dev/null
@@ -1,28 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Text {
- color: darkBackground ? root.darkFontColor : root.lightFontColor
- font.pixelSize: root.toPixels(0.04)
- font.family: openSans.name
- anchors.horizontalCenter: parent.horizontalCenter
-}
diff --git a/basicsuite/enterprise-gallery/CustomizerSlider.qml b/basicsuite/enterprise-gallery/CustomizerSlider.qml
deleted file mode 100644
index fb09a17..0000000
--- a/basicsuite/enterprise-gallery/CustomizerSlider.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.1
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-
-Slider {
- id: slider
- width: parent.width
- height: root.toPixels(0.1)
-
- style: SliderStyle {
- handle: Rectangle {
- height: root.toPixels(0.06)
- width: height
- radius: width/2
- color: "#fff"
- }
-
- groove: Rectangle {
- implicitHeight: root.toPixels(0.015)
- implicitWidth: 100
- radius: height/2
- border.color: "#333"
- color: "#222"
- Rectangle {
- height: parent.height
- width: styleData.handlePosition
- implicitHeight: 6
- implicitWidth: 100
- radius: height/2
- color: "#555"
- }
- }
-
- }
-}
diff --git a/basicsuite/enterprise-gallery/CustomizerSwitch.qml b/basicsuite/enterprise-gallery/CustomizerSwitch.qml
deleted file mode 100644
index 3048aae..0000000
--- a/basicsuite/enterprise-gallery/CustomizerSwitch.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.1
-
-Switch {
- anchors.horizontalCenter: parent.horizontalCenter
-}
diff --git a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml b/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml
deleted file mode 100644
index c8b9fe5..0000000
--- a/basicsuite/enterprise-gallery/FlickableMoreIndicator.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- anchors.top: atTop ? flickable.top : undefined
- anchors.bottom: atTop ? undefined : flickable.bottom
- anchors.left: isScreenPortrait ? parent.left : parent.horizontalCenter
- anchors.right: parent.right
- height: 30
- visible: flickable.visible
- opacity: atTop
- ? (flickable.contentY > showDistance ? 1 : 0)
- : (flickable.contentY < flickable.contentHeight - showDistance ? 1 : 0)
- scale: atTop ? 1 : -1
-
- readonly property real showDistance: 0
- property Flickable flickable
- property color gradientColor
- /*! \c true if this indicator is at the top of the item */
- property bool atTop
-
- Behavior on opacity {
- NumberAnimation {
- }
- }
-
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: gradientColor
- }
- GradientStop {
- position: 1.0
- color: "transparent"
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/PieMenuControlView.qml b/basicsuite/enterprise-gallery/PieMenuControlView.qml
deleted file mode 100644
index 2c06176..0000000
--- a/basicsuite/enterprise-gallery/PieMenuControlView.qml
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import QtQuick.Controls 1.0
-import QtQuick.Enterprise.Controls 1.1
-
-Rectangle {
- id: view
- color: customizerItem.currentStyleDark ? "#111" : "#555"
-
- Behavior on color {
- ColorAnimation {}
- }
-
- Keys.onReleased: {
- if (event.key === Qt.Key_Back) {
- stackView.pop();
- event.accepted = true;
- }
- }
-
- property bool darkBackground: true
-
- property Component mouseArea
-
- property Component customizer: Column {
- property alias currentStylePath: stylePicker.currentStylePath
- property alias currentStyleDark: stylePicker.currentStyleDark
-
- StylePicker {
- id: stylePicker
- currentIndex: 0
-
- model: ListModel {
- ListElement {
- name: "Default"
- path: "PieMenuDefaultStyle.qml"
- dark: false
- }
- ListElement {
- name: "Dark"
- path: "PieMenuDarkStyle.qml"
- dark: true
- }
- }
- }
- }
-
- property alias controlItem: pieMenu
- property alias customizerItem: customizerLoader.item
-
- Item {
- id: controlBoundsItem
- width: parent.width
- height: parent.height - toolbar.height
- visible: customizerLoader.opacity === 0
-
- Image {
- id: bgImage
- anchors.centerIn: parent
- height: 48
- Text {
- id: bgLabel
- anchors.top: parent.bottom
- anchors.topMargin: 20
- anchors.horizontalCenter: parent.horizontalCenter
- text: "Tap to open"
- color: "#999"
- font.pointSize: 20
- }
- }
-
- MouseArea {
- id: touchArea
- anchors.fill: parent
-
- onClicked: {
- pieMenu.popup(touchArea.mouseX, touchArea.mouseY);
- }
- }
-
- PieMenu {
- id: pieMenu
- activationMode: ActivationMode.ActivateOnClick
- width: Math.min(controlBoundsItem.width, controlBoundsItem.height) * 0.5
- height: width
-
- style: Qt.createComponent(customizerItem.currentStylePath)
-
- MenuItem {
- text: "Zoom In"
- onTriggered: {
- bgImage.source = iconSource
- bgLabel.text = text + " selected"
- }
- iconSource: "images/zoom_in.png"
- }
- MenuItem {
- text: "Zoom Out"
- onTriggered: {
- bgImage.source = iconSource
- bgLabel.text = text + " selected"
- }
- iconSource: "images/zoom_out.png"
- }
- MenuItem {
- text: "Info"
- onTriggered: {
- bgImage.source = iconSource
- bgLabel.text = text + " selected"
- }
- iconSource: "images/info.png"
- }
- }
- }
- Loader {
- id: customizerLoader
- sourceComponent: customizer
- opacity: 0
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.leftMargin: 30
- anchors.rightMargin: 30
- y: parent.height / 2 - height / 2 - toolbar.height
- visible: customizerLoader.opacity > 0
-
- property alias view: view
-
- Behavior on y {
- NumberAnimation {
- duration: 300
- }
- }
-
- Behavior on opacity {
- NumberAnimation {
- duration: 300
- }
- }
- }
-
- ControlViewToolbar {
- id: toolbar
-
- onCustomizeClicked: {
- customizerLoader.opacity = customizerLoader.opacity == 0 ? 1 : 0;
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml b/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml
deleted file mode 100644
index ab03701..0000000
--- a/basicsuite/enterprise-gallery/PieMenuDarkStyle.qml
+++ /dev/null
@@ -1,26 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-PieMenuStyle {
- backgroundColor: "#222"
- shadowColor: Qt.rgba(1, 1, 1, 0.26)
-}
diff --git a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml b/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml
deleted file mode 100644
index 4b0edb1..0000000
--- a/basicsuite/enterprise-gallery/PieMenuDefaultStyle.qml
+++ /dev/null
@@ -1,24 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-PieMenuStyle {
-}
diff --git a/basicsuite/enterprise-gallery/StylePicker.qml b/basicsuite/enterprise-gallery/StylePicker.qml
deleted file mode 100644
index f4e097e..0000000
--- a/basicsuite/enterprise-gallery/StylePicker.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-import QtQuick.Enterprise.Controls 1.1
-import QtQuick.Enterprise.Controls.Styles 1.1
-
-ListView {
- id: stylePicker
- width: parent.width
- height: root.height * 0.06
- interactive: false
- spacing: -1
-
- orientation: ListView.Horizontal
-
- readonly property string currentStylePath: stylePicker.model.get(stylePicker.currentIndex).path
- readonly property bool currentStyleDark: stylePicker.model.get(stylePicker.currentIndex).dark !== undefined
- ? stylePicker.model.get(stylePicker.currentIndex).dark
- : true
-
- ExclusiveGroup {
- id: styleExclusiveGroup
- }
-
- delegate: Button {
- width: stylePicker.width / stylePicker.model.count
- height: stylePicker.height
- checkable: true
- checked: index == ListView.view.currentIndex
- exclusiveGroup: styleExclusiveGroup
-
- onCheckedChanged: {
- if (checked) {
- ListView.view.currentIndex = index;
- }
- }
-
- style: ButtonStyle {
- background: Rectangle {
- readonly property color checkedColor: currentStyleDark ? "#444" : "#777"
- readonly property color uncheckedColor: currentStyleDark ? "#222" : "#bbb"
- color: checked ? checkedColor : uncheckedColor
- border.color: checkedColor
- border.width: 1
- radius: 1
- }
-
- label: Text {
- text: name
- color: currentStyleDark ? "white" : (checked ? "white" : "black")
- font.pixelSize: root.toPixels(0.04)
- font.family: openSans.name
- anchors.centerIn: parent
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-}
diff --git a/basicsuite/enterprise-gallery/enterprise-gallery.pro b/basicsuite/enterprise-gallery/enterprise-gallery.pro
index 3601432..32550a3 100644
--- a/basicsuite/enterprise-gallery/enterprise-gallery.pro
+++ b/basicsuite/enterprise-gallery/enterprise-gallery.pro
@@ -4,11 +4,11 @@ include(../shared/shared.pri)
b2qtdemo_deploy_defaults()
content.files = \
- *.qml \
+ qml/*.qml \
fonts \
images
content.path = $$DESTPATH
OTHER_FILES += $${content.files}
-INSTALLS += target content \ No newline at end of file
+INSTALLS += target content
diff --git a/basicsuite/enterprise-gallery/fonts/LICENSE.txt b/basicsuite/enterprise-gallery/fonts/LICENSE.txt
deleted file mode 100644
index d645695..0000000
--- a/basicsuite/enterprise-gallery/fonts/LICENSE.txt
+++ /dev/null
@@ -1,202 +0,0 @@
-
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf b/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf
deleted file mode 100644
index db43334..0000000
--- a/basicsuite/enterprise-gallery/fonts/OpenSans-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/background-light.png b/basicsuite/enterprise-gallery/images/background-light.png
deleted file mode 100644
index 2f76984..0000000
--- a/basicsuite/enterprise-gallery/images/background-light.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/background.png b/basicsuite/enterprise-gallery/images/background.png
deleted file mode 100644
index a3f4302..0000000
--- a/basicsuite/enterprise-gallery/images/background.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/center-light.png b/basicsuite/enterprise-gallery/images/center-light.png
deleted file mode 100644
index 75add20..0000000
--- a/basicsuite/enterprise-gallery/images/center-light.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/center.png b/basicsuite/enterprise-gallery/images/center.png
deleted file mode 100644
index b18a5fa..0000000
--- a/basicsuite/enterprise-gallery/images/center.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/icon-go.png b/basicsuite/enterprise-gallery/images/icon-go.png
deleted file mode 100644
index ed86c2d..0000000
--- a/basicsuite/enterprise-gallery/images/icon-go.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/icon-settings.png b/basicsuite/enterprise-gallery/images/icon-settings.png
deleted file mode 100644
index 6f37083..0000000
--- a/basicsuite/enterprise-gallery/images/icon-settings.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/info.png b/basicsuite/enterprise-gallery/images/info.png
deleted file mode 100644
index 5c7a9df..0000000
--- a/basicsuite/enterprise-gallery/images/info.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/needle-light.png b/basicsuite/enterprise-gallery/images/needle-light.png
deleted file mode 100644
index d486d9e..0000000
--- a/basicsuite/enterprise-gallery/images/needle-light.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/needle.png b/basicsuite/enterprise-gallery/images/needle.png
deleted file mode 100644
index 6b10c60..0000000
--- a/basicsuite/enterprise-gallery/images/needle.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/qt-logo.png b/basicsuite/enterprise-gallery/images/qt-logo.png
deleted file mode 100644
index 14ddf2a..0000000
--- a/basicsuite/enterprise-gallery/images/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/zoom_in.png b/basicsuite/enterprise-gallery/images/zoom_in.png
deleted file mode 100644
index 4128210..0000000
--- a/basicsuite/enterprise-gallery/images/zoom_in.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/images/zoom_out.png b/basicsuite/enterprise-gallery/images/zoom_out.png
deleted file mode 100644
index 772d6ac..0000000
--- a/basicsuite/enterprise-gallery/images/zoom_out.png
+++ /dev/null
Binary files differ
diff --git a/basicsuite/enterprise-gallery/main.qml b/basicsuite/enterprise-gallery/main.qml
index de60f47..df2ec8a 100644
--- a/basicsuite/enterprise-gallery/main.qml
+++ b/basicsuite/enterprise-gallery/main.qml
@@ -1,356 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use contact form at http://qt.digia.com
-**
-** This file is part of the QtQuick Enterprise Controls Add-on.
-**
-** $QT_BEGIN_LICENSE$
-** Licensees holding valid Qt Commercial licenses may use this file in
-** accordance with the Qt Commercial License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** contact form at http://qt.digia.com
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
import QtQuick 2.0
-import QtGraphicalEffects 1.0
-import QtQuick.Controls 1.0
-import QtQuick.Controls.Styles 1.0
-import QtQuick.Controls.Private 1.0
-import QtQuick.Dialogs 1.0
-import QtQuick.Enterprise.Controls 1.1
-import QtQuick.Enterprise.Controls.Styles 1.1
-import QtQuick.Layouts 1.0
-import QtQuick.Window 2.1
-
-Rectangle {
- id: root
- objectName: "window"
- visible: true
- width: 480
- height: 800
-
- color: "#161616"
- //title: "QtQuick Enterprise Controls Demo"
-
- function toPixels(percentage) {
- return percentage * Math.min(root.width, root.height);
- }
-
- property bool isScreenPortrait: height > width
- property color lightFontColor: "#222"
- property color darkFontColor: "#e7e7e7"
- readonly property color lightBackgroundColor: "#cccccc"
- readonly property color darkBackgroundColor: "#161616"
- property real customizerPropertySpacing: 10
- property real colorPickerRowSpacing: 8
-
- property Component circularGauge: CircularGaugeView {}
-
- property Component dial: ControlView {
- darkBackground: false
-
- control: Column {
- id: dialColumn
- width: controlBounds.width
- height: controlBounds.height - spacing
- spacing: root.toPixels(0.05)
-
- Column {
- id: volumeColumn
- width: parent.width
- height: (dialColumn.height - dialColumn.spacing) / 2
- spacing: height * 0.025
-
- Dial {
- id: volumeDial
- width: parent.width
- height: volumeColumn.height - volumeText.height - volumeColumn.spacing
-
- /*!
- Determines whether the dial animates its rotation to the new value when
- a single click or touch is received on the dial.
- */
- property bool animate: customizerItem.animate
-
- Behavior on value {
- enabled: volumeDial.animate && !volumeDial.pressed
- NumberAnimation {
- duration: 300
- easing.type: Easing.OutSine
- }
- }
- }
-
- ControlLabel {
- id: volumeText
- text: "Volume"
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
-
- Column {
- id: trebleColumn
- width: parent.width
- height: (dialColumn.height - dialColumn.spacing) / 2
- spacing: height * 0.025
-
- Dial {
- id: dial2
- width: parent.width
- height: trebleColumn.height - trebleText.height - trebleColumn.spacing
-
- stepSize: 1
- maximumValue: 10
-
- style: DialStyle {
- labelInset: outerRadius * 0
- }
- }
-
- ControlLabel {
- id: trebleText
- text: "Treble"
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- }
-
- customizer: Column {
- spacing: customizerPropertySpacing
-
- property alias animate: animateCheckBox.checked
-
- CustomizerLabel {
- text: "Animate"
- }
-
- CustomizerSwitch {
- id: animateCheckBox
- }
- }
- }
-
- property Component delayButton: ControlView {
- darkBackground: false
-
- control: DelayButton {
- text: "Alarm"
- anchors.centerIn: parent
- width: toPixels(0.3)
- height: width
- }
- }
-
- property Component gauge: ControlView {
- id: gaugeView
- control: Gauge {
- id: gauge
- width: orientation === Qt.Vertical ? gaugeView.controlBounds.height * 0.3 : gaugeView.controlBounds.width
- height: orientation === Qt.Vertical ? gaugeView.controlBounds.height : gaugeView.controlBounds.height * 0.3
- anchors.centerIn: parent
-
- minimumValue: 0
- value: customizerItem.value
- maximumValue: 100
- orientation: customizerItem.orientationFlag ? Qt.Vertical : Qt.Horizontal
- tickmarkAlignment: orientation === Qt.Vertical
- ? (customizerItem.alignFlag ? Qt.AlignLeft : Qt.AlignRight)
- : (customizerItem.alignFlag ? Qt.AlignTop : Qt.AlignBottom)
- }
-
- customizer: Column {
- spacing: customizerPropertySpacing
-
- property alias value: valueSlider.value
- property alias orientationFlag: orientationCheckBox.checked
- property alias alignFlag: alignCheckBox.checked
-
- CustomizerLabel {
- text: "Value"
- }
-
- CustomizerSlider {
- id: valueSlider
- minimumValue: 0
- value: 50
- maximumValue: 100
- }
-
- CustomizerLabel {
- text: "Vertical orientation"
- }
-
- CustomizerSwitch {
- id: orientationCheckBox
- checked: true
- }
-
- CustomizerLabel {
- text: controlItem.orientation === Qt.Vertical ? "Left align" : "Top align"
- }
-
- CustomizerSwitch {
- id: alignCheckBox
- checked: true
- }
- }
- }
-
- property Component toggleButton: ControlView {
- darkBackground: false
-
- control: ToggleButton {
- text: checked ? "On" : "Off"
- width: toPixels(0.3)
- height: width
- anchors.centerIn: parent
- }
- }
-
- property Component pieMenu: PieMenuControlView {}
-
- property Component statusIndicator: ControlView {
- id: statusIndicatorView
- darkBackground: false
-
- Timer {
- id: recordingFlashTimer
- running: true
- repeat: true
- interval: 1000
- }
-
- ColumnLayout {
- id: indicatorLayout
- width: statusIndicatorView.controlBounds.width * 0.25
- height: statusIndicatorView.controlBounds.height * 0.75
- anchors.centerIn: parent
-
- Repeater {
- model: ListModel {
- id: indicatorModel
- ListElement {
- name: "Power"
- indicatorColor: "green"
- }
- ListElement {
- name: "Recording"
- indicatorColor: "red"
- }
- }
-
- ColumnLayout {
- Layout.preferredWidth: indicatorLayout.width
-// Layout.preferredHeight: indicatorLayout.height * 0.25
- spacing: 0
-
- StatusIndicator {
- id: indicator
- color: indicatorColor
- Layout.preferredWidth: statusIndicatorView.controlBounds.width * 0.07
- Layout.preferredHeight: Layout.preferredWidth
- Layout.alignment: Qt.AlignHCenter
- on: true
-
- Connections {
- target: recordingFlashTimer
- onTriggered: if (name == "Recording") indicator.on = !indicator.on
- }
- }
- ControlLabel {
- id: indicatorLabel
- text: name
-// elide: Text.ElideRight
- Layout.alignment: Qt.AlignHCenter
- Layout.maximumWidth: parent.width
- horizontalAlignment: Text.AlignHCenter
- }
- }
- }
- }
- }
-
- FontLoader {
- id: openSans
- Component.onCompleted: {
- // QTBUG-35909
- if (Qt.platform.os === "ios")
- name = "Open Sans"
- else
- source = "fonts/OpenSans-Regular.ttf"
- }
- }
-
- property var componentMap: {
- "CircularGauge": circularGauge,
- "DelayButton": delayButton,
- "Dial": dial,
- "Gauge": gauge,
- "PieMenu": pieMenu,
- "StatusIndicator": statusIndicator,
- "ToggleButton": toggleButton
- }
-
- StackView {
- id: stackView
- anchors.fill: parent
-
- initialItem: ListView {
- model: ListModel {
- ListElement {
- title: "CircularGauge"
- }
- ListElement {
- title: "DelayButton"
- }
- ListElement {
- title: "Dial"
- }
- ListElement {
- title: "Gauge"
- }
-// ListElement {
-// title: "PieMenu"
-// }
- ListElement {
- title: "StatusIndicator"
- }
- ListElement {
- title: "ToggleButton"
- }
- }
-
- delegate: Button {
- width: stackView.width
- height: root.height * 0.125
- text: title
-
- Image {
- source: "images/icon-go.png"
- anchors.verticalCenter: parent.verticalCenter
- anchors.right: parent.right
- anchors.rightMargin: 30
- }
-
- style: BlackButtonStyle {
- fontColor: root.darkFontColor
- }
- onClicked: {
- if (stackView.depth == 1) {
- // Only push the control view if we haven't already pushed it...
- stackView.push({item: componentMap[title]});
- stackView.currentItem.forceActiveFocus();
- }
- }
- }
- }
- }
+Loader {
+ source: "qml/gallery.qml"
}