summaryrefslogtreecommitdiff
path: root/SDL_Core/src/components/qt_hmi/References/Look/Views/FMPCA.qml
blob: 1e9a46a0b39db762cd7cb1c7da8b2cd016a1a081 (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
171
172
173
174
175
// import QtQuick 2.0 // to target S60 5th Edition or Maemo 5
import QtQuick 2.0
import com.ford.hmiframework 1.0
import "../Layouts"
import "../Animations"
import "../Widgets"
import ".."

FStateView {
    priority: 2
    attachedViews: ["PCAstatusBar"]
    property int currHD: 1
    property int totalHD: 4



    view: FView {
        id: v

        layout: FMLayoutPCA {
            id:home
            sourceBtn.text: "FM Radio"
            sourceBtn.textWidth: 100
            freqId: "FM"
            curHD: currHD
            totHD: totalHD
            curPreset: dataPool.currFMpreset

            listModel: FProxyListModel {
                id: menuProxy
                sourceModel: menuItemData
            }
        }


        FMenuModel {
            id: menuItemData
            FMenuElement { id: preset1; menuText: "96.3"; menuData: false; }
            FMenuElement { id: preset2; menuText: "107.9"; menuData: false }
            FMenuElement { id: preset3; menuText: "104.3"; menuData: false }
            FMenuElement { id: preset4; menuText: "101.9"; menuData: false }
            FMenuElement { id: preset5; menuText: "97.1";  menuData: false }
            FMenuElement { id: preset6; menuText: "91.7"; menuData: false  }
            FMenuElement { id: preset7; menuText: "101.1"; menuData: false  }
            FMenuElement { id: preset8; menuText: "91.9"; menuData: false}
        }
    }


    triggers: [

        FTrgCondition{ condition: home.moving === true
            FActScriptCall { onScript: home.page1=!home.page1 }
        },
        FTrgEntry{
            FGrdCondition{condition: dataPool.currFMpreset === 1
                FActScriptCall { onScript: home.stationTxt = "96.3" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 2
                FActScriptCall { onScript: home.stationTxt = "107.9" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 3
                FActScriptCall { onScript: home.stationTxt = "104.3" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 4
                FActScriptCall { onScript: home.stationTxt = "101.9" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 5
                FActScriptCall { onScript: home.stationTxt = "97.1" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 6
                FActScriptCall { onScript: home.stationTxt = "91.7" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 7
                FActScriptCall { onScript: home.stationTxt = "101.1" }
            }
            FGrdCondition{condition: dataPool.currFMpreset === 8
                FActScriptCall { onScript: home.stationTxt = "91.9" }
            }
        },
        FTrgTouchArea { touchArea:home.sourceBtn.touchBtn; touchAction: TA.Out
            FActViewShow { view: "SourceChangePCA" }
        },
        FTrgTouchArea { touchArea:home.hdBtn.touchBtn; touchAction: TA.Out
            FGrdCondition { condition: currHD === totalHD
                FActScriptCall { onScript: currHD = 1 }
            }
            FGrdCondition { condition: currHD !== totalHD
                FActScriptCall { onScript: currHD ++}
            }
        },
        FTrgMenuElement { menuElement: preset1
            FActScriptCall { onScript: home.stationTxt = "96.3" }
            FActScriptCall { onScript: dataPool.currFMpreset = 1 }
        },
        FTrgMenuElement { menuElement: preset2
            FActScriptCall { onScript: home.stationTxt = "107.9" }
            FActScriptCall { onScript: dataPool.currFMpreset = 2 }
        },
        FTrgMenuElement { menuElement: preset3
            FActScriptCall { onScript: home.stationTxt = "104.3" }
            FActScriptCall { onScript: dataPool.currFMpreset = 3 }
        },
        FTrgMenuElement { menuElement: preset4
            FActScriptCall { onScript: home.stationTxt = "101.9" }
            FActScriptCall { onScript: dataPool.currFMpreset = 4 }
        },
        FTrgMenuElement { menuElement: preset5
            FActScriptCall { onScript: home.stationTxt = "97.1" }
            FActScriptCall { onScript: dataPool.currFMpreset = 5 }
        },
        FTrgMenuElement { menuElement: preset6
            FActScriptCall { onScript: home.stationTxt = "91.7" }
            FActScriptCall { onScript: dataPool.currFMpreset = 6 }
        },
        FTrgMenuElement { menuElement: preset7
            FActScriptCall { onScript: home.stationTxt = "101.1" }
            FActScriptCall { onScript: dataPool.currFMpreset = 7 }
        },
        FTrgMenuElement { menuElement: preset8
            FActScriptCall { onScript: home.stationTxt = "91.9" }
            FActScriptCall { onScript: dataPool.currFMpreset = 8 }
        },
        FTrgListModel { id: trgList; model: menuItemData
            FActScriptCall { onScript: { FLogger.debug("Test", trgList.element.menuText + ", index: " + trgList.index) } }
        },
        /*FTrgTouchArea { touchArea:home.browseBtn; touchAction: TA.Out
            FActViewShow { view: "Start" }
        },
        FTrgTouchArea { touchArea:home.albumInfoBtn; touchAction: TA.Out
            FActViewShow { view: "Start" }
        },
        FTrgTouchArea { touchArea:home.preset1Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre1 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat1}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song1 }
        },
        FTrgTouchArea { touchArea:home.preset2Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre2 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat2}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song2 }
        },
        FTrgTouchArea { touchArea:home.preset3Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre3 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat3}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song3 }
        },
        FTrgTouchArea { touchArea:home.preset4Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre4 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat4}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song4 }
        },
        FTrgTouchArea { touchArea:home.preset5Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre5 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat5}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song5 }
        },
        FTrgTouchArea { touchArea:home.preset6Btn; touchAction: TA.Out
            FActScriptCall { onScript: dataPool.currStation = dataPool.fm1pre6 }
            FActScriptCall { onScript:dataPool.currStatText = dataPool.fm1stat6}
            FActScriptCall {  onScript:dataPool.currSong=dataPool.fm1song6 }
        },
        FTrgTouchArea { touchArea:home.replayBtn; touchAction: TA.Out
            FActViewShow { view: "Start" }
        },

        FTrgTouchArea { touchArea:home.presetsBtn; touchAction: TA.Out
            FActViewShow { view: "Start" }
        },*/
        FTrgEvent { event: closeNormalScreens
            FActViewHide{}
        }

    ]
}