aboutsummaryrefslogtreecommitdiffstats
path: root/GUIModel/Meter
diff options
context:
space:
mode:
Diffstat (limited to 'GUIModel/Meter')
-rw-r--r--GUIModel/Meter/ChargeGuage.qml175
-rw-r--r--GUIModel/Meter/DigitalSpeed.qml2
-rw-r--r--GUIModel/Meter/Mask.qml2
-rw-r--r--GUIModel/Meter/Meter.qml106
-rw-r--r--GUIModel/Meter/Ready.qml2
-rw-r--r--GUIModel/Meter/Ring.qml2
-rw-r--r--GUIModel/Meter/Sideline.qml126
-rw-r--r--GUIModel/Meter/SpeedGuage.qml85
-rw-r--r--GUIModel/Meter/SpeedNeedle.qml243
-rw-r--r--GUIModel/Meter/Tachometer.qml105
10 files changed, 423 insertions, 425 deletions
diff --git a/GUIModel/Meter/ChargeGuage.qml b/GUIModel/Meter/ChargeGuage.qml
index 038df02..ad0c5ac 100644
--- a/GUIModel/Meter/ChargeGuage.qml
+++ b/GUIModel/Meter/ChargeGuage.qml
@@ -15,14 +15,14 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+import "qrc:/MeterEffect/"
Item {
id: chargeGuage
- x:666
- y:97
- width:588
- height:588
+ x: 666
+ y: 97
+ width: 588
+ height: 588
property real chargeValue
readonly property real chargeGuageMax: 100
@@ -30,40 +30,40 @@ Item {
onChargeValueChanged: {
limitChargeValue();
- effectChr.angleBase = (-0.45 * chargeValue*Math.PI/180)+effectChr.angle
+ effectChr.angleBase = (-0.45 * chargeValue * Math.PI / 180) + effectChr.angle;
}
- Connections{
+ Connections {
target: rootItem
- onTransNormalToAdas:{
- normalToAdasAnimation.start()
+ onTransNormalToAdas: {
+ normalToAdasAnimation.start();
}
}
- function limitChargeValue(){
- if(chargeValue > chargeGuageMax){
- chargeValue = chargeGuageMax
- }else if(chargeValue < chargeGuageMin){
- chargeValue = chargeGuageMin
+ function limitChargeValue() {
+ if (chargeValue > chargeGuageMax) {
+ chargeValue = chargeGuageMax;
+ } else if (chargeValue < chargeGuageMin) {
+ chargeValue = chargeGuageMin;
}
}
- Item{
+ Item {
id: chrGuageGroup
- width:588
- height:588
+ width: 588
+ height: 588
Item {
id: chrGuage
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: false
- Image{
+ Image {
id: chrGuageImg
source: "qrc:/Images/NormalView/METER/charge_guage.ktx"
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: true
@@ -71,119 +71,123 @@ Item {
Image {
id: chrEffect
source: ""
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: true
}
}
- ShaderEffect{
+ ShaderEffect {
id: effectChr
anchors.fill: parent
visible: true
blending: true
supportsAtlasTextures: true
- property real angleBase: -pi*1/2
- property real angle:-pi*1/2
- property var src: ShaderEffectSource{
+ property real angleBase: -pi * 1 / 2
+ property real angle: -pi * 1 / 2
+ property var src: ShaderEffectSource {
sourceItem: chrGuage
live: false
}
readonly property real pi: 3.1415926535
- vertexShader: "qrc:/Shaders/vert/guageMask.vert"
- fragmentShader:"qrc:/Shaders/frag/guageMask.frag"
+ vertexShader: ShaderPath.guageMaskVert
+ fragmentShader: ShaderPath.guageMaskFrag
}
}
- SequentialAnimation{
+ SequentialAnimation {
id: normalToAdasAnimation
- onStarted: rootItem.focus=false
- SequentialAnimation{
- NumberAnimation{
+ onStarted: rootItem.focus = false
+ SequentialAnimation {
+ NumberAnimation {
target: chrGuageGroup
property: "opacity"
duration: 330
easing.type: Easing.InOutSine
- from:1.0
- to:0.0
+ from: 1.0
+ to: 0.0
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageGroup
property: "visible"
duration: 0
easing.type: Easing.InOutSine
- from:true
- to:false
+ from: true
+ to: false
}
}
-
- ParallelAnimation{
+
+ ParallelAnimation {
/* down size */
- NumberAnimation{
+ NumberAnimation {
target: chargeGuage
property: "scale"
duration: 891
easing.type: meterParts.easing
- from:1
- to:0.75
+ from: 1
+ to: 0.75
}
-
+
/* translation */
- PathAnimation{
+ PathAnimation {
target: chargeGuage
- anchorPoint: Qt.point(chargeGuage.width/2, chargeGuage.height/2)
+ anchorPoint: Qt.point(chargeGuage.width / 2, chargeGuage.height / 2)
orientation: PathAnimation.Fixed
duration: 891
easing.type: meterParts.easing
-
+
path: Path {
- startX: 960; startY: 391
- PathLine { x: 540; y: 402 }
+ startX: 960
+ startY: 391
+ PathLine {
+ x: 540
+ y: 402
+ }
}
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageImg
property: "source"
to: "qrc:/Images/ADASView/METER/chr_wave.png"
duration: 0
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrEffect
property: "source"
to: "qrc:/Images/ADASView/METER/chr_glow.png"
duration: 0
}
}
- PauseAnimation{
+ PauseAnimation {
duration: 396
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageGroup
property: "visible"
to: true
duration: 0
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageGroup
property: "opacity"
to: 1
duration: 198
}
}
-
- SequentialAnimation{
+
+ SequentialAnimation {
id: mapToNormalAnimation
- onStarted: rootItem.focus=false
- onStopped: rootItem.focus=true
- PropertyAnimation{
+ onStarted: rootItem.focus = false
+ onStopped: rootItem.focus = true
+ PropertyAnimation {
target: chrGuageGroup
property: "opacity"
to: 0
duration: 198
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageGroup
property: "visible"
to: true
@@ -192,63 +196,66 @@ Item {
PauseAnimation {
duration: 254 + 330
}
-
-
- ParallelAnimation{
+
+ ParallelAnimation {
/* scaling */
- NumberAnimation{
+ NumberAnimation {
target: chargeGuage
property: "scale"
duration: 891
easing.type: meterParts.easing
- from:0.75
- to:1.0
+ from: 0.75
+ to: 1.0
}
-
+
/* slide */
- PathAnimation{
+ PathAnimation {
target: chargeGuage
- anchorPoint: Qt.point(chargeGuage.width/2, chargeGuage.height/2)
+ anchorPoint: Qt.point(chargeGuage.width / 2, chargeGuage.height / 2)
orientation: PathAnimation.Fixed
duration: 891
easing.type: meterParts.easing
-
+
path: Path {
- startX: 540; startY: 402
- PathLine { x: 960; y: 391 }
+ startX: 540
+ startY: 402
+ PathLine {
+ x: 960
+ y: 391
+ }
}
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrGuageImg
property: "source"
to: "qrc:/Images/NormalView/METER/charge_guage.ktx"
duration: 0
}
- PropertyAnimation{
+ PropertyAnimation {
target: chrEffect
property: "source"
to: ""
duration: 0
}
}
-
- SequentialAnimation{
- PropertyAnimation{
+
+ SequentialAnimation {
+ PropertyAnimation {
target: chrGuageGroup
property: "visible"
duration: 0
easing.type: Easing.InOutSine
- from:false
- to:true
+ from: false
+ to: true
}
-
- NumberAnimation{
+
+ NumberAnimation {
target: chrGuageGroup
property: "opacity"
duration: 330
easing.type: Easing.InOutSine
- from:0.0
- to:1.0
+ from: 0.0
+ to: 1.0
}
}
PauseAnimation {
diff --git a/GUIModel/Meter/DigitalSpeed.qml b/GUIModel/Meter/DigitalSpeed.qml
index 7d9534b..1cbf56a 100644
--- a/GUIModel/Meter/DigitalSpeed.qml
+++ b/GUIModel/Meter/DigitalSpeed.qml
@@ -15,7 +15,7 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+
Item{
id: digitalSpeed
diff --git a/GUIModel/Meter/Mask.qml b/GUIModel/Meter/Mask.qml
index 56a7497..31dcb47 100644
--- a/GUIModel/Meter/Mask.qml
+++ b/GUIModel/Meter/Mask.qml
@@ -15,7 +15,7 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+
Item{
id:mask
diff --git a/GUIModel/Meter/Meter.qml b/GUIModel/Meter/Meter.qml
index 7c2d5dd..d79d36f 100644
--- a/GUIModel/Meter/Meter.qml
+++ b/GUIModel/Meter/Meter.qml
@@ -15,75 +15,71 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
Item {
id: meter
property real speedValue: 0
property real tachoValue: 0
- property real chargeValue:100
+ property real chargeValue: 100
onSpeedValueChanged: {
- speedGuage.speedValue = speedValue
- speedNeedle.speedValue = speedValue
- digitalSpeed.speedValue = speedValue
+ speedGuage.speedValue = speedValue;
+ speedNeedle.speedValue = speedValue;
+ digitalSpeed.speedValue = speedValue;
}
onTachoValueChanged: {
- tachometer.tachoValue = tachoValue
+ tachometer.tachoValue = tachoValue;
}
onChargeValueChanged: {
- chargeGuage.chargeValue = chargeValue
+ chargeGuage.chargeValue = chargeValue;
}
-
Item {
- id: meterParts
- property var easing: Easing.InOutQuad
-
- Connections{
- target: rootItem
- onTransNormalToAdas:{
- / *nop */
- }
- }
-
- Sideline {
- id: sideline
- }
-
- Ring {
- id: ring
- }
-
- ChargeGuage {
- id: chargeGuage
- }
-
- SpeedGuage {
- id: speedGuage
- }
-
- SpeedNeedle {
- id: speedNeedle
- }
-
- Tachometer {
- id: tachometer
- }
-
- Ready {
- id: ready
- }
-
- Mask {
- id: mask
- }
-
- DigitalSpeed {
- id: digitalSpeed
- }
+ id: meterParts
+ property var easing: Easing.InOutQuad
+
+ Connections {
+ target: rootItem
+ onTransNormalToAdas: {
+ / *nop */;
+ }
+ }
+
+ Sideline {
+ id: sideline
+ }
+
+ Ring {
+ id: ring
+ }
+
+ ChargeGuage {
+ id: chargeGuage
+ }
+
+ SpeedGuage {
+ id: speedGuage
+ }
+
+ SpeedNeedle {
+ id: speedNeedle
+ }
+
+ Tachometer {
+ id: tachometer
+ }
+
+ Ready {
+ id: ready
+ }
+
+ Mask {
+ id: mask
+ }
+
+ DigitalSpeed {
+ id: digitalSpeed
+ }
}
}
-
-
diff --git a/GUIModel/Meter/Ready.qml b/GUIModel/Meter/Ready.qml
index fd2bde0..11f1a11 100644
--- a/GUIModel/Meter/Ready.qml
+++ b/GUIModel/Meter/Ready.qml
@@ -15,7 +15,7 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+
Item {
id: ready
diff --git a/GUIModel/Meter/Ring.qml b/GUIModel/Meter/Ring.qml
index c41188b..abc34f2 100644
--- a/GUIModel/Meter/Ring.qml
+++ b/GUIModel/Meter/Ring.qml
@@ -15,7 +15,7 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+
Item {
id: ring
diff --git a/GUIModel/Meter/Sideline.qml b/GUIModel/Meter/Sideline.qml
index 0da9931..fe903a6 100644
--- a/GUIModel/Meter/Sideline.qml
+++ b/GUIModel/Meter/Sideline.qml
@@ -15,138 +15,144 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
Item {
id: sideline
width: 1780
height: 1780
- x:70
- y:-499
-
- Connections{
+ x: 70
+ y: -499
+
+ Connections {
target: rootItem
- onTransNormalToAdas:{
- normalToAdasAnimation.start()
+ onTransNormalToAdas: {
+ normalToAdasAnimation.start();
}
}
- Image{
- id:meterLineR
+ Image {
+ id: meterLineR
source: "qrc:/Images/NormalView/METER/meter_line_r.ktx"
- x:980
- y:0
- width:800
- height:636
+ x: 980
+ y: 0
+ width: 800
+ height: 636
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 0
}
-
- Image{
- id:meterLineL
+
+ Image {
+ id: meterLineL
source: "qrc:/Images/NormalView/METER/meter_line_l.ktx"
- y:0
- width:800
- height:636
+ y: 0
+ width: 800
+ height: 636
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 0
}
-
+
transform: Rotation {
- id:sidelineRotation
- origin.x: sideline.width/2;
- origin.y: sideline.height/2;
+ id: sidelineRotation
+ origin.x: sideline.width / 2
+ origin.y: sideline.height / 2
angle: 0
}
-
- SequentialAnimation{
+
+ SequentialAnimation {
id: normalToAdasAnimation
- onStarted: rootItem.focus=false
+ onStarted: rootItem.focus = false
PauseAnimation {
duration: 330
}
-
- ParallelAnimation{
+
+ ParallelAnimation {
/* down size */
- NumberAnimation{
+ NumberAnimation {
target: sideline
property: "scale"
duration: 891
easing.type: meterParts.easing
- from:1
- to:0.75
+ from: 1
+ to: 0.75
}
-
+
/* rotation */
- PropertyAnimation{
+ PropertyAnimation {
target: sidelineRotation
property: "angle"
duration: 891
easing.type: meterParts.easing
- from:0
- to:-90
+ from: 0
+ to: -90
}
-
+
/* translation */
- PathAnimation{
+ PathAnimation {
target: sideline
- anchorPoint: Qt.point(sideline.width/2, sideline.height/2)
+ anchorPoint: Qt.point(sideline.width / 2, sideline.height / 2)
orientation: PathAnimation.Fixed
duration: 891
easing.type: meterParts.easing
-
+
path: Path {
- startX: 960; startY: 391
- PathLine { x: 540; y: 402 }
+ startX: 960
+ startY: 391
+ PathLine {
+ x: 540
+ y: 402
+ }
}
}
}
}
-
- SequentialAnimation{
+
+ SequentialAnimation {
id: mapToNormalAnimation
- onStarted: rootItem.focus=false
+ onStarted: rootItem.focus = false
PauseAnimation {
duration: 254 + 330
}
-
- ParallelAnimation{
+
+ ParallelAnimation {
/* down size */
- NumberAnimation{
+ NumberAnimation {
target: sideline
property: "scale"
duration: 891
easing.type: meterParts.easing
- from:0.75
- to:1.0
+ from: 0.75
+ to: 1.0
}
-
+
/* rotation */
- PropertyAnimation{
+ PropertyAnimation {
target: sidelineRotation
property: "angle"
duration: 891
easing.type: meterParts.easing
- from:-90
- to:0
+ from: -90
+ to: 0
}
-
+
/* translation */
- PathAnimation{
+ PathAnimation {
target: sideline
- anchorPoint: Qt.point(sideline.width/2, sideline.height/2)
+ anchorPoint: Qt.point(sideline.width / 2, sideline.height / 2)
orientation: PathAnimation.Fixed
duration: 891
easing.type: meterParts.easing
-
+
path: Path {
- startX: 540; startY: 402
- PathLine { x: 960; y: 391 }
+ startX: 540
+ startY: 402
+ PathLine {
+ x: 960
+ y: 391
+ }
}
}
}
}
-
}
diff --git a/GUIModel/Meter/SpeedGuage.qml b/GUIModel/Meter/SpeedGuage.qml
index 6667cad..c268f61 100644
--- a/GUIModel/Meter/SpeedGuage.qml
+++ b/GUIModel/Meter/SpeedGuage.qml
@@ -15,15 +15,15 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
import QtQuick.Shapes 1.14
+import "qrc:/MeterEffect/"
Item {
id: speedGuage
- x:666
- y:97
- width:588
- height:588
+ x: 666
+ y: 97
+ width: 588
+ height: 588
property real speedValue
readonly property real speedGuageMax: 100
@@ -31,85 +31,84 @@ Item {
onSpeedValueChanged: {
limitSpeedValue();
- effectPwr.angle = (2.25 * speedValue*Math.PI/180)+effectPwr.angleBase
+ effectPwr.angle = (2.25 * speedValue * Math.PI / 180) + effectPwr.angleBase;
}
- Connections{
+ Connections {
target: rootItem
- onTransNormalToAdas:{
- normalToAdasAnimation.start()
+ onTransNormalToAdas: {
+ normalToAdasAnimation.start();
}
}
- function limitSpeedValue(){
- if(speedGuageMax < speedValue){
- speedValue = speedGuageMax
- }else if(speedValue < speedGuageMin){
- speedValue = speedGuageMin
+ function limitSpeedValue() {
+ if (speedGuageMax < speedValue) {
+ speedValue = speedGuageMax;
+ } else if (speedValue < speedGuageMin) {
+ speedValue = speedGuageMin;
}
}
/* Guage - visible in Normal mode */
Item {
- id:pwrGuageGroup
- width:588
- height:588
-
- Image{
- id:pwrGuage
+ id: pwrGuageGroup
+ width: 588
+ height: 588
+
+ Image {
+ id: pwrGuage
source: "qrc:/Images/NormalView/METER/pwr_guage.png"
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
opacity: 1
visible: false
}
- ShaderEffect{
+ ShaderEffect {
id: effectPwr
anchors.fill: parent
visible: true
blending: true
supportsAtlasTextures: true
- property real angleBase: -pi*1/2
- property real angle:-pi*1/2
- property var src: ShaderEffectSource{
+ property real angleBase: -pi * 1 / 2
+ property real angle: -pi * 1 / 2
+ property var src: ShaderEffectSource {
sourceItem: pwrGuage
live: false
}
readonly property real pi: 3.1415926535
- vertexShader: "qrc:/Shaders/vert/guageMask.vert"
- fragmentShader:"qrc:/Shaders/frag/guageMask.frag"
+ vertexShader: ShaderPath.guageMaskVert
+ fragmentShader: ShaderPath.guageMaskFrag
}
}
-
-
- Image{
- id:ringLine
+
+ Image {
+ id: ringLine
source: "qrc:/Images/NormalView/METER/ring_line.ktx"
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
-
- Image{
- id:speedTxt
+
+ Image {
+ id: speedTxt
source: "qrc:/Images/NormalView/SPEED/speed_txt.png"
- width:588
- height:588
+ width: 588
+ height: 588
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
-
- Image{
- id:ring5
+
+ Image {
+ id: ring5
source: "qrc:/Images/NormalView/METER/ring5.png"
width: 34
- height:24
+ height: 24
anchors.left: parent.left
anchors.leftMargin: -11
anchors.verticalCenter: parent.verticalCenter
diff --git a/GUIModel/Meter/SpeedNeedle.qml b/GUIModel/Meter/SpeedNeedle.qml
index b2153ae..f04ecfa 100644
--- a/GUIModel/Meter/SpeedNeedle.qml
+++ b/GUIModel/Meter/SpeedNeedle.qml
@@ -15,12 +15,12 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+import "qrc:/MeterEffect/"
Item {
id: speedNeedle
- width:444
- height:444
+ width: 444
+ height: 444
x: 318
y: 180
visible: false
@@ -31,165 +31,160 @@ Item {
onSpeedValueChanged: {
setNeedleAngle();
- effectPwrNeedle.angle = (2.25 * speedValue*Math.PI/180)+effectPwrNeedle.angleBase
+ effectPwrNeedle.angle = (2.25 * speedValue * Math.PI / 180) + effectPwrNeedle.angleBase;
}
-
- Connections{
+
+ Connections {
target: rootItem
- onTransNormalToAdas:{
- normalToAdasAnimation.start()
+ onTransNormalToAdas: {
+ normalToAdasAnimation.start();
}
}
- function setNeedleAngle(){
- if(speedNeedleMax < speedValue){
- speedValue = speedNeedleMax
- }else if( speedValue < speedNeedleMin){
- speedValue = speedNeedleMin
+ function setNeedleAngle() {
+ if (speedNeedleMax < speedValue) {
+ speedValue = speedNeedleMax;
+ } else if (speedValue < speedNeedleMin) {
+ speedValue = speedNeedleMin;
}
- rotateNeedle.angle = 2.25 * speedValue
+ rotateNeedle.angle = 2.25 * speedValue;
}
/* Needle - visible in ADAS/Map mode */
Item {
- id:needleGroup
- width:444
- height:444
-
- Image{
+ id: needleGroup
+ width: 444
+ height: 444
+
+ Image {
id: pwrNeedle
source: "qrc:/Images/ADASView/METER/needle.png"
x: 28
y: 220
- width:182
- height:4
+ width: 182
+ height: 4
visible: false
}
-
- Item{
+
+ Item {
id: needleMask
visible: false
- anchors.fill:pwrNeedle
+ anchors.fill: pwrNeedle
property double maskPercent: 0
-
- Rectangle{
+
+ Rectangle {
id: needleMaskInvisible
color: "red"
opacity: 0
anchors.left: parent.left
- width: pwrNeedle.width * (1.0 - needleMask.maskPercent/100.0)
+ width: pwrNeedle.width * (1.0 - needleMask.maskPercent / 100.0)
height: pwrNeedle.height
visible: true
}
- Rectangle{
+ Rectangle {
id: needleMaskVisible
color: "blue"
anchors.right: parent.right
opacity: 1
- width: pwrNeedle.width * (needleMask.maskPercent/100.0)
+ width: pwrNeedle.width * (needleMask.maskPercent / 100.0)
height: pwrNeedle.height
visible: true
}
}
-
-
+
OpacityMask {
id: maskedPwrNeedle
cached: false
width: pwrNeedle.x
- height:pwrNeedle.y
- anchors.fill:pwrNeedle
+ height: pwrNeedle.y
+ anchors.fill: pwrNeedle
source: pwrNeedle
maskSource: needleMask
}
-
- transform: Rotation{
- id:rotateNeedle
+
+ transform: Rotation {
+ id: rotateNeedle
origin.x: needleGroup.width / 2
origin.y: needleGroup.height / 2
- angle : 0
+ angle: 0
}
-
-
}
-
- Item{
+
+ Item {
id: centerCircleGroup
- width:124
- height:126
- x:160
- y:166
- Image{
+ width: 124
+ height: 126
+ x: 160
+ y: 166
+ Image {
id: centerCircle
source: "qrc:/Images/ADASView/METER/center_circle.png"
- width:124
- height:126
+ width: 124
+ height: 126
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
visible: true
}
}
-
+
Item {
id: pwrNeedleEffect
- width:444
- height:444
+ width: 444
+ height: 444
x: 0
y: 0
visible: false
-
- Image{
+
+ Image {
source: "qrc:/Images/ADASView/METER/pwr_wave.png"
- width:444
- height:442
+ width: 444
+ height: 442
visible: true
}
-
- Image{
+
+ Image {
source: "qrc:/Images/ADASView/METER/pwr_glow.png"
- width:444
- height:442
+ width: 444
+ height: 442
visible: true
}
}
-
- ShaderEffect{
+ ShaderEffect {
id: effectPwrNeedle
anchors.fill: pwrNeedleEffect
visible: false
blending: true
supportsAtlasTextures: true
- property real angleBase: -pi*1/2
- property real angle:-pi*1/2
- property var src: ShaderEffectSource{
+ property real angleBase: -pi * 1 / 2
+ property real angle: -pi * 1 / 2
+ property var src: ShaderEffectSource {
sourceItem: pwrNeedleEffect
}
readonly property real pi: 3.1415926535
- vertexShader: "qrc:/Shaders/vert/guageMask.vert"
- fragmentShader:"qrc:/Shaders/frag/guageMask.frag"
+ vertexShader: ShaderPath.guageMaskVert
+ fragmentShader: ShaderPath.guageMaskFrag
}
-
-
- SequentialAnimation{
+
+ SequentialAnimation {
id: normalToAdasAnimation
- onStarted: rootItem.focus=false
- onStopped: rootItem.focus=true
+ onStarted: rootItem.focus = false
+ onStopped: rootItem.focus = true
PauseAnimation {
duration: 330 + 891
}
-
- PropertyAnimation{
+
+ PropertyAnimation {
target: speedNeedle
property: "visible"
duration: 0
- from:false
- to:true
+ from: false
+ to: true
}
-
- NumberAnimation{
+
+ NumberAnimation {
target: centerCircle
property: "scale"
duration: 396
@@ -197,68 +192,67 @@ Item {
from: 0
to: 1
}
-
- PropertyAnimation{
- target:effectPwrNeedle
- property:"visible"
- duration:0
- from:false
- to:true
+
+ PropertyAnimation {
+ target: effectPwrNeedle
+ property: "visible"
+ duration: 0
+ from: false
+ to: true
}
-
- ParallelAnimation{
+
+ ParallelAnimation {
NumberAnimation {
- target:needleMask
+ target: needleMask
property: "maskPercent"
duration: 198
- from:0.0
- to:100.0
+ from: 0.0
+ to: 100.0
}
-
- NumberAnimation{
- target:effectPwrNeedle
- property:"opacity"
- duration:198
- from:0
- to:1
+
+ NumberAnimation {
+ target: effectPwrNeedle
+ property: "opacity"
+ duration: 198
+ from: 0
+ to: 1
}
}
PauseAnimation {
duration: 330
}
-
}
-
- SequentialAnimation{
+
+ SequentialAnimation {
id: mapToNormalAnimation
- onStarted: rootItem.focus=false
- ParallelAnimation{
+ onStarted: rootItem.focus = false
+ ParallelAnimation {
NumberAnimation {
- target:needleMask
+ target: needleMask
property: "maskPercent"
duration: 198
- from:100.0
- to:0.0
+ from: 100.0
+ to: 0.0
}
-
- NumberAnimation{
- target:effectPwrNeedle
- property:"opacity"
- duration:198
- from:1
- to:0
+
+ NumberAnimation {
+ target: effectPwrNeedle
+ property: "opacity"
+ duration: 198
+ from: 1
+ to: 0
}
}
-
- PropertyAnimation{
- target:effectPwrNeedle
- property:"visible"
- duration:0
- from:true
- to:false
+
+ PropertyAnimation {
+ target: effectPwrNeedle
+ property: "visible"
+ duration: 0
+ from: true
+ to: false
}
-
- NumberAnimation{
+
+ NumberAnimation {
target: centerCircle
property: "scale"
duration: 396
@@ -266,14 +260,13 @@ Item {
from: 1
to: 0
}
-
- PropertyAnimation{
+
+ PropertyAnimation {
target: speedNeedle
property: "visible"
duration: 0
- from:true
- to:false
+ from: true
+ to: false
}
}
-
}
diff --git a/GUIModel/Meter/Tachometer.qml b/GUIModel/Meter/Tachometer.qml
index 9ad0d7a..9974eea 100644
--- a/GUIModel/Meter/Tachometer.qml
+++ b/GUIModel/Meter/Tachometer.qml
@@ -15,7 +15,7 @@
*/
import QtQuick 2.14
-import QtGraphicalEffects 1.14
+import "qrc:/MeterEffect/"
Item {
id: tachometer
@@ -26,103 +26,100 @@ Item {
onTachoValueChanged: {
limitTachoValue();
- effectRpm.angle = (0.03375 * tachoValue*Math.PI/180)+effectRpm.angleBase
+ effectRpm.angle = (0.03375 * tachoValue * Math.PI / 180) + effectRpm.angleBase;
}
- Connections{
+ Connections {
target: rootItem
- onTransNormalToAdas:{
- normalToAdasAnimation.start()
+ onTransNormalToAdas: {
+ normalToAdasAnimation.start();
}
}
- function limitTachoValue(){
- if(tachoValue > tachoValueMax){
- tachoValue = tachoValueMax
- }else if(tachoValue < tachoValueMin){
- tachoValue = tachoValueMin
+ function limitTachoValue() {
+ if (tachoValue > tachoValueMax) {
+ tachoValue = tachoValueMax;
+ } else if (tachoValue < tachoValueMin) {
+ tachoValue = tachoValueMin;
}
}
- Image{
- id:rpmGuage
+ Image {
+ id: rpmGuage
source: "qrc:/Images/NormalView/METER/prm_guage.ktx"
- x:770
- y:200
- width:380
- height:382
+ x: 770
+ y: 200
+ width: 380
+ height: 382
visible: false
}
- ShaderEffect{
+ ShaderEffect {
id: effectRpm
anchors.fill: rpmGuage
visible: true
blending: true
supportsAtlasTextures: true
- property real angleBase: -pi*3/4
- property real angle:-pi*3/4
- property var src: ShaderEffectSource{
+ property real angleBase: -pi * 3 / 4
+ property real angle: -pi * 3 / 4
+ property var src: ShaderEffectSource {
sourceItem: rpmGuage
live: false
}
-
readonly property real pi: 3.1415926535
- vertexShader: "qrc:/Shaders/vert/guageMask.vert"
- fragmentShader:"qrc:/Shaders/frag/guageMask.frag"
+ vertexShader: ShaderPath.guageMaskVert
+ fragmentShader: ShaderPath.guageMaskFrag
}
-
- Image{
- id:rpmTxt
+ Image {
+ id: rpmTxt
source: "qrc:/Images/NormalView/METER/prm_txt.png"
- x:770
- y:190
- width:379
- height:401
+ x: 770
+ y: 190
+ width: 379
+ height: 401
}
-
- SequentialAnimation{
- id:normalToAdasAnimation
- onStarted: rootItem.focus=false
- PropertyAnimation{
- target:tachometer
- property:"opacity"
+
+ SequentialAnimation {
+ id: normalToAdasAnimation
+ onStarted: rootItem.focus = false
+ PropertyAnimation {
+ target: tachometer
+ property: "opacity"
duration: 330
easing.type: Easing.Linear
- to:0
+ to: 0
}
- PropertyAnimation{
+ PropertyAnimation {
target: tachometer
property: "visible"
duration: 0
- to:false
+ to: false
}
}
-
- SequentialAnimation{
- id:mapToNormalAnimation
- onStarted: rootItem.focus=false
-
+
+ SequentialAnimation {
+ id: mapToNormalAnimation
+ onStarted: rootItem.focus = false
+
PauseAnimation {
duration: 891 + 330 + 254
}
-
- PropertyAnimation{
+
+ PropertyAnimation {
target: tachometer
property: "visible"
duration: 0
- to:true
+ to: true
}
-
- PropertyAnimation{
- target:tachometer
- property:"opacity"
+
+ PropertyAnimation {
+ target: tachometer
+ property: "opacity"
duration: 330
easing.type: Easing.Linear
- to:1
+ to: 1
}
}
-
}