forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 1
/
BARRA_VELOCIDADE.qml
56 lines (47 loc) · 1.46 KB
/
BARRA_VELOCIDADE.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import QtQuick 2.3
import QtGraphicalEffects 1.0
import QGroundControl 1.0
import QGroundControl.Controls 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Palette 1.0
Item {
property real airspeed
property real size
property real factor: 649/6480
property int aux: Math.round(airspeed)
property int barrasdim: (aux-aux%10)/10+3
id: papychulo
height:size
width: height/4
Item {
id: barraspeed
anchors.fill:parent
visible:false
Column {
Repeater {
model:barrasdim
Image {
id:imagem
width:papychulo.width
height:papychulo.height/3
source:"/qmlimages/BARRA_2.svg"
mipmap:true
transform:Translate {y: -airspeed*height*factor+1.5*height}
}
}
}
}
Rectangle {
id:mascara
anchors.fill:barraspeed
color:"black"
visible:true
radius:width/4
}
OpacityMask {
cached:true
anchors.fill:barraspeed
source: barraspeed
maskSource: mascara
}
}