diff options
author | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-09-08 10:47:53 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-09-09 12:13:22 +0300 |
commit | 86aac52e1ffa4023d772694262f937f2d14345d9 (patch) | |
tree | 1d4163623edb09c111d9b50320cf367d8aed58bb /basicsuite/enterprise-dashboard/IconGaugeStyle.qml | |
parent | ce3de5de51f092d715d0f2a3371c0dec64c9404f (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/IconGaugeStyle.qml')
-rw-r--r-- | basicsuite/enterprise-dashboard/IconGaugeStyle.qml | 103 |
1 files changed, 0 insertions, 103 deletions
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 - } - } -} |