blob: ab48a848f50a27b96e1778150b8b519bbcbb6062 (
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
import QtQuick 2.0
import "../com/neusoft/auto/widgets"
import "../windowsList.js" as WindowsList
import "ipod_define.js" as StatusList
import "../layoutList.js" as Layout
Rectangle
{
id:ipodSearchAndPlayMode
HMIButton
{
id:search_button
x: 0
y: 0
width: 106
height: 56
btnImg:search_button.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle
Image
{
id: search_button_icon
anchors.verticalCenter: search_button.verticalCenter
anchors.horizontalCenter: search_button.horizontalCenter
source: "qrc:MATERIAL/MATERIAL_M8X_ICON_FOLDER"+bgImageStyle
}
onClicked:
{
if((StatusList.DEVICE_IPOD_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())&&(ipod_scanState ==StatusList.HMI_IPOD_SCAN_FINISH))
{
ScreenManager.changeForm(Layout.FM_OPEN_EXTEND_SELF,WindowsList.IPOD_SEARCH)
}
else
{
}
}
}
HMIButton
{
id:playmode_button_shuffle
anchors.top: search_button.top
anchors.left: search_button.right
anchors.leftMargin: -2
width: 106
height: 56
visible:(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())?true:(((ipod_which_apply == 1 )||(ipod_which_apply == 2 )||(ipod_third_apply == 1))?false:true)
btnImg:playmode_button_shuffle.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL)?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_C"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle
Image
{
id: playmode_button_shuffle_icon
anchors.verticalCenter: playmode_button_shuffle.verticalCenter
anchors.horizontalCenter: playmode_button_shuffle.horizontalCenter
source:"qrc:MATERIAL/MATERIAL_M8X_ICON_SHUFFLE"+bgImageStyle
}
onClicked:
{
//ipodCtrl.ipod_random_repeat_ModeClick();
if(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL)
{
ipodCtrl.ipod_randomModeClick(StatusList.IPOD_RANDOM_OFF)
}
else
{
ipodCtrl.ipod_randomModeClick(StatusList.IPOD_RANDOM_ALL)
}
}
}
HMIButton
{
id:playmode_button_repeat
anchors.top: search_button.top
anchors.left: playmode_button_shuffle.right
anchors.leftMargin: -2
width: 106
height: 56
visible:(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())?true:(((ipod_which_apply == 1 )||(ipod_which_apply == 2 )||(ipod_third_apply == 1))?false:true)
btnImg:playmode_button_repeat.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle
Image
{
id: playmode_button_repeat_icon
anchors.verticalCenter: playmode_button_repeat.verticalCenter
anchors.horizontalCenter: playmode_button_repeat.horizontalCenter
source:(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE)? "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-ONE"+bgImageStyle:
(ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL)?"qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-LIST"+bgImageStyle:
"qrc:MATERIAL/MATERIAL_M8X_ICON_ORDER"+bgImageStyle
}
onClicked:
{
// ipodCtrl.ipod_random_repeat_ModeClick();
if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL)
{
ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_ONE)
}
else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_OFF)
{
ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_ALL)
}
else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE)
{
ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_OFF)
}
}
}
Connections
{
target:ipodCtrl
onIpod_shuffel_Changed:
{
ipod_shuffelStatus = ipodCtrl.ipod_shuffel_status
if(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL)
{
playmode_button_shuffle.btnImg = "qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_C"+bgImageStyle
}
else
{
playmode_button_shuffle.btnImg = "qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle
}
}
onIpod_repeat_Changed:
{
ipod_repeatStatus = ipodCtrl.ipod_repeat_status
if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL)
{
playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-LIST"+bgImageStyle
}
else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_OFF)
{
playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_ORDER"+bgImageStyle
}
else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE)
{
playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-ONE"+bgImageStyle
}
}
onIpod_apply_changed:
{
if((ipod_which_apply ==1 )||(ipod_which_apply ==2 )||(ipod_third_apply == 1))
{
playmode_button_shuffle.visible = false
playmode_button_repeat.visible = false
}
else
{
playmode_button_shuffle.visible = true
playmode_button_repeat.visible = true
}
}
onIpod_disconnect:
{
if(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())
{
playmode_button_shuffle.visible = true
playmode_button_repeat.visible = true
}
}
}
}
|