-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEvaluation.qml
42 lines (35 loc) · 1.48 KB
/
Evaluation.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import QtQuick 2.0
import QtQuick.Controls.Material 2.2
ColumnLabel{
property int changes: 0
text:enginemate==""?Math.round(enginescore/10)/10.0:"#"+enginemate
color: if(enginemate != ""){
return "yellow"
}else{
if(enginescore>0){
return "#adf442"
}else if(enginescore == 0){
return "#70d6ff"
}else{
return "#ff3923"
}
}
Timer{
id:opacityTimer
interval: 4000
running: false
repeat: false
onTriggered: matchRowBack.border.color = "transparent"
}
onTextChanged:{
if(changes>=1){
matchRowBack.border.color = Material.color(Material.Amber)
opacityTimer.restart();
if(Math.abs(enginescore-previousenginescore)/100.0>0.5){
playMusic.play();
}
}else{
changes = 1;
}
}
}