summaryrefslogtreecommitdiffstats
path: root/basicsuite/enterprise-dashboard
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 /basicsuite/enterprise-dashboard
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>
Diffstat (limited to 'basicsuite/enterprise-dashboard')
-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
10 files changed, 5 insertions, 884 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"
}