summaryrefstree
path: root/usr/bin/qml_link/AppLink/Com/HMIWindow.qml
blob: 99d62a966f621f9fee2975deece676a9f648db91 (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
/*
*   Copyright (C) 2013 by Neusoft
*   Author : Jia Zhao <zhao-jia@neusoft.com>
*
*/
import QtQuick 2.0
import "../../layoutList.js" as Layout
import Label 2.0
/**
 * A window which size is 1024*600 .
 * contains background image and MouseArea
 */
Rectangle {
    id: window
    /**
     * type:string
     *
     * This property holds the source url for the window's background image.
     * It can be any image from any protocol supported by the Image element
     *
     * The default value is an empty url, which displays no background image.
     */
    property alias windowImgSource: windowImg.source
    property string title : ""
    property bool bWithTitle: true
    property bool bShowPlayBtn: false
    signal signal_returnClick()
    signal signal_playClick()
    x: 0
    y: 0

    width: 960
    height: 960
    color: "#202020"
    property string imagePath: "/usr/bin/qml_link/images/AppLink/"  /* Just a temp setting. change later for runtime skin change. songsz */
    property int windowID: -1
    Image {
        id: windowImg
        anchors.fill: parent
        source:systemCtrlLink.getBackGroundType()
    }

    HMIButton{
        id: returnButton
        anchors.left: parent.left
        anchors.leftMargin: 0
        anchors.top: parent.top
        anchors.topMargin: 5
        btnImg: imagePath + "M8X_Back_Button.png"
        btnImgOnPressed:imagePath + "M8X_Back_Button_p.png"
        onClicked:{
            signal_returnClick()
        }
        Image{
            id:returnIcon
            anchors.verticalCenter: parent.verticalCenter
            anchors.left: parent.left
            anchors.leftMargin: 20
            source: imagePath + "M8X_icon_Back.png"
        }
        HMILabel{
            id:returnText
            anchors.verticalCenter: parent.verticalCenter
            anchors.left: parent.left
            anchors.leftMargin: 54
            font.pixelSize:30
            width:75
            height:parent.height
            text:qsTr("返回") + applinkControl.qsEmptyString
        }
    }

    HMIButton{
        id: playButton
        anchors.right: parent.right
        anchors.rightMargin: 0
        anchors.top: parent.top
        anchors.topMargin: 4
        btnImg: imagePath + "M8X_Back_Button.png"
        btnImgOnPressed:imagePath + "M8X_Back_Button_p.png"
        visible:bShowPlayBtn
        onClicked:{
             if(2 != applinkControl.QML_GetSourceCtrlType()){
                 signal_playClick()
             }
        }
        App_LoadingHimalayan{
            id:playIcon
            loadingPath: imagePath+"Type_O_Himalayan/O_01_Himalayan/"
            surname: "M8X_icon_Himalayan_piay_0"
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }

    HMILabel{
        id: titleText
        visible: bWithTitle
        x:240
        y:185-160
        width: 480
        height:30+4
        font.pixelSize: 30
        text: title
        verticalAlignment: Text.AlignTop
    }

    HMIWindowLine{
       z:1
    }

    /**
     * Undetermined......
     *
     */
    MouseArea{
        id: window_mousearea
        z: -1
        anchors.fill: parent
    }
    Connections{
        target:applinkControl
        onSignalChangeBackground:{
            windowImg.source = qstrPath
        }
        onSignalLinkAppVisibleStatus:{
            if(visible && (1 === iShowStatus)){
                windowImg.source = systemCtrlLink.getBackGroundType()
            }
        }
    }
}