summaryrefslogtreecommitdiff
path: root/src/components/qt_hmi/References/Work/bananasnacks/qml/Bananas/Sections/home_corners.qml
blob: 432e978b87796d1bf5c3252271153379ee229791 (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
import QtQuick 2.0
import com.ford.phonecore 1.0
import "../Components"
import "../Layouts"

Item {

    Image {
        source: "../Assets/Crosshairs.png"
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.verticalCenter: parent.verticalCenter
    }

    Item {
        width: parent.width / 2
        height: parent.height / 2

        Image {
            id: phone_corner_icon
            visible: (PhoneCore.device_state === "connected")
            source: "../Assets/PhoneIcons.png"
            anchors.top: parent.top
            anchors.topMargin: 80
            anchors.horizontalCenter: parent.horizontalCenter
        }

        OverflowableText {
            id: phone_name
            text: PhoneCore.device_name
            anchors.top: phone_corner_icon.bottom
            anchors.horizontalCenter: parent.horizontalCenter
            textAlign: 'center'
            anchors.topMargin: 10
            width: 350
            fontColor: (PhoneCore.device_state === "connected") ? "#ffffff" : "#333"
            font.pixelSize: 24
        }

        Text {
            text: "Connecting..."
            anchors.top: phone_name.bottom
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.topMargin: 10
            color: "#333"
            visible: (PhoneCore.device_state === "connecting")
            font.pixelSize: 24
        }

        CheckButton {
            text: "Do Not Disturb"
            visible: (PhoneCore.device_state === "connected")
            anchors.top: phone_name.bottom
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.topMargin: 10
        }



        Row {
            anchors.top: phone_name.bottom
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.topMargin: 10
            visible: (PhoneCore.device_state === "disconnected")
            spacing: 10

            Button {
                text: "Connect"
                onPress: {
                    PhoneCore.initializeDevice()
                }
            }

            Button {
                text: "Manage Phones"
                onPress: {
                    go("phone");
                }
            }
        }

    }

    Item {
        width: parent.width / 2
        height: parent.height / 2
        anchors.right: parent.right
    }

    Item {
        width: parent.width / 2
        height: parent.height / 2
        anchors.right: parent.right
        anchors.bottom: parent.bottom

        Image {
            source: "../Assets/VehicleCornerIcon.png"
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }

    Item {
        width: parent.width / 2
        height: parent.height / 2
        anchors.bottom: parent.bottom

        Image {
            id: media_corner_icon
            source: "../Assets/UsbIcon.png"
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: parent.top
            anchors.topMargin: 40
        }

        Text {
            id: media_artist
            text: ""
            font.pixelSize: 18
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: media_corner_icon.bottom
            color: "#ffffff"
            anchors.topMargin: 10
        }

        Text {
            id: media_title
            text: ""
            font.pixelSize: 24
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.top: media_artist.bottom
            color: "#ffffff"
        }
    }
}