summaryrefstree
path: root/usr/bin/qml_link/AppLink/App_Navi_FunctionMain.qml
blob: e85295a7dee711b2790cef6cd5b1d6782b5cba39 (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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
import QtQuick 2.0
import "Com"
import "../eventsList.js" as EventsList
import "../layoutList.js" as Layout
import "../windowsList.js" as WindowsList
import "search.js" as Search
import Label 2.0

HMIWindow{

    id:app_FunctionMain
    //windowImgSource:imagePath+"Common/M8X_Background.png"

    property bool bIsHomeExist:false
    property int  iUsermarkCount:0
    property int  iMsgType:0    
    title: qsTr("功能") + applinkControl.qsEmptyString

    onSignal_returnClick:{
        ScreenManager.backward(Layout.APPLINK)
    }

    onVisibleChanged: {
        if(visible){
            bIsHomeExist = applinkControl.QML_NIF_Poi_IsHomeExist()
            iUsermarkCount = applinkControl.QML_NIF_Poi_GetUserMarkCount()
        }else{
            msg_PopUp.visible = false
            iMsgType = 0
            if(1 === applinkControl.QML_GetCusStatus()){ //calculating status
                applinkControl.QML_NIF_Cus_CancelRoute()
            }
        }
    }
    HMIButton{
        y: 1041-160
        btnIcon: imagePath+"Navi/common/M8X_icon_close.png"
        btnImg:pressed?imagePath+"Navi/common/M8X_Function_close_Button_p.png":imagePath+"Navi/common/M8X_Function_close_Button.png"
        onClicked:{
            applinkControl.QML_CloseAppLink()
            //ScreenManager.changeForm(Layout.FM_CLOSE,WindowsList.APP_FUNCTION_MAIN)
        }
    }

    //切换到大分类设施选择画页按钮
    HMIButton{
        id: allBtn
        x: 90
        y: 1041-160
        enabled: false
        btnImg:  imagePath+"M8X_Function_1_Button_NoSwitch.png"
        btnImgOnPressed:  imagePath+"M8X_Function_1_Button_NoSwitch_p.png"
    }

    HMIButton{
        id:list1
        x: 58
        y: 241-160
        btnImg: list1.pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png"

        HMILabel{
            id:list1text
            x:84
            width:30 * 13//722
            height:parent.height
            font.pixelSize:30
            horizontalAlignment: Label.AlignLeft            
            text: qsTr("设置") + applinkControl.qsEmptyString
        }
        onClicked: {
            ScreenManager.forward(Layout.APPLINK,WindowsList.APP_DISPLAY_SETTING)
        }
    }
    HMIButton{
        id:list2
        x:58
        y:list1.y+80
        //enabled:bIsHomeExist
        btnImg: list2.pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png"

        HMILabel{
            id:list2text
            x:84
            width:30 * 13//722
            height:parent.height
            font.pixelSize:30
            horizontalAlignment: Label.AlignLeft            
            text: qsTr("回家") + applinkControl.qsEmptyString
            //color:bIsHomeExist == true?"white":"grey"
        }

        onClicked: {
            if(bIsHomeExist == true){
                applinkControl.QML_NIF_Cus_DelVia(1)
                applinkControl.QML_NIF_Cus_DelVia(2)
                applinkControl.QML_NIF_Cus_DelVia(3)
                applinkControl.QML_NIF_Poi_GoHome()
                iMsgType = 1
                msg_PopUp.visible = true
            }else{
                applinkControl.QML_SSPLink_SetSearchType(3)
                applinkControl.QML_SSPLink_ToKeyCrossMain(Search.FromFunctionMain)
                ScreenManager.forward(Layout.APPLINK,WindowsList.APP_NAVI_SRCHKEYCROSSMAIN)
            }
        }
    }
    HMIButton{
        id:list3
        x:58
        y:list2.y+80
        btnImg: list3.pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png"

        HMILabel{
            id:list3text
            x:84
            width:30 * 13//722
            height:parent.height
            font.pixelSize:30
            horizontalAlignment: Label.AlignLeft            
            text: qsTr("兴趣点") + applinkControl.qsEmptyString
        }

        onClicked: {
            applinkControl.QML_NIF_Poi_GetMark()
        }
    }
    HMIButton{
        id:list4
        x:58
        y:list3.y + 80
        btnImg: list4.pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png"

        HMILabel{
            id:list4text
            x:84
            width:30 * 13//722
            height:parent.height
            font.pixelSize:30
            horizontalAlignment: Label.AlignLeft            
            text: qsTr("历史记录") + applinkControl.qsEmptyString
        }

        onClicked: {
            applinkControl.QML_NIF_Poi_GetHistoryDest()
        }
    }

    Connections{
        target:applinkControl
        onUserMarkEnd:{
            if (app_FunctionMain.visible){
                ScreenManager.forward(Layout.APPLINK,WindowsList.APP_NAVI_USERMARKLIST)
            }

        }
        onHistoryEnd:{
            if(app_FunctionMain.visible){
                ScreenManager.forward(Layout.APPLINK,WindowsList.APP_DEST_HISTROY)
            }
        }

        onSignal_CalcRouteFinish:{
            if(app_FunctionMain.visible){
                if(bIsFinish == true){
                    iMsgType = 0
                    msg_PopUp.visible = false
                    applinkControl.QML_NIF_Gid_StartGuide()
                    ScreenManager.backward(Layout.APPLINK,WindowsList.APP_LOCATION)
                    applinkControl.QML_NaviStart()
                }else{
                    iMsgType = 7
                    msg_PopUp.visible = true
                    msg_timer.restart()
                }
            }
        }
    }

    App_Com_Newspopup{
        id:msg_PopUp
        labelCount:1
        newspopText1: qsTr(applinkControl.QML_getMessageString(iMsgType)) + applinkControl.qsEmptyString
        bIsTouchClear:applinkControl.QML_getMessageTouchClearFlag(iMsgType)
    }
    Timer{
        id:msg_timer
        interval: applinkControl.QML_getMessageTime(iMsgType)
        onTriggered: {
            iMsgType = 0
            msg_PopUp.visible = false
        }
    }
}