From 721d5206c84e5d5b9572fa65be7e17b1eabffe1e Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Tue, 13 Nov 2018 09:50:02 +0900 Subject: Add homescreen for horizontal mode Add homescreen source for horizontal mode. [PatchSet3] Change folder name to demo3. Change-Id: If134d9c679ed8ceb76fae06ed179f55fe8e79130 Signed-off-by: zheng_wenlong --- .../homescreen/homescreen/qml/IconItem.qml | 104 ++++++++++ .../homescreen/homescreen/qml/ShortcutArea.qml | 128 ++++++++++++ .../homescreen/homescreen/qml/ShortcutIcon.qml | 74 +++++++ .../homescreen/homescreen/qml/StatusArea.qml | 214 +++++++++++++++++++++ .../homescreen/homescreen/qml/TopArea.qml | 36 ++++ .../homescreen/qml/images/Shortcut/launcher.png | Bin 0 -> 3594 bytes .../qml/images/Shortcut/launcher_active.png | Bin 0 -> 14471 bytes .../homescreen/qml/images/Shortcut/mediaplayer.png | Bin 0 -> 5333 bytes .../qml/images/Shortcut/mediaplayer_active.png | Bin 0 -> 15996 bytes .../homescreen/qml/images/Shortcut/music.svg | 111 +++++++++++ .../homescreen/qml/images/Shortcut/navigation.png | Bin 0 -> 5544 bytes .../homescreen/qml/images/Shortcut/navigation.svg | 183 ++++++++++++++++++ .../qml/images/Shortcut/navigation_active.png | Bin 0 -> 17333 bytes .../homescreen/qml/images/Shortcut/phone.png | Bin 0 -> 5517 bytes .../qml/images/Shortcut/phone_active.png | Bin 0 -> 16965 bytes .../homescreen/qml/images/Shortcut/settings.png | Bin 0 -> 7088 bytes .../qml/images/Shortcut/settings_active.png | Bin 0 -> 19811 bytes .../homescreen/qml/images/Shortcut/shortcut.qrc | 16 ++ .../Status/HMI_Status_Bluetooth_Inactive-01.png | Bin 0 -> 1170 bytes .../images/Status/HMI_Status_Bluetooth_On-01.png | Bin 0 -> 922 bytes .../images/Status/HMI_Status_Signal_1Bars-01.png | Bin 0 -> 570 bytes .../images/Status/HMI_Status_Signal_2Bars-01.png | Bin 0 -> 564 bytes .../images/Status/HMI_Status_Signal_3Bars-01.png | Bin 0 -> 560 bytes .../images/Status/HMI_Status_Signal_4Bars-01.png | Bin 0 -> 552 bytes .../images/Status/HMI_Status_Signal_Full-01.png | Bin 0 -> 544 bytes .../images/Status/HMI_Status_Signal_NoBars-01.png | Bin 0 -> 575 bytes .../qml/images/Status/HMI_Status_Wifi_1Bar-01.png | Bin 0 -> 1245 bytes .../qml/images/Status/HMI_Status_Wifi_2Bars-01.png | Bin 0 -> 1198 bytes .../qml/images/Status/HMI_Status_Wifi_3Bars-01.png | Bin 0 -> 1120 bytes .../qml/images/Status/HMI_Status_Wifi_Full-01.png | Bin 0 -> 995 bytes .../images/Status/HMI_Status_Wifi_NoBars-01.png | Bin 0 -> 1278 bytes .../homescreen/qml/images/Status/status.qrc | 17 ++ .../qml/images/Weather/WeatherIcons_ALL-01.png | Bin 0 -> 1320 bytes .../qml/images/Weather/WeatherIcons_Cloudy-01.png | Bin 0 -> 715 bytes .../qml/images/Weather/WeatherIcons_Moon-01.png | Bin 0 -> 749 bytes .../Weather/WeatherIcons_PartiallyCloudy-01.png | Bin 0 -> 900 bytes .../qml/images/Weather/WeatherIcons_Rain-01.png | Bin 0 -> 870 bytes .../qml/images/Weather/WeatherIcons_Snow-01.png | Bin 0 -> 840 bytes .../qml/images/Weather/WeatherIcons_Sun-01.png | Bin 0 -> 807 bytes .../Weather/WeatherIcons_Thunderstorm-01.png | Bin 0 -> 886 bytes .../homescreen/qml/images/Weather/weather.qrc | 12 ++ .../homescreen/qml/images/fullscreen.png | Bin 0 -> 1633 bytes .../homescreen/homescreen/qml/images/images.qrc | 9 + .../homescreen/qml/images/menubar_background.png | Bin 0 -> 69012 bytes .../qml/images/menubar_full_background.png | Bin 0 -> 5692 bytes .../qml/images/menubar_normal_background.png | Bin 0 -> 68924 bytes .../homescreen/homescreen/qml/images/normal.png | Bin 0 -> 1626 bytes .../horizontal/homescreen/homescreen/qml/main.qml | 171 ++++++++++++++++ demo3/horizontal/homescreen/homescreen/qml/qml.qrc | 10 + 49 files changed, 1085 insertions(+) create mode 100644 demo3/horizontal/homescreen/homescreen/qml/IconItem.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/ShortcutArea.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/ShortcutIcon.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/StatusArea.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/TopArea.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher_active.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer_active.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/music.svg create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.svg create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation_active.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone_active.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings_active.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/shortcut.qrc create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_On-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_1Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_2Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_3Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_4Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_Full-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_NoBars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_1Bar-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_2Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_3Bars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_Full-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_NoBars-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Status/status.qrc create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_ALL-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Cloudy-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Moon-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Rain-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Snow-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Sun-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Thunderstorm-01.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/Weather/weather.qrc create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/fullscreen.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/images.qrc create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/menubar_background.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/menubar_full_background.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/menubar_normal_background.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/images/normal.png create mode 100644 demo3/horizontal/homescreen/homescreen/qml/main.qml create mode 100644 demo3/horizontal/homescreen/homescreen/qml/qml.qrc (limited to 'demo3/horizontal/homescreen/homescreen/qml') diff --git a/demo3/horizontal/homescreen/homescreen/qml/IconItem.qml b/demo3/horizontal/homescreen/homescreen/qml/IconItem.qml new file mode 100644 index 0000000..a5c032e --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/IconItem.qml @@ -0,0 +1,104 @@ +import QtQuick 2.0 +import QtQuick.Controls 2.0 +import QtGraphicalEffects 1.0 + +Item { + id: main + width: 320 + height: 320 + property string icon: model.icon + + Item { + id: container + parent: loc + x: main.x + y: main.y + width: main.width + height: main.height + + Image { + id: item + anchors.top: parent.top + anchors.topMargin: 20 + anchors.horizontalCenter: parent.horizontalCenter + width: 220 + height: width + source: './images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive') + antialiasing: item.state !== '' + + property string initial: model.name.substring(0,1).toUpperCase() + + Item { + id: title + width: 125 + height: 125 + anchors.centerIn: parent + Repeater { + delegate: Label { + style: Text.Outline + styleColor: 'red' + color: 'transparent' + font.pixelSize: 125 + anchors.centerIn: parent + anchors.horizontalCenterOffset: model.index / 3 - 1 + anchors.verticalCenterOffset: model.index % 3 - 1 + text: item.initial + } + model: main.icon === 'blank' ? 9 : 0 + } + layer.enabled: true + layer.effect: LinearGradient { + gradient: Gradient { + GradientStop { position: -0.5; color: "#6BFBFF" } + GradientStop { position: +1.5; color: "#00ADDC" } + } + } + } + } + Label { + id: name + anchors.top: item.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 20 + font.pixelSize: 25 + font.letterSpacing: 5 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + color: "white" + text: qsTr(model.name.toUpperCase()) + } + + Behavior on x { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } + Behavior on y { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } + SequentialAnimation on rotation { + NumberAnimation { to: 5; duration: 100 } + NumberAnimation { to: -5; duration: 200 } + NumberAnimation { to: 0; duration: 100 } + running: loc.currentId !== '' && item.state !== 'active' + loops: Animation.Infinite; alwaysRunToEnd: true + } + states: [ + State { + name: 'active' + when: loc.currentId == model.id + PropertyChanges { + target: container + x: loc.mouseX - width/2 + y: loc.mouseY - height/2 + scale: 1.15 + z: 10 + } + }, + State { + when: loc.currentId !== '' + PropertyChanges { + target: container + scale: 0.85 + opacity: 0.75 + } + } + ] + transitions: Transition { NumberAnimation { properties: 'scale, opacity, x, y'; duration: 150; easing.type: Easing.OutCubic} } + } +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/ShortcutArea.qml b/demo3/horizontal/homescreen/homescreen/qml/ShortcutArea.qml new file mode 100644 index 0000000..b33df22 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/ShortcutArea.qml @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Layouts 1.1 + +Item { + id: root + width: 700 + height: 110 + + Timer { + id:informationTimer + interval: 3000 + running: false + repeat: true + onTriggered: { + bottomInformation.visible = false + } + } + + + ListModel { + id: applicationModel + ListElement { + name: 'launcher' + application: 'launcher@0.1' + } + ListElement { + name: 'MediaPlayer' + application: 'mediaplayer@0.1' + } + ListElement { + name: 'navigation' + application: 'navigation@0.1' + } + ListElement { + name: 'Phone' + application: 'phone@0.1' + } + ListElement { + name: 'settings' + application: 'settings@0.1' + } + } + + property int pid: -1 + + RowLayout { + anchors.fill: parent + spacing: 75 + Repeater { + model: applicationModel + delegate: ShortcutIcon { +// Layout.fillWidth: true +// Layout.fillHeight: true + width: 60 + height: 60 + name: model.name + active: model.name === launcher.current + onClicked: { + if(model.application === 'navigation@0.1') { + pid = launcher.launch('browser@5.0') + } else { + pid = launcher.launch(model.application.toLowerCase()) + } + + if (1 < pid) { + applicationArea.visible = true + } + else { + console.warn(model.application) + console.warn("app cannot be launched!") + } + if(model.name === 'Navigation') { + homescreenHandler.tapShortcut('browser') + } else { + homescreenHandler.tapShortcut(model.name) + } + } + } + } + } + Rectangle { + id: bottomInformation + width: parent.width + height: parent.height-20 + anchors.bottom: parent.bottom + color: "gray" + z: 1 + opacity: 0.8 + visible: false + + Text { + id: informationText + anchors.centerIn: parent + font.pixelSize: 25 + font.letterSpacing: 5 + horizontalAlignment: Text.AlignHCenter + color: "white" + text: "" + } + } + + Connections { + target: homescreenHandler + onInformation: { + informationText.text = text + bottomInformation.visible = true + informationTimer.restart() + } + } +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/ShortcutIcon.qml b/demo3/horizontal/homescreen/homescreen/qml/ShortcutIcon.qml new file mode 100644 index 0000000..026db32 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/ShortcutIcon.qml @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Controls 2.0 +import QtGraphicalEffects 1.0 + +MouseArea { + id: root + width: 70 + height: 70 + property string name: 'Home' + property bool active: false + Item { + id: icon + property real desaturation: 0 + anchors.fill: parent + Image { + id: inactiveIcon + anchors.fill: parent + source: './images/Shortcut/%1.png'.arg(root.name.toLowerCase()) + } + Image { + id: activeIcon + anchors.fill: parent + source: './images/Shortcut/%1_active.png'.arg(root.name.toLowerCase()) + opacity: 0.0 + } + layer.enabled: true + layer.effect: Desaturate { + id: desaturate + desaturation: icon.desaturation + cached: true + } + } + + transitions: [ + Transition { + NumberAnimation { + properties: 'opacity' + duration: 500 + easing.type: Easing.OutExpo + } + NumberAnimation { + properties: 'desaturation' + duration: 250 + } + } + ] + + onPressed: { + activeIcon.opacity = 1.0 + inactiveIcon.opacity = 0.0 + } + + onReleased: { + activeIcon.opacity = 0.0 + inactiveIcon.opacity = 1.0 + } +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/StatusArea.qml b/demo3/horizontal/homescreen/homescreen/qml/StatusArea.qml new file mode 100644 index 0000000..bd81767 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/StatusArea.qml @@ -0,0 +1,214 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Layouts 1.1 +import HomeScreen 1.0 + +Item { + id: root + width: 700 + height: 80 + + property date now: new Date + Timer { + interval: 100; running: true; repeat: true; + onTriggered: root.now = new Date + } + + Timer { + id:notificationTimer + interval: 3000 + running: false + repeat: true + onTriggered: notificationItem.visible = false + } + + Connections { + target: weather + + onConditionChanged: { + var icon = '' + + if (condition.indexOf("clouds") !== -1) { + icon = "WeatherIcons_Cloudy-01.png" + } else if (condition.indexOf("thunderstorm") !== -1) { + icon = "WeatherIcons_Thunderstorm-01.png" + } else if (condition.indexOf("snow") !== -1) { + icon = "WeatherIcons_Snow-01.png" + } else if (condition.indexOf("rain") !== -1) { + icon = "WeatherIcons_Rain-01.png" + } + + condition_item.source = icon ? './images/Weather/' + icon : '' + } + + onTemperatureChanged: { + temperature_item.text = temperature.split(".")[0] + '°F' + } + } + + RowLayout { + anchors.fill: parent + spacing: 0 + RowLayout { + id: icons + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredWidth: 120 + spacing: -10 + + Image { + id: bt_icon + Layout.preferredWidth: 50 + Layout.preferredHeight: 50 + source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png' + fillMode: Image.PreserveAspectFit + property string deviceName: "none" + property bool connStatus: false + Connections { + target: bluetooth + onConnectionEvent: { + console.log("onConnectionEvent", data.Status) + if (data.Status === "connected") { + bt_icon.connStatus = true + } else if (data.Status === "disconnected") { + bt_icon.connStatus = false + } + } + onDeviceUpdateEvent: { + console.log("onConnectionEvent", data.Paired) + if (data.Paired === "True" && data.Connected === "True") { + bt_icon.deviceName = data.name + bt_icon.connStatus = true + } else { + if(bt_icon.deviceName === data.Name) + { + bt_icon.connStatus = false + } + } + } + } + } + + Repeater { + model: StatusBarModel { objectName: "statusBar" } + delegate: Image { + Layout.preferredWidth: 50 + Layout.preferredHeight: 50 + source: model.modelData + fillMode: Image.PreserveAspectFit + } + } + } + Item { + anchors.left: icons.right + Layout.fillHeight: true + width: 440 + ColumnLayout { + anchors.fill: parent + anchors.margins: 17 + spacing: 0 + Text { + Layout.fillWidth: true + Layout.fillHeight: true + text: Qt.formatDate(now, 'dddd').toUpperCase() + font.family: 'Roboto' + font.pixelSize: 13 + color: 'white' + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + Text { + Layout.fillWidth: true + Layout.fillHeight: true + text: Qt.formatTime(now, 'h:mm ap').toUpperCase() + font.family: 'Roboto' + font.pixelSize: 38 + color: 'white' + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + } + RowLayout { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredHeight: 20 + + Image { + id: condition_item + source: './images/Weather/WeatherIcons_Rain-01.png' + } + Text { + id: temperature_item + text: '64°F' + color: 'white' + font.family: 'Helvetica' + font.pixelSize: 32 + } + } + } + + Item { + id: notificationItem + x: 0 + y: 0 + z: 1 + width: parent.width + height: 100 + opacity: 0.8 + visible: false + + Rectangle { + width: parent.width + height: parent.height + anchors.fill: parent + color: "gray" + Image { + id: notificationIcon + width: 70 + height: 70 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.verticalCenter: parent.verticalCenter + source: "" + } + + Text { + id: notificationtext + font.pixelSize: 25 + anchors.left: notificationIcon.right + anchors.leftMargin: 5 + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: qsTr("") + } + } + } + + Connections { + target: homescreenHandler + onNotification: { + notificationIcon.source = './images/Shortcut/%1.svg'.arg(id) + notificationtext.text = text + notificationItem.visible = true + notificationTimer.restart() + } + } + +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/TopArea.qml b/demo3/horizontal/homescreen/homescreen/qml/TopArea.qml new file mode 100644 index 0000000..978018c --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/TopArea.qml @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.0 + +Item { + width: 700 + height: 80 + + RowLayout { + anchors.fill: parent + spacing: 0 + StatusArea { + id: statusArea + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredWidth: 700 + } + } +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher.png new file mode 100644 index 0000000..6f91d50 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher_active.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher_active.png new file mode 100644 index 0000000..2706961 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/launcher_active.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer.png new file mode 100644 index 0000000..8ea7d76 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer_active.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer_active.png new file mode 100644 index 0000000..b130b92 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/mediaplayer_active.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/music.svg b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/music.svg new file mode 100644 index 0000000..b6ec056 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/music.svg @@ -0,0 +1,111 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.png new file mode 100644 index 0000000..17b347b Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.svg b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.svg new file mode 100644 index 0000000..97fcf31 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation.svg @@ -0,0 +1,183 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation_active.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation_active.png new file mode 100644 index 0000000..bebb23e Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/navigation_active.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone.png new file mode 100644 index 0000000..d0ca0af Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone_active.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone_active.png new file mode 100644 index 0000000..77e45fd Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/phone_active.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings.png new file mode 100644 index 0000000..8c36376 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings_active.png b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings_active.png new file mode 100644 index 0000000..d863457 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/settings_active.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/shortcut.qrc b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/shortcut.qrc new file mode 100644 index 0000000..40462f4 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/Shortcut/shortcut.qrc @@ -0,0 +1,16 @@ + + + launcher.png + launcher_active.png + mediaplayer.png + mediaplayer_active.png + navigation.png + navigation_active.png + phone.png + phone_active.png + settings.png + settings_active.png + navigation.svg + music.svg + + diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png new file mode 100644 index 0000000..10bd5a5 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_Inactive-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_On-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_On-01.png new file mode 100644 index 0000000..1ff96e1 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Bluetooth_On-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_1Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_1Bars-01.png new file mode 100644 index 0000000..44ef700 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_1Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_2Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_2Bars-01.png new file mode 100644 index 0000000..fe4e776 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_2Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_3Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_3Bars-01.png new file mode 100644 index 0000000..892c6ec Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_3Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_4Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_4Bars-01.png new file mode 100644 index 0000000..f4f033b Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_4Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_Full-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_Full-01.png new file mode 100644 index 0000000..18070b9 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_Full-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_NoBars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_NoBars-01.png new file mode 100644 index 0000000..1b77207 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Signal_NoBars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_1Bar-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_1Bar-01.png new file mode 100644 index 0000000..c72461f Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_1Bar-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_2Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_2Bars-01.png new file mode 100644 index 0000000..448dd36 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_2Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_3Bars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_3Bars-01.png new file mode 100644 index 0000000..3e407ad Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_3Bars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_Full-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_Full-01.png new file mode 100644 index 0000000..6f95e97 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_Full-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_NoBars-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_NoBars-01.png new file mode 100644 index 0000000..07f4f09 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Status/HMI_Status_Wifi_NoBars-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Status/status.qrc b/demo3/horizontal/homescreen/homescreen/qml/images/Status/status.qrc new file mode 100644 index 0000000..d29c91a --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/Status/status.qrc @@ -0,0 +1,17 @@ + + + HMI_Status_Wifi_NoBars-01.png + HMI_Status_Bluetooth_Inactive-01.png + HMI_Status_Bluetooth_On-01.png + HMI_Status_Signal_1Bars-01.png + HMI_Status_Signal_2Bars-01.png + HMI_Status_Signal_3Bars-01.png + HMI_Status_Signal_4Bars-01.png + HMI_Status_Signal_Full-01.png + HMI_Status_Signal_NoBars-01.png + HMI_Status_Wifi_1Bar-01.png + HMI_Status_Wifi_2Bars-01.png + HMI_Status_Wifi_3Bars-01.png + HMI_Status_Wifi_Full-01.png + + diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_ALL-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_ALL-01.png new file mode 100644 index 0000000..f5f8b19 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_ALL-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Cloudy-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Cloudy-01.png new file mode 100644 index 0000000..3603a55 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Cloudy-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Moon-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Moon-01.png new file mode 100644 index 0000000..8fe1e18 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Moon-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png new file mode 100644 index 0000000..09cd84f Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_PartiallyCloudy-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Rain-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Rain-01.png new file mode 100644 index 0000000..125b413 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Rain-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Snow-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Snow-01.png new file mode 100644 index 0000000..d0a9520 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Snow-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Sun-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Sun-01.png new file mode 100644 index 0000000..ee3a744 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Sun-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Thunderstorm-01.png b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Thunderstorm-01.png new file mode 100644 index 0000000..f6959f4 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/WeatherIcons_Thunderstorm-01.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/Weather/weather.qrc b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/weather.qrc new file mode 100644 index 0000000..2668fec --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/Weather/weather.qrc @@ -0,0 +1,12 @@ + + + WeatherIcons_ALL-01.png + WeatherIcons_Cloudy-01.png + WeatherIcons_Moon-01.png + WeatherIcons_PartiallyCloudy-01.png + WeatherIcons_Rain-01.png + WeatherIcons_Snow-01.png + WeatherIcons_Sun-01.png + WeatherIcons_Thunderstorm-01.png + + diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/fullscreen.png b/demo3/horizontal/homescreen/homescreen/qml/images/fullscreen.png new file mode 100644 index 0000000..f56a13c Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/fullscreen.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/images.qrc b/demo3/horizontal/homescreen/homescreen/qml/images/images.qrc new file mode 100644 index 0000000..e72f697 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/images/images.qrc @@ -0,0 +1,9 @@ + + + menubar_background.png + menubar_normal_background.png + menubar_full_background.png + fullscreen.png + normal.png + + diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/menubar_background.png b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_background.png new file mode 100644 index 0000000..bb95916 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_background.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/menubar_full_background.png b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_full_background.png new file mode 100644 index 0000000..39e12b9 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_full_background.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/menubar_normal_background.png b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_normal_background.png new file mode 100644 index 0000000..ceb3684 Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/menubar_normal_background.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/images/normal.png b/demo3/horizontal/homescreen/homescreen/qml/images/normal.png new file mode 100644 index 0000000..92dee7a Binary files /dev/null and b/demo3/horizontal/homescreen/homescreen/qml/images/normal.png differ diff --git a/demo3/horizontal/homescreen/homescreen/qml/main.qml b/demo3/horizontal/homescreen/homescreen/qml/main.qml new file mode 100644 index 0000000..13500bd --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/main.qml @@ -0,0 +1,171 @@ +/* + * Copyright (C) 2016 The Qt Company Ltd. + * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import QtQuick 2.2 +import QtQuick.Window 2.1 +import QtQuick.Layouts 1.1 +import HomeScreen 1.0 + +Window { + visible: true + flags: Qt.FramelessWindowHint + width: container.width * container.scale + height: container.height * container.scale + title: 'HomeScreen' + color: "#00000000" + + Image { + id: container + anchors.centerIn: parent + width: 1920 + height: 720 + scale: 1.0 + source: './images/menubar_background.png' + + ColumnLayout { + id: menuBar + anchors.fill: parent + spacing: 0 + TopArea { + id: topArea + anchors.horizontalCenter: parent.horizontalCenter + Layout.preferredHeight: 80 + x: 640 + } + + Item { + id: applicationArea + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredHeight: 510 + + visible: true + MouseArea { + enabled: true + } + } + + ShortcutArea { + id: shortcutArea + anchors.horizontalCenter: parent.horizontalCenter + Layout.fillHeight: true + Layout.preferredHeight: 130 + } + } + states: [ + State { + name: "normal" + PropertyChanges { + target: container + y: 0 + } + PropertyChanges { + target: topArea + y: 0 + } + PropertyChanges { + target: applicationArea + y: 80 + } + PropertyChanges { + target: shortcutArea + y: 590 + } + }, + State { + name: "fullscreen" + PropertyChanges { + target: container + y: -720 + } + PropertyChanges { + target: topArea + y: -80 + } + PropertyChanges { + target: applicationArea + y: -510 + } + PropertyChanges { + target: shortcutArea + y: 720 + } + } + ] + transitions: Transition { + NumberAnimation { + target: topArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + NumberAnimation { + target: applicationArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + NumberAnimation { + target: shortcutArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + } + } + + + + + + Item { + id: switchBtn + anchors.right: parent.right + anchors.rightMargin: 20 + anchors.top: parent.top + anchors.topMargin: 5 + width: 55 + height: 55 + z: 1 + + MouseArea { + anchors.fill: parent + property string btnState: 'normal' + Image { + id: image + anchors.fill: parent + source: './images/normal.png' + } + onClicked: { + if (btnState === 'normal') { + image.source = './images/fullscreen.png' + btnState = 'fullscreen' + container.state = 'fullscreen' + container.opacity = 0.0 + touchArea.switchArea(1) + + } else { + image.source = './images/normal.png' + btnState = 'normal' + container.state = 'normal' + container.opacity = 1.0 + touchArea.switchArea(0) + } + } + } + } +} diff --git a/demo3/horizontal/homescreen/homescreen/qml/qml.qrc b/demo3/horizontal/homescreen/homescreen/qml/qml.qrc new file mode 100644 index 0000000..933a8a5 --- /dev/null +++ b/demo3/horizontal/homescreen/homescreen/qml/qml.qrc @@ -0,0 +1,10 @@ + + + main.qml + ShortcutArea.qml + ShortcutIcon.qml + StatusArea.qml + TopArea.qml + IconItem.qml + + -- cgit 1.2.3-korg