2 * Copyright (C) 2016 The Qt Company Ltd.
3 * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
4 * Copyright (c) 2017, 2018 TOYOTA MOTOR CORPORATION
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 import QtQuick.Layouts 1.1
28 property date now: new Date
30 interval: 100; running: true; repeat: true;
31 onTriggered: root.now = new Date
40 if (condition.indexOf("clouds") != -1) {
41 icon = "WeatherIcons_Cloudy-01.png"
42 } else if (condition.indexOf("thunderstorm") != -1) {
43 icon = "WeatherIcons_Thunderstorm-01.png"
44 } else if (condition.indexOf("snow") != -1) {
45 icon = "WeatherIcons_Snow-01.png"
46 } else if (condition.indexOf("rain") != -1) {
47 icon = "WeatherIcons_Rain-01.png"
50 condition_item.source = icon ? './images/Weather/' + icon : ''
53 onTemperatureChanged: {
54 temperature_item.text = temperature.split(".")[0] + '°F'
62 Layout.fillWidth: true
63 Layout.fillHeight: true
64 Layout.preferredWidth: 295 - 76
70 Layout.fillWidth: true
71 Layout.fillHeight: true
72 text: Qt.formatDate(now, 'dddd').toUpperCase()
76 verticalAlignment: Text.AlignVCenter
78 // anchors.fill: parent
81 // border.color: 'blue'
87 Layout.fillWidth: true
88 Layout.fillHeight: true
89 text: Qt.formatTime(now, 'h:mm ap').toUpperCase()
93 horizontalAlignment: Text.AlignHCenter
94 verticalAlignment: Text.AlignVCenter
97 Layout.fillWidth: true
98 Layout.fillHeight: true
99 Layout.preferredHeight: 20
102 source: './images/Weather/WeatherIcons_Rain-01.png'
108 font.family: 'Helvetica'
115 homescreenHandler.killRunningApplications()
122 Layout.fillWidth: true
123 Layout.fillHeight: true
124 Layout.preferredWidth: 76
127 Layout.preferredWidth: 77
128 Layout.preferredHeight: 55
134 Layout.preferredWidth: 77
135 Layout.preferredHeight: 55
136 source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png'
137 fillMode: Image.PreserveAspectFit
138 property string deviceName: "none"
139 property bool connStatus: false
144 bt_icon.connStatus = state
149 model: StatusBarModel { objectName: "statusBar" }
151 Layout.preferredWidth: 77
152 Layout.preferredHeight: 55
153 source: model.modelData
154 fillMode: Image.PreserveAspectFit