summaryrefstree
path: root/usr/bin/qml_link/AppLink/App_Navi_Warning.qml
blob: 977799e1bd603f44a1e2f417a76b264473454f37 (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
import QtQuick 2.0
import "../AppLink/Com"
import "../windowsList.js" as WindowsList
import "../layoutList.js" as Layout
Image{
    id: warning
    x: 0
    y: 0
    width: 960
    height: 960
    property string imagePath: "/usr/bin/qml_link/images/AppLink/"
    //property string imagePath: "/var/navi/App/bin/qml_navi/images/"  /* For PC test*/
    source: systemCtrlLink.getBackGroundType()

    onVisibleChanged:{
        if(visible){
            applinkControl.QML_NotifyAppLinkDisplayOK()
            applinkControl.QML_NotifyFlickForbidFlag(1)
        }
    }

    HMILabel
    {
        id:title
        x:228
        y:259-160
        text:qsTr("注意事项") + applinkControl.qsEmptyString
        width:504
        height:36+4
        font.pixelSize: 36
        verticalAlignment: Text.AlignTop
    }

    ListModel {
        id: stringModelCn
        ListElement{col0: "尊敬的用户:"}
        ListElement{col0: "在使用本导航系统前请详细阅读操作手册。请特别"}
        ListElement{col0: "留意如下事项:"}
        ListElement{col0: "1.驾驶者在行驶过程中看此屏幕,可能会导致严重"}
        ListElement{col0: "的交通事故。故为了避免事故的发生,请在停车后"}
        ListElement{col0: "进行操作。"}
        ListElement{col0: "2.本导航系统所配置导航地图及导航提示有可能和"}
        ListElement{col0: "实际路况有所区别,故仅作参考之用,请在遵守交"}
        ListElement{col0: "通规则的前提下使用该系统。"}
        ListElement{col0: "3.本公司不对因使用该系统导致的交通事故进行负"}
        ListElement{col0: "责。"}
    }
    ListModel {
        id: stringModelEn
        ListElement{col0: "Dear users,"}
        ListElement{col0: "Please read the operation manual carefully before using"}
        ListElement{col0: "navigation system."}
        ListElement{col0: "Please pay attention to the following matters:"}
        ListElement{col0: "1. If drivers see the screen in the driving for seconds, it"}
        ListElement{col0: "may cause serious traffic accident. So in order to avoid"}
        ListElement{col0: "accidents, please operate it when park."}
        ListElement{col0: "2. The navigation map could be different from the Real-"}
        ListElement{col0: "time traffic condition. So, it’s only for reference. For"}
        ListElement{col0: "safety, please do not violate traffic rules."}
        ListElement{col0: "3. The company will not take any responsibility for any "}
        ListElement{col0: "traffic accident because of the navigation system."}
    }

    HMIListView{
        id:stringlist
        x:142
        y:345-160
        width:818
        height:616
        model:applinkControl.getLanguageType()==true?stringModelCn:stringModelEn
        snapMode: ListView.NoSnap
        boundsBehavior: Flickable.StopAtBounds
        delegate:stringDelegate
        currentIndex: -1
        spacing:22-4
    }
    Component{
        id: stringDelegate
        HMILabel{
            id:name
            width:818
            height:30+4
            horizontalAlignment: Text.AlignLeft
            verticalAlignment: Text.AlignTop
            font.pixelSize: 30
            text: col0
        }
    }


    HMIButton{
        id: agree
        x: 387
        y: 961-160
        btnImgOnPressed:  imagePath +"Common/M8X_Popup_Button_p.png"
        btnImg:  imagePath+"Common/M8X_Popup_Button.png"
        onClicked:{
            applinkControl.QML_SetSppLinkWarningStatus();
            ScreenManager.replace(Layout.APPLINK,WindowsList.APP_LOCATION);
        }
    }
    HMILabel
    {
        x:408
        y:982-160
        text:qsTr("确定") + applinkControl.qsEmptyString
        width:144
        height:36
        font.pixelSize: 36
    }

    HMIWindowLine{

    }
    Connections{
        target:applinkControl
        onSignalLanguageChanged:{
            if(visible){
                stringlist.model=(applinkControl.getLanguageType()?stringModelCn:stringModelEn)
            }
        }
        onSignalChangeBackground:{
            warning.source = qstrPath
        }
        onSignalLinkAppVisibleStatus:{
            if(visible && (1 === iShowStatus)){
                warning.source = systemCtrlLink.getBackGroundType()
            }
        }
    }
}