2 * Copyright (C) 2016 The Qt Company Ltd.
3 * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
19 import QtQuick.Layouts 1.1
20 import QtQuick.Controls 1.0
27 function languageChanged(lang) {
29 labelTime.text = Qt.formatTime(now, 'HH:mm').toUpperCase()
30 labelTemperature.text = '18°C'
31 switch(now.getDay()) {
33 labelDay.text = 'LUNDI'
36 labelDay.text = 'MARDI'
39 labelDay.text = 'MERCREDI'
42 labelDay.text = 'JEUDI'
45 labelDay.text = 'VENDREDI'
48 labelDay.text = 'SAMEDI'
51 labelDay.text = 'DIMANCHE'
56 labelTime.text = Qt.formatTime(now, 'h:mm ap').toUpperCase()
57 labelTemperature.text = '64°F'
58 switch(now.getDay()) {
60 labelDay.text = 'MONDAY'
63 labelDay.text = 'TUESDAY'
66 labelDay.text = 'WEDNESDAY'
69 labelDay.text = 'THURSDAY'
72 labelDay.text = 'FRIDAY'
75 labelDay.text = 'SATURDAY'
78 labelDay.text = 'SUNDAY'
84 property date now: new Date
86 interval: 100; running: true; repeat: true;
87 onTriggered: root.now = new Date
94 Layout.fillWidth: true
95 Layout.fillHeight: true
96 Layout.preferredWidth: 295 - 76
103 Layout.fillWidth: true
104 Layout.fillHeight: true
105 text: Qt.formatDate(now, 'dddd').toUpperCase()
106 font.family: 'Roboto'
107 // font.pixelSize: 13
110 verticalAlignment: Text.AlignVCenter
112 // anchors.fill: parent
113 // anchors.margins: 5
115 // border.color: 'blue'
122 Layout.fillWidth: true
123 Layout.fillHeight: true
124 text: Qt.formatTime(now, 'h:mm ap').toUpperCase()
125 font.family: 'Roboto'
128 horizontalAlignment: Text.AlignHCenter
129 verticalAlignment: Text.AlignVCenter
132 Layout.fillWidth: true
133 Layout.fillHeight: true
134 Layout.preferredHeight: 20
136 source: './images/Weather/WeatherIcons_Rain-01.png'
142 font.family: 'Helvetica'
147 Component.onCompleted: root.languageChanged("en")
151 Layout.fillWidth: true
152 Layout.fillHeight: true
153 Layout.preferredWidth: 76
156 model: StatusBarModel {}
158 Layout.preferredWidth: 77
159 Layout.preferredHeight: 73
160 source: model.modelData
161 fillMode: Image.PreserveAspectFit