summaryrefstree
path: root/usr/bin/qml_link/AppLink/App_Navi_SrchAroundRslt.qml
blob: 70ae6597bc7e287930a9836e34a36cef17d18315 (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
import QtQuick 2.0
import "../AppLink/Com/"
import "../eventsList.js" as EventsList
import "../layoutList.js" as Layout
import "../windowsList.js" as WindowsList
import "../AppLink/search.js" as Search
import Label 2.0
HMIWindow {

    id:app_SrchAroundRslt
    //windowImgSource:imagePath+"Common/M8X_Background.png"
    title: qsTr("结果列表") + applinkControl.qsEmptyString
    property bool btybe: false
    onVisibleChanged: {
        if(app_SrchAroundRslt.visible == true)
        {
            applinkControl.QML_SSPLink_iSetSrchKind(false)
            app_HMIListView_search_result.model=applinkControl.srchardListModel
            btybe = false
            iupdateing = applinkControl.QML_SSPLink_GetSrchADRsltMove()
        }
    }
    Component.onCompleted:
    {

    }
    onSignal_returnClick:{
        ScreenManager.backward(Layout.APPLINK)
    }
    property int iupdateing:0

    HMIListView {
        id: app_HMIListView_search_result
        x: 58
        y: 241-160
        width: 842
        height: 80*10
        snapMode:ListView.SnapToItem
        //model:xmldata_search_result
        //model:applinkControl.srchardListModel
        //currentIndex:
        delegate:Item{
            id:item_select_search_result
            width: 842
            height: 80
            HMIButton{
                btnImg:pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png"
                HMILabel{
                    x:84
                    y:10
                    width:510
                    height:30
                    text:col0
                    horizontalAlignment: Label.AlignLeft
                    elide:Label.ElideRight
                }
                HMILabel{
                    x:84
                    y:48
                    width:484
                    height:22
                    text:col4
                    horizontalAlignment: Label.AlignLeft
                    elide:Label.ElideRight
                    font.pixelSize:22
                    color:"#808080"
                }
                HMILabel{
                    x:652-40
                    y:23
                    width:128+40
                    height:32
                    text:col1
                    lablepixe:32
                    horizontalAlignment: Text.AlignRight
                }

                onClicked: {
                    app_HMIListView_search_result.currentIndex=index
                    applinkControl.QML_SetIndexOpenMapSec(index);
                    applinkControl.QML_getSrchArdRsltListInfo(index);
                    applinkControl.QML_NIF_Map_OpenMapByPointWithScale(2);
                    //applinkControl.QML_SSPLink_SetSrchADRsltMove(iupdateing)
                    ScreenManager.forward(Layout.APPLINK,WindowsList.APP_OPEN_MAP_SEC)
                }
                onPressed:{
                    app_HMIListView_search_result.interactive = true
                }

            }
        }
        onMovementEnded: {
            if(app_HMIListView_search_result.contentY==app_HMIListView_search_result.contentHeight-app_HMIListView_search_result.height)
            {
                ++iupdateing
                btybe = true
                applinkControl.QML_NIF_Poi_RequestPoiResult(iupdateing)
            }
        }

    }
    HMIListViewBar
    {
        id:listViewbar
        anchors.left: app_HMIListView_search_result.right
        anchors.leftMargin: 29
        anchors.top: app_HMIListView_search_result.top
        width: 10
        height: 80*10
        listView:app_HMIListView_search_result
        scrollBarX:780
        scrollBarY:59
        visible: app_HMIListView_search_result.count<10?false:true
        clip:true
    }

    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_NAVI_SRCHAROUNDRSLT)
        }
    }

    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"
    }

    Connections{
        target:applinkControl

        onSignal_updateStartIdx:{
            if(app_SrchAroundRslt.visible == true)
            {
                btybe = false
                iupdateing = iStartIdxnum
                //app_HMIListView_search_result.interactive=true
                //app_HMIListView_search_result.contentY=app_HMIListView_search_result.contentHeight-app_HMIListView_search_result.height
            }
        }

        onSearchPageEnd:{
            if(app_SrchAroundRslt.visible == true)
            {
                btybe = false
                //ScreenManager.backward(Layout.OVERLAY, WindowsList.APPLINK_MESSAGE_SEARCH_C,1)
                app_HMIListView_search_result.model=applinkControl.srchardListModel
                //app_HMIListView_search_result.contentY=applinkControl.QML_SSPLink_vSrch_Link_Fresh_currentindex()*70;
            }
        }
        onSearchEndNoResult:{
            if(app_SrchAroundRslt.visible == true)
            {
                //iupdateing=0
                //ScreenManager.backward(Layout.OVERLAY, WindowsList.APPLINK_MESSAGE_SEARCH_C,1)
            }
        }
    }
}