From 2dd897b63b9c1eaed968a2759d4dbbeb5eca3cb8 Mon Sep 17 00:00:00 2001 From: Grigorii Zimin Date: Fri, 3 Apr 2020 16:44:10 +0300 Subject: add greenomics app to the deployment server Task-number: AUTOSUITE-1469 Change-Id: I646511fefffc84cf89d9d242e43b64f9b829f86c Reviewed-by: Grigorii Zimin --- .gitattributes | 5 + com.luxoft.greenomics/Main.qml | 70 +++++++++++ com.luxoft.greenomics/assets/cluster_globe.png | 3 + com.luxoft.greenomics/assets/cluster_map.png | 3 + com.luxoft.greenomics/assets/fridge_asset.png | 3 + com.luxoft.greenomics/assets/recipe_asset.png | 3 + .../assets/recipe_selected_asset.png | 3 + com.luxoft.greenomics/com.luxoft.greenomics.pro | 24 ++++ com.luxoft.greenomics/helpers/qmldir | 2 + com.luxoft.greenomics/helpers/utils.js | 42 +++++++ com.luxoft.greenomics/icon.png | Bin 0 -> 1242 bytes com.luxoft.greenomics/info.yaml | 13 ++ .../view/GreenomicsClusterView.qml | 113 +++++++++++++++++ com.luxoft.greenomics/view/GreenomicsView.qml | 140 +++++++++++++++++++++ qt-auto-extra-apps.pro | 1 + 15 files changed, 425 insertions(+) create mode 100644 .gitattributes create mode 100644 com.luxoft.greenomics/Main.qml create mode 100644 com.luxoft.greenomics/assets/cluster_globe.png create mode 100644 com.luxoft.greenomics/assets/cluster_map.png create mode 100644 com.luxoft.greenomics/assets/fridge_asset.png create mode 100644 com.luxoft.greenomics/assets/recipe_asset.png create mode 100644 com.luxoft.greenomics/assets/recipe_selected_asset.png create mode 100644 com.luxoft.greenomics/com.luxoft.greenomics.pro create mode 100644 com.luxoft.greenomics/helpers/qmldir create mode 100644 com.luxoft.greenomics/helpers/utils.js create mode 100644 com.luxoft.greenomics/icon.png create mode 100644 com.luxoft.greenomics/info.yaml create mode 100644 com.luxoft.greenomics/view/GreenomicsClusterView.qml create mode 100644 com.luxoft.greenomics/view/GreenomicsView.qml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..db71784 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +com.luxoft.greenomics/assets/cluster_globe.png filter=lfs diff=lfs merge=lfs -text +com.luxoft.greenomics/assets/cluster_map.png filter=lfs diff=lfs merge=lfs -text +com.luxoft.greenomics/assets/fridge_asset.png filter=lfs diff=lfs merge=lfs -text +com.luxoft.greenomics/assets/recipe_asset.png filter=lfs diff=lfs merge=lfs -text +com.luxoft.greenomics/assets/recipe_selected_asset.png filter=lfs diff=lfs merge=lfs -text diff --git a/com.luxoft.greenomics/Main.qml b/com.luxoft.greenomics/Main.qml new file mode 100644 index 0000000..a9fdfb3 --- /dev/null +++ b/com.luxoft.greenomics/Main.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Luxoft Sweden AB +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Neptune 3 IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.8 +import application.windows 1.0 +import shared.utils 1.0 +import shared.Sizes 1.0 + +import shared.com.pelagicore.drivedata 1.0 + +import "view" 1.0 + +QtObject { + property var mainWindow: ApplicationCCWindow { + id: mainMap + + GreenomicsView { + y: mainMap.exposedRect.y + width: parent.width + height: Sizes.dp(1500) + } + + InstrumentCluster { + id: clusterSettings + } + } + + + readonly property Loader applicationICWindowLoader: Loader { + asynchronous: true + active: (clusterSettings.available || Qt.platform.os !== "linux") + sourceComponent: Component { + ApplicationICWindow { + id: applicationICWindowComponent + GreenomicsClusterView { + id: icMapView + anchors.fill: parent + } + } + } + } +} diff --git a/com.luxoft.greenomics/assets/cluster_globe.png b/com.luxoft.greenomics/assets/cluster_globe.png new file mode 100644 index 0000000..aa83c27 --- /dev/null +++ b/com.luxoft.greenomics/assets/cluster_globe.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c188a21926f842204a2d213fb115a59f45bb71d589be035ac49957e0a887448e +size 560578 diff --git a/com.luxoft.greenomics/assets/cluster_map.png b/com.luxoft.greenomics/assets/cluster_map.png new file mode 100644 index 0000000..c6e0a1a --- /dev/null +++ b/com.luxoft.greenomics/assets/cluster_map.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb0e36d972ab1934a44b17ad2ac474b11da900f1feb2a255ffaf9bf41ca7a994 +size 777204 diff --git a/com.luxoft.greenomics/assets/fridge_asset.png b/com.luxoft.greenomics/assets/fridge_asset.png new file mode 100644 index 0000000..f7fa65d --- /dev/null +++ b/com.luxoft.greenomics/assets/fridge_asset.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af05a4c190312ce994bc8e5215d4c4c8b9b9defd22f1495014574d63759ccc8c +size 1295587 diff --git a/com.luxoft.greenomics/assets/recipe_asset.png b/com.luxoft.greenomics/assets/recipe_asset.png new file mode 100644 index 0000000..0df9eeb --- /dev/null +++ b/com.luxoft.greenomics/assets/recipe_asset.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8f272031a9a0c887a3008cd2ac4aecb4b098abf72019367a565fab4b70f8cba8 +size 1493203 diff --git a/com.luxoft.greenomics/assets/recipe_selected_asset.png b/com.luxoft.greenomics/assets/recipe_selected_asset.png new file mode 100644 index 0000000..fcf05eb --- /dev/null +++ b/com.luxoft.greenomics/assets/recipe_selected_asset.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c480c20c061b51e5d1970ac36950a53b242e305e90fc3f7e793a11e547c04858 +size 1416345 diff --git a/com.luxoft.greenomics/com.luxoft.greenomics.pro b/com.luxoft.greenomics/com.luxoft.greenomics.pro new file mode 100644 index 0000000..c68a077 --- /dev/null +++ b/com.luxoft.greenomics/com.luxoft.greenomics.pro @@ -0,0 +1,24 @@ +TEMPLATE = aux + +FILES += info.yaml \ + icon.png \ + Main.qml + +app.files = $$FILES +app.path = /apps/com.luxoft.greenomics + +view.files += view +view.path = /apps/com.luxoft.greenomics + +helper.files += helpers +helper.path = /apps/com.luxoft.greenomics + +assets.files += assets/* +assets.path = /apps/com.luxoft.greenomics/assets + +INSTALLS += app view helper assets + +AM_MANIFEST = info.yaml +AM_PACKAGE_DIR = $$app.path + +load(am-app) diff --git a/com.luxoft.greenomics/helpers/qmldir b/com.luxoft.greenomics/helpers/qmldir new file mode 100644 index 0000000..6cbe7f2 --- /dev/null +++ b/com.luxoft.greenomics/helpers/qmldir @@ -0,0 +1,2 @@ +module helpers +Utils 1.0 utils.js diff --git a/com.luxoft.greenomics/helpers/utils.js b/com.luxoft.greenomics/helpers/utils.js new file mode 100644 index 0000000..febfcbc --- /dev/null +++ b/com.luxoft.greenomics/helpers/utils.js @@ -0,0 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Luxoft Sweden AB +** Copyright (C) 2018 Pelagicore AG +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Neptune 3 IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +.import shared.Style 1.0 as Style + +function localAsset(asset, theme) { + var themeStr = theme === Style.Style.Dark ? "-dark" : ""; + if (theme) { + return "../assets/" + asset + themeStr + '.png' + } + + return "../assets/" + asset + '.png' +} diff --git a/com.luxoft.greenomics/icon.png b/com.luxoft.greenomics/icon.png new file mode 100644 index 0000000..bfd0082 Binary files /dev/null and b/com.luxoft.greenomics/icon.png differ diff --git a/com.luxoft.greenomics/info.yaml b/com.luxoft.greenomics/info.yaml new file mode 100644 index 0000000..162794b --- /dev/null +++ b/com.luxoft.greenomics/info.yaml @@ -0,0 +1,13 @@ +formatVersion: 1 +formatType: am-application +--- +id: 'com.luxoft.greenomics' +icon: 'icon.png' +code: 'Main.qml' +runtime: 'qml' +name: + en: 'Greenomics' + de: 'Greenomics' + +categories: [ 'greenomics' ] + diff --git a/com.luxoft.greenomics/view/GreenomicsClusterView.qml b/com.luxoft.greenomics/view/GreenomicsClusterView.qml new file mode 100644 index 0000000..acfff73 --- /dev/null +++ b/com.luxoft.greenomics/view/GreenomicsClusterView.qml @@ -0,0 +1,113 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Luxoft Sweden AB +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Neptune 3 IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import shared.utils 1.0 +import shared.Style 1.0 +import shared.Sizes 1.0 + +import "../helpers" 1.0 + + +Item { + id: root + + Component { + id: stackMap + + Image { + source: Utils.localAsset("cluster_map") + + MouseArea { + anchors.fill: parent + onClicked: stack.push(stackGlobe) + Tracer { visible: true } + } + } + } + + Component { + id: stackGlobe + + Image { + source: Utils.localAsset("cluster_globe") + + MouseArea { + anchors.fill: parent + onClicked: stack.pop() + Tracer { visible: true } + } + } + } + + StackView { + id: stack + anchors.fill: parent + clip: true + initialItem: stackMap + pushEnter: Transition { + PropertyAnimation { + property: "opacity" + from: 0 + to: 1 + duration: 200 + } + } + + pushExit: Transition { + PropertyAnimation { + property: "opacity" + from: 1 + to: 0 + duration: 200 + } + } + + popEnter: Transition { + PropertyAnimation { + property: "opacity" + from: 0 + to: 1 + duration: 200 + } + } + + popExit: Transition { + PropertyAnimation { + property: "opacity" + from: 1 + to: 0 + duration: 200 + } + } + } +} diff --git a/com.luxoft.greenomics/view/GreenomicsView.qml b/com.luxoft.greenomics/view/GreenomicsView.qml new file mode 100644 index 0000000..e1d6351 --- /dev/null +++ b/com.luxoft.greenomics/view/GreenomicsView.qml @@ -0,0 +1,140 @@ +/**************************************************************************** +** +** Copyright (C) 2019 Luxoft Sweden AB +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the Neptune 3 IVI UI. +** +** $QT_BEGIN_LICENSE:GPL-QTAS$ +** Commercial License Usage +** Licensees holding valid commercial Qt Automotive Suite licenses may use +** this file in accordance with the commercial license agreement provided +** with the Software or, alternatively, in accordance with the terms +** contained in a written agreement between you and The Qt Company. For +** licensing terms and conditions see https://www.qt.io/terms-conditions. +** For further information use the contact form at https://www.qt.io/contact-us. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3 or (at your option) any later version +** approved by the KDE Free Qt Foundation. The licenses are as published by +** the Free Software Foundation and appearing in the file LICENSE.GPL3 +** included in the packaging of this file. Please review the following +** information to ensure the GNU General Public License requirements will +** be met: https://www.gnu.org/licenses/gpl-3.0.html. +** +** $QT_END_LICENSE$ +** +** SPDX-License-Identifier: GPL-3.0 +** +****************************************************************************/ + +import QtQuick 2.10 +import QtQuick.Controls 2.3 +import shared.utils 1.0 +import shared.controls 1.0 +import shared.Style 1.0 +import shared.Sizes 1.0 + +import "../helpers" 1.0 + +Item { + id: root + + Component { + id: stackRecipeComponent + + Image { + source: Utils.localAsset("recipe_asset") + MouseArea { + id: selectItem + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + width: Sizes.dp(400) + height: Sizes.dp(750) + onClicked: stack.push(stackRecipeSelectedComponent) + } + MouseArea { + anchors.top: selectItem.bottom + anchors.horizontalCenter: parent.horizontalCenter + width: Sizes.dp(400) + height: Sizes.dp(300) + onClicked: stack.push(stackFridgeComponent) + } + } + } + + Component { + id: stackFridgeComponent + + Image { + source: Utils.localAsset("fridge_asset") + } + } + + Component { + id: stackRecipeSelectedComponent + + Image { + source: Utils.localAsset("recipe_selected_asset") + } + } + + + ToolButton { + anchors.bottom: stack.top + anchors.left: parent.left + anchors.leftMargin: Sizes.dp(36) + visible: stack.depth >= 2 + baselineOffset: 0 + icon.name: LayoutMirroring.enabled ? "ic_forward" : "ic_back" + text: qsTr("Back") + font.pixelSize: Sizes.fontSizeS + onClicked: stack.pop() + } + + StackView { + id: stack + width: root.width + height: root.height + anchors.top: parent.top + anchors.topMargin: Sizes.dp(20) + clip: true + initialItem: stackRecipeComponent + pushEnter: Transition { + PropertyAnimation { + property: "opacity" + from: 0 + to: 1 + duration: 200 + } + } + + pushExit: Transition { + PropertyAnimation { + property: "opacity" + from: 1 + to: 0 + duration: 200 + } + } + + popEnter: Transition { + PropertyAnimation { + property: "opacity" + from: 0 + to: 1 + duration: 200 + } + } + + popExit: Transition { + PropertyAnimation { + property: "opacity" + from: 1 + to: 0 + duration: 200 + } + } + } +} diff --git a/qt-auto-extra-apps.pro b/qt-auto-extra-apps.pro index 4ceed54..08a8a16 100644 --- a/qt-auto-extra-apps.pro +++ b/qt-auto-extra-apps.pro @@ -4,6 +4,7 @@ SUBDIRS = com.pelagicore.camera \ com.pelagicore.netflix \ com.luxoft.webbrowser \ com.luxoft.videoplayer \ + com.luxoft.greenomics \ com.pelagicore.webradio \ # Top-level package target -- cgit v1.2.3