blob: db963dc752efffe1a4b78e3a66fddc6e7add232d (
plain)
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
import QtQuick 2.0
import com.ford.hmiframework 1.0
import "../Widgets"
FLayout {
id: button
property string text: ""
property int centerWidth: 2
property alias touchBtn: myButton
property alias pressed: myButton.pressed
FWdgtImage{
id: img
x:-8
y:-8
bitmap: "Radio/ButtonEnd_8_8.png"
}
FWdgtImage{
id: img1
anchors.left: img.right
anchors.top: img.top
width: centerWidth
fillMode: Image.Stretch
bitmap: "Radio/ButtonCenter_0_8.png"
}
FWdgtImage{
id: img2
anchors.left: img1.right
anchors.top: img1.top
bitmap: "Radio/ButtonOtherEnd_8_8.png"
}
FWdgtTouchArea {
id: myButton
width:img1.width+44
height: 46
anchors.left: img1.left
anchors.leftMargin: -22
anchors.top: img1.top
anchors.topMargin: 8
}
Rectangle {
id: btnFill
color: "#1d81d5"
anchors.fill: myButton
radius: 23
border.width: 1
border.color: "#1d81d5"
visible: false
}
BaseText {
id: btnTxt
anchors.centerIn: btnFill
text: button.text
color: "#1d81d5"
visible: false
}
FViewUseCaseSimple{
condition: button.text !== ""
PropertyChanges {
target: btnTxt; visible: true
}
}
FViewUseCaseGroup{
FViewUseCase{condition: myButton.pressed === true
PropertyChanges {
target: btnFill; visible: true
}
PropertyChanges {
target: btnTxt; color: "black"
}
}
FViewUseCase{condition: indicatorState === true
/* PropertyChanges {
target: buttonArea; color: pressedColor
}*/
}
FViewUseCase{condition: myButton.pressed === false
PropertyChanges {
target: btnFill; visible: false
}
}
}
}
|