aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBramastyo Harimukti Santoso <bram.santoso@qt.io>2021-01-19 16:23:52 +0100
committerBramastyo Harimukti Santoso <bram.santoso@qt.io>2021-01-19 16:47:09 +0100
commitdf878f3935fe28dd3d7253b9fa59d65db331eed0 (patch)
treedf27168c9196d4ff4458f86a9fefdd6ecee84d47 /src
parent88c1d70ca626be6420160c6218e07867541ae8e3 (diff)
parente5dcdea6750b7689feae69083f39f283cc79b9b1 (diff)
Merge remote-tracking branch 'origin/5.15' into dev
Diffstat (limited to 'src')
-rw-r--r--src/assets/styles/neptune/icons/delete-24px.svg3
-rw-r--r--src/assets/styles/neptune/images/colorSelector/base_for_color_selector.svg3
-rw-r--r--src/connectivity/connectivity/connectivity.pro1
-rw-r--r--src/drivedata/backend/backend.pro2
-rw-r--r--src/drivedata/drivedata-simulation-server/simulation.qml74
-rw-r--r--src/drivedata/drivedata.qface14
-rw-r--r--src/drivedata/drivedata.yaml8
-rw-r--r--src/neptune-cluster-app/ClusterRootStore.qml163
-rw-r--r--src/neptune-cluster-app/Launcher.qml93
-rw-r--r--src/neptune-cluster-app/MockedWindows.qml78
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/+lucee/icon.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/Main.qml45
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_background.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_bodyVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorAlarmVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorClosedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicleCarPart.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorAlarmVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorClosedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicleCarPart.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofAlarmVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofClosedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofOpenedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkAlarmVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkClosedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkOpenedVehicle.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/pathsProvider.js36
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/qmldir2
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/icon.png3
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/Vehicle2DPanel.qml266
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/VehicleStore.qml63
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/VehicleICView.qml57
-rw-r--r--src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/+lucee/icon.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/Main.qml93
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r-dark.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-destination.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-your-position.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/helper.js37
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/qmldir2
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/icon.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/maps/mapboxgl.db3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/MapStore.qml140
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/ICMapView.qml188
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/Main.qml47
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/+lucee/TitleColumn.qml88
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/MusicProgress.qml87
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/TitleColumn.qml69
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/qmldir2
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/icon.png3
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/ICAlbumArtPanel.qml70
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/MusicStore.qml53
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/qmldir1
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/ICMusicView.qml67
-rw-r--r--src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/qmldir1
-rw-r--r--src/neptune-cluster-app/main.cpp108
-rw-r--r--src/neptune-cluster-app/main.qml100
-rw-r--r--src/neptune-cluster-app/neptune-cluster-app.pro48
-rw-r--r--src/neptune3-ui-qsr-cluster/main.cpp34
-rw-r--r--src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster.pro15
-rw-r--r--src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster_wrapper.bat37
-rw-r--r--src/neptune3-ui-qsr-cluster/safewindow.cpp108
-rw-r--r--src/neptune3-ui-qsr-cluster/safewindow.h30
-rw-r--r--src/neptune3-ui-qsr-cluster/safewindow_mac.h38
-rw-r--r--src/neptune3-ui-qsr-cluster/safewindow_mac.mm39
-rw-r--r--src/neptune3-ui-qsr-cluster/tcpmsghandler.cpp25
-rw-r--r--src/neptune3-ui-qsr-cluster/tcpmsghandler.h2
-rw-r--r--src/neptune3-ui/main.cpp14
-rw-r--r--src/neptune3-ui/neptune3-ui.pro7
-rw-r--r--src/remotesettings/app/DevelopmentPage.qml102
-rw-r--r--src/remotesettings/app/app.pro23
-rw-r--r--src/remotesettings/app/main.cpp19
-rw-r--r--src/remotesettings/app/main.qml4
-rw-r--r--src/remotesettings/backend/backend.pro2
-rw-r--r--src/src.pro5
103 files changed, 2616 insertions, 141 deletions
diff --git a/src/assets/styles/neptune/icons/delete-24px.svg b/src/assets/styles/neptune/icons/delete-24px.svg
new file mode 100644
index 00000000..804a2153
--- /dev/null
+++ b/src/assets/styles/neptune/icons/delete-24px.svg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d29bc3db62a2cb48e5ca1c0de4dee4b97583a1c32c2c6d65e61ad2305ed06d38
+size 2982
diff --git a/src/assets/styles/neptune/images/colorSelector/base_for_color_selector.svg b/src/assets/styles/neptune/images/colorSelector/base_for_color_selector.svg
new file mode 100644
index 00000000..010671bc
--- /dev/null
+++ b/src/assets/styles/neptune/images/colorSelector/base_for_color_selector.svg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a142e139ef85b0baf37f2d0482087c4767e435e1fc078dea2e2d19469d1bfcf0
+size 40077
diff --git a/src/connectivity/connectivity/connectivity.pro b/src/connectivity/connectivity/connectivity.pro
index c5c3018e..fd4d607f 100644
--- a/src/connectivity/connectivity/connectivity.pro
+++ b/src/connectivity/connectivity/connectivity.pro
@@ -9,6 +9,7 @@ QT_FOR_CONFIG += ivicore
QFACE_SOURCES = ../connectivity.qface
DESTDIR = $$LIB_DESTDIR
+DEFINES += QT_BUILD_CONNECTIVITY_LIB
include($$SOURCE_DIR/config.pri)
diff --git a/src/drivedata/backend/backend.pro b/src/drivedata/backend/backend.pro
index 053b5a98..7aa90cf2 100644
--- a/src/drivedata/backend/backend.pro
+++ b/src/drivedata/backend/backend.pro
@@ -1,5 +1,5 @@
TEMPLATE=lib
-TARGET = $$qtLibraryTarget(drivedata_backend_qtro)
+TARGET = $$qt5LibraryTarget(drivedata_backend_qtro, "plugins/qtivi/")
CONFIG += ivigenerator plugin
QT_FOR_CONFIG += ivicore
diff --git a/src/drivedata/drivedata-simulation-server/simulation.qml b/src/drivedata/drivedata-simulation-server/simulation.qml
index 35cbc125..2371a16c 100644
--- a/src/drivedata/drivedata-simulation-server/simulation.qml
+++ b/src/drivedata/drivedata-simulation-server/simulation.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 Luxoft Sweden AB
+** Copyright (C) 2019-2020 Luxoft Sweden AB
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune 3 UI.
@@ -55,7 +55,7 @@ Item {
speedTimer.start()
}
}
- running: backend.driveTrainState !== 2
+ running: backend.enableSimulation && backend.driveTrainState !== 2
}
property Timer simulationSetTimer: Timer {
@@ -76,7 +76,7 @@ Item {
}
}
repeat: true
- running: backend.driveTrainState === 2
+ running: backend.enableSimulation && backend.driveTrainState === 2
}
property Timer speedTimer: Timer {
@@ -89,7 +89,7 @@ Item {
backend.speed = backend.speed - 1;
}
}
- repeat: true
+ repeat: backend.enableSimulation
}
property Timer powerTimer: Timer {
@@ -102,7 +102,71 @@ Item {
}
}
repeat: true
- running: backend.driveTrainState === 2
+ running: backend.enableSimulation && backend.driveTrainState === 2
+ }
+
+ /*
+ One shot timer to have values initialized
+ */
+ property Timer initTimer: Timer {
+ interval: 2000
+ onTriggered: {
+ backend.lowBeamHeadlight = true;
+ backend.outsideTemperatureCelsius = 20.0;
+ backend.mileageKm = 8124;
+ backend.drivingModeRangeKm = 600;
+ backend.drivingModeECORangeKm = 720;
+ backend.navigationProgressPercents = 0.7;
+ backend.navigationRouteDistanceKm = 42;
+ }
+ repeat: false
+ running: true
+ }
+
+ /*
+ Telltales simulation
+ - left/right turn, lights are controlled manually
+ */
+ property Timer telltalesTimer: Timer {
+ interval: 3000
+ onTriggered: {
+ backend.stabilityControl = getNewTelltaleState();
+ backend.seatBeltNotFastened = getNewTelltaleState();
+ backend.ABSFailure = getNewTelltaleState();
+ backend.parkBrake = getNewTelltaleState();
+ backend.tyrePressureLow = getNewTelltaleState();
+ backend.brakeFailure = getNewTelltaleState();
+ backend.airbagFailure = getNewTelltaleState();
+ }
+ repeat: true
+ running: backend.enableSimulation
+ function getNewTelltaleState() {
+ return Math.round(Math.random());
+ }
+ }
+
+ /*
+ Lucee elements timer
+ */
+ property Timer luceeTimer: Timer {
+ interval: 2000
+ onTriggered: {
+ backend.mileageKm = backend.mileageKm + 0.2;
+
+ backend.drivingModeRangeKm = backend.drivingModeRangeKm - 0.2;
+ backend.drivingModeECORangeKm = backend.drivingModeRangeKm - 0.2;
+ if (backend.drivingModeRangeKm < 20) {
+ backend.drivingModeRangeKm = 1000;
+ backend.drivingModeECORangeKm = 1200;
+ }
+
+ backend.navigationProgressPercents = backend.navigationProgressPercents + 0.01
+ if (backend.navigationProgressPercents > 1.0) {
+ backend.navigationProgressPercents = 0.0;
+ }
+ }
+ repeat: true
+ running: backend.enableSimulation
}
}
}
diff --git a/src/drivedata/drivedata.qface b/src/drivedata/drivedata.qface
index 59033133..4473d122 100644
--- a/src/drivedata/drivedata.qface
+++ b/src/drivedata/drivedata.qface
@@ -2,6 +2,9 @@
module DriveData 1.0;
interface InstrumentCluster {
+ /* default value is false (in qface) */
+ bool enableSimulation;
+
/*
* In Km/H
*/
@@ -79,4 +82,15 @@ interface NavigationState {
real mapZoomLevel;
real mapTilt;
real mapBearing;
+ string nextTurn;
+ string nextTurnDistanceMeasuredIn;
+ real nextTurnDistance;
+
+ /**
+ * Contains route points to show a path on the map
+ * Points are stored as a list of coordinates: e.g.
+ * [pos1::QtPositioning.coordinate, pos2::QtPositioning.coordinate] is stored as
+ * [(pos1.x, pos1.y), (pos1.y , pos1.y)]
+ **/
+ var routePoints;
}
diff --git a/src/drivedata/drivedata.yaml b/src/drivedata/drivedata.yaml
index 1f7a73c2..c9338077 100644
--- a/src/drivedata/drivedata.yaml
+++ b/src/drivedata/drivedata.yaml
@@ -2,10 +2,18 @@ DriveData:
config_simulator:
simulationFile: "qrc:/plugin_resource/simulation.qml"
+DriveData.InstrumentCluster#enableSimulation:
+ config_simulator:
+ default: true
+
DriveData.InstrumentCluster#ePower:
config_simulator:
default: 100
+DriveData.InstrumentCluster#speed:
+ config_simulator:
+ default: 45
+
DriveData.InstrumentCluster#speedLimit:
config_simulator:
default: 50
diff --git a/src/neptune-cluster-app/ClusterRootStore.qml b/src/neptune-cluster-app/ClusterRootStore.qml
new file mode 100644
index 00000000..5f5c5f94
--- /dev/null
+++ b/src/neptune-cluster-app/ClusterRootStore.qml
@@ -0,0 +1,163 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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 shared.com.pelagicore.remotesettings 1.0
+import shared.com.pelagicore.drivedata 1.0
+import shared.utils 1.0
+
+import "../apps/com.theqtcompany.cluster/stores" 1.0
+
+RootStoreInterface {
+ id: root
+
+ property bool devMode: false
+ onDevModeChanged: { Config.showCursorIndicator = root.devMode; }
+
+ readonly property InstrumentCluster clusterDataSource: InstrumentCluster {}
+ /*!
+ \qmlproperty UISettings ClusterStore::uiSettings
+ Needed here to get twentyFourHourTimeFormat
+ */
+ readonly property UISettings uiSettings: UISettings {}
+ // true if QtSafeRenderer is enabled
+
+ vehicleInterface: VehicleInterface {
+ speed: clusterDataSource.speed
+ speedLimit: clusterDataSource.speedLimit
+ speedCruise: clusterDataSource.speedCruise
+ driveTrainState: clusterDataSource.driveTrainState
+ ePower: clusterDataSource.ePower
+ drivingMode: clusterDataSource.drivingMode
+ drivingModeRangeKm: clusterDataSource.drivingModeRangeKm
+ drivingModeECORangeKm: clusterDataSource.drivingModeECORangeKm
+
+ mileage: localization.calculateDistanceValue(clusterDataSource.mileageKm)
+
+ lowBeamHeadlight: clusterDataSource.lowBeamHeadlight
+ highBeamHeadlight: clusterDataSource.highBeamHeadlight
+ fogLight: clusterDataSource.fogLight
+ stabilityControl: clusterDataSource.stabilityControl
+ seatBeltFasten: clusterDataSource.seatBeltNotFastened
+ leftTurn: clusterDataSource.leftTurn
+
+ rightTurn: clusterDataSource.rightTurn
+ absFailure: clusterDataSource.ABSFailure
+ parkBrake: clusterDataSource.parkBrake
+ tyrePressureLow: clusterDataSource.tyrePressureLow
+ brakeFailure: clusterDataSource.brakeFailure
+ airbagFailure: clusterDataSource.airbagFailure
+ }
+
+ behaviourInterface: BehaviourInterface {
+ Loader {
+ visible: false
+ source: "../apps/com.theqtcompany.cluster/helpers/Qt3DStudioAvailable.qml"
+ onLoaded: {
+ root.behaviourInterface.qt3DStudioAvailable = true
+ source = ""
+ }
+ }
+
+ threeDGauges: qt3DStudioAvailable && uiSettings.threeDGauges
+ hideGauges: uiSettings.hideGauges
+ navigationMode: uiSettings.navigationMode
+ }
+
+ externalDataInterface: ExternalDataInterface {
+ outsideTemperature: QtObject {
+ readonly property real value: clusterDataSource.outsideTemperatureCelsius
+
+ readonly property real minValue: -100
+ readonly property real maxValue: 100
+ readonly property real stepValue: 0.5
+ readonly property real localizedValue: localization.calculateUnitValue(value)
+ readonly property string valueString: Number(localizedValue).toLocaleString(Qt.locale(), 'f', 1)
+ readonly property string localizedUnits: root.localization.temperature
+ }
+
+ currentDate: new Date();
+ readonly property QtObject d_timer: Timer {
+ interval: 1000
+ repeat: true
+ running: true
+ onTriggered: parent.currentDate = new Date()
+ }
+
+ readonly property real navigationProgressPercents: clusterDataSource.navigationProgressPercents
+ readonly property real navigationRouteDistanceKm: clusterDataSource.navigationRouteDistanceKm
+ }
+
+
+ readonly property QtObject localization: QtObject {
+ property string mileageUnits: {
+ if (Qt.locale().measurementSystem === Locale.MetricSystem)
+ return qsTr("km")
+ else
+ return qsTr("mi")
+ }
+
+ readonly property string speedUnits: {
+ if (Qt.locale().measurementSystem === Locale.MetricSystem)
+ return qsTr("km/h")
+ else
+ return qsTr("mph")
+ }
+
+ readonly property string temperature: {
+ if (Qt.locale().measurementSystem === Locale.MetricSystem)
+ return qsTr("°C")
+ else
+ return qsTr("°F")
+ }
+
+ readonly property bool twentyFourHourTimeFormat: uiSettings.twentyFourHourTimeFormat
+
+ /*!
+ Convert distance from km to mi
+ */
+ function calculateDistanceValue(value) {
+ return Qt.locale().measurementSystem === Locale.MetricSystem
+ ? value
+ : value / 1.60934
+ }
+
+ /*!
+ Convert temperature from C to F
+ */
+ function calculateUnitValue(value) {
+ // Default value is the celsius
+ return Qt.locale().measurementSystem === Locale.MetricSystem
+ ? value
+ : Math.round(value * 1.8 + 32.0)
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/Launcher.qml b/src/neptune-cluster-app/Launcher.qml
new file mode 100644
index 00000000..e31d3866
--- /dev/null
+++ b/src/neptune-cluster-app/Launcher.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.12
+import QtQuick.Controls 2.5
+import Qt.labs.folderlistmodel 2.2
+
+import shared.Sizes 1.0
+
+import "../sysui/launcher" 1.0
+
+Item {
+ id: root
+
+ signal appClicked(var appUrl)
+
+ ButtonGroup {
+ id: buttonGroup
+ }
+
+ readonly property int buttonWidth: Sizes.dp(100)
+
+ ListView {
+ id: appsLauncher
+ interactive: false
+ LayoutMirroring.enabled: false
+ orientation: Qt.Horizontal
+ height: buttonWidth
+ width: (buttonWidth + spacing) * flModel.count - spacing
+ spacing: buttonWidth / 4
+ anchors.top: parent.top
+ anchors.topMargin: Sizes.dp(30)
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ model: FolderListModel {
+ id: flModel
+ showDirs: true
+ showDotAndDotDot: false
+ folder: "apps"
+ nameFilters: [ "*-ic" ]
+ }
+
+ delegate:
+ Item {
+ id: delegateRoot
+ width: buttonWidth
+ height: width
+
+ AppButton {
+ id: appButton
+ z: 40
+ ButtonGroup.group: buttonGroup
+ anchors.fill: parent
+ editModeBgOpacity: 0.0
+
+ icon.name: Qt.resolvedUrl("apps/" + fileName + '/' + 'icon.png')
+ gridOpen: false
+
+ onClicked: {
+ root.appClicked(Qt.resolvedUrl("apps/" + fileName + '/' + 'Main.qml'));
+ }
+ }
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/MockedWindows.qml b/src/neptune-cluster-app/MockedWindows.qml
new file mode 100644
index 00000000..0ae38109
--- /dev/null
+++ b/src/neptune-cluster-app/MockedWindows.qml
@@ -0,0 +1,78 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.12
+import QtQuick.Controls 2.12
+
+Item {
+ id: root
+
+ QtObject {
+ id: d
+ property string currentApp: ""
+ }
+
+ function runApp(appUrl) {
+ d.currentApp = appUrl;
+ for (var i = 0; i < runningApps.count; ++i) {
+ if (runningApps.get(i).appUrl === appUrl) {
+ return;
+ }
+ }
+
+ runningApps.append({"appUrl": appUrl});
+ }
+
+ ListModel {
+ id: runningApps
+ }
+
+ Repeater {
+ model: runningApps
+ delegate: Item {
+ width: root.width
+ height: root.height
+ opacity: Number(appUrl === d.currentApp)
+
+ Behavior on opacity {
+ NumberAnimation { duration: 300 }
+ }
+
+ Loader {
+ x: 0
+ y: 0
+ width: root.width
+ height: root.height
+ source: appUrl
+ }
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/+lucee/icon.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/+lucee/icon.png
new file mode 100644
index 00000000..8df8de22
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/+lucee/icon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:cff47f6c6ba5b27ceeb3fbe1a4aca8e04a572a802eaa9fc518c475c66121a726
+size 820
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/Main.qml b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/Main.qml
new file mode 100644
index 00000000..6fd94bf9
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/Main.qml
@@ -0,0 +1,45 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.13
+import QtQuick.Controls 2.2
+
+import "views" 1.0
+import "stores" 1.0
+
+Item {
+ id: root
+ VehicleICView {
+ id: vehicleView
+ anchors.fill: parent
+ store: VehicleStore {}
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_background.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_background.png
new file mode 100644
index 00000000..688d76ac
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_background.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5dd6453804435baf851d413af4dbadcf7f66dfab2d27bbb76867b94235c9fdf9
+size 2152197
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_bodyVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_bodyVehicle.png
new file mode 100644
index 00000000..e073a734
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_bodyVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1a7bae1ace4bb0aadb90c5f49cdc4adbbbd84eaccdc65c808a1225c86bb45635
+size 512144
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorAlarmVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorAlarmVehicle.png
new file mode 100644
index 00000000..f842d030
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorAlarmVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8a2a2d379b2c4b9b1f7d7a86a439d1903d6b34f98e0c3b67aa77b54a3d05ba80
+size 21785
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorClosedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorClosedVehicle.png
new file mode 100644
index 00000000..9ee2ee68
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorClosedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d3503b3e5e819e81acbd911dcd2fc52a8c0e4ca1e630cfc53f1ab4aa314f5fb6
+size 17413
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicle.png
new file mode 100644
index 00000000..38dbd90e
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b9c6465128a67ad4b3d5f824360ade07f2b2e2435ee29656d8d711bfec5db4e6
+size 28896
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicleCarPart.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicleCarPart.png
new file mode 100644
index 00000000..78d39e32
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_leftDoorOpenedVehicleCarPart.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3d644a0d270aeb8b714ec4817e0c548d5dd135d65d5ddffc65677821429fbc3e
+size 16172
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorAlarmVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorAlarmVehicle.png
new file mode 100644
index 00000000..cf7f3df6
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorAlarmVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e904cc9f549160e0b1e0776b3dfca656747b2f79f50d10c80881b2be475b8641
+size 22053
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorClosedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorClosedVehicle.png
new file mode 100644
index 00000000..395edf52
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorClosedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d7f0e0601161026dc854e87468e2e1d8df59352e559c7bc3022de7d7aa7cb80f
+size 17402
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicle.png
new file mode 100644
index 00000000..61ab3378
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:68e5a6494e414814a6df5ff4b7e12b66e111ebc50f76730637928a253e3badca
+size 21292
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicleCarPart.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicleCarPart.png
new file mode 100644
index 00000000..057baa0c
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_rightDoorOpenedVehicleCarPart.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4fef57fff1b565394e62f4cc2a546226823289c70ec7b25bb403d271b3b77513
+size 15670
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofAlarmVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofAlarmVehicle.png
new file mode 100644
index 00000000..c64a9897
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofAlarmVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b50192635b09c8a1f7e45436f0c7003e969a76bf9cda8a58e3d57822cb5da1ec
+size 13721
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofClosedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofClosedVehicle.png
new file mode 100644
index 00000000..58f9ba0d
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofClosedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7337bc5e8f9be8b0ce310a08d814c4c858f781f4f566f8d91bd312798d9f0527
+size 6878
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofOpenedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofOpenedVehicle.png
new file mode 100644
index 00000000..90cdef53
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_roofOpenedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:396d051cc3b93ac735b74d3809e1844dca2464e226e355fe4d4e4667d9de2295
+size 11458
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkAlarmVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkAlarmVehicle.png
new file mode 100644
index 00000000..742c14e1
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkAlarmVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b91f424b814fa34ac49fd3b242e0a7fd99d83f0368c4f5cb9324bbd3898b16cc
+size 14342
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkClosedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkClosedVehicle.png
new file mode 100644
index 00000000..740c87b8
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkClosedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6d0051a37851f265c3e5b7584f23ea1fe64bc5a57ebc025e9e792ee52bd03fd6
+size 18389
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkOpenedVehicle.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkOpenedVehicle.png
new file mode 100644
index 00000000..b9784cc7
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/assets/images/ic_trunkOpenedVehicle.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5697d8ae7158616b3d2f37a9728ac6a107d6073471db29c42aae5a43c4243028
+size 17216
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/pathsProvider.js b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/pathsProvider.js
new file mode 100644
index 00000000..6a5ecb73
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/pathsProvider.js
@@ -0,0 +1,36 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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
+**
+****************************************************************************/
+
+.pragma library
+
+function getImagePath(name) {
+ return Qt.resolvedUrl("../assets/images/" + name)
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/qmldir b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/qmldir
new file mode 100644
index 00000000..f091a4dc
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/helpers/qmldir
@@ -0,0 +1,2 @@
+module helpers
+Paths 1.0 pathsProvider.js
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/icon.png b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/icon.png
new file mode 100644
index 00000000..bb54ede0
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/icon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fdf31c810a829c7e78728c82030a06c5bc2fd1f59bf12de8c89789a256a3187a
+size 2387
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/Vehicle2DPanel.qml b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/Vehicle2DPanel.qml
new file mode 100644
index 00000000..16c1ea27
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/Vehicle2DPanel.qml
@@ -0,0 +1,266 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.9
+import QtGraphicalEffects 1.12
+
+import shared.animations 1.0
+import shared.Sizes 1.0
+
+import "../helpers" 1.0
+
+Item {
+ id: root
+
+ height: base.height
+ width: base.width
+
+ property bool trunkOpen: false
+ property bool leftDoorOpen: false
+ property bool rightDoorOpen: false
+ property bool roofOpen: false
+ property real speed: 0.0
+
+ SequentialAnimation {
+ running: speed > 0.0 && (trunkOpened || leftDoorOpened || roofOpen || rightDoorOpened)
+ loops: Animation.Infinite
+ PropertyAnimation {
+ targets: [sunroofAlarm, trunkAlarm, leftDooralarm, rightDooralarm]
+ properties: "opacity"
+ from: 0.0
+ to: 1.0
+ duration: 1000
+ }
+ PropertyAnimation {
+ targets: [sunroofAlarm, trunkAlarm, leftDooralarm, rightDooralarm]
+ properties: "opacity"
+ from: 1.0
+ to: 0.0
+ duration: 1000
+ }
+ }
+
+ Image {
+ anchors.topMargin: -Sizes.dp(68)
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_background.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+
+ Item {
+ anchors.top: parent.top
+ anchors.topMargin: -Sizes.dp(300)
+ anchors.left: parent.left
+ anchors.leftMargin: Sizes.dp(670)
+ width: Sizes.dp(400)
+ height: Sizes.dp(500)
+ RadialGradient {
+ anchors.fill: parent
+ horizontalRadius: parent.width * .8
+ verticalRadius: parent.height * .8
+ angle: -20
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "white" }
+ GradientStop { position: 0.6; color: "transparent" }
+ }
+ }
+ }
+
+ Item {
+ anchors.top: parent.top
+ anchors.topMargin: -Sizes.dp(300)
+ anchors.right: parent.right
+ anchors.rightMargin: Sizes.dp(670)
+ width: Sizes.dp(400)
+ height: Sizes.dp(500)
+ RadialGradient {
+ anchors.fill: parent
+ horizontalRadius: parent.width * .8
+ verticalRadius: parent.height * .8
+ angle: 20
+ gradient: Gradient {
+ GradientStop { position: 0.0; color: "white" }
+ GradientStop { position: 0.6; color: "transparent" }
+ }
+ }
+ }
+
+ Image {
+ id: base
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_bodyVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+
+ Image {
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_roofClosedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: sunroofOpened.opacity !== 1.0
+ }
+
+ Image {
+ id: sunroofOpened
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_roofOpenedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ opacity: root.roofOpen ? 1.0 : 0.0
+ Behavior on opacity { DefaultNumberAnimation {} }
+ }
+
+ Image {
+ id: sunroofAlarm
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_roofAlarmVehicle.png")
+ visible: roofOpen && root.speed > 0
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+
+ Image {
+ id: leftDoor
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_leftDoorClosedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: root.leftDoorOpen ? 0.0 : 1.0
+ }
+
+ Image {
+ id: leftDoorOpenedCarPart
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_leftDoorOpenedVehicleCarPart.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: root.leftDoorOpen ? 1.0 : 0.0
+ }
+
+ Image {
+ id: leftDoorOpened
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_leftDoorOpenedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ opacity: root.leftDoorOpen ? 1.0 : 0.0
+ Behavior on opacity { DefaultNumberAnimation {} }
+ }
+
+ Image {
+ id: leftDooralarm
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_leftDoorAlarmVehicle.png")
+ visible: leftDoorOpen && root.speed > 0
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+
+ Image {
+ id: rightDoor
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_rightDoorClosedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: root.rightDoorOpen ? 0.0 : 1.0
+ }
+
+ Image {
+ id: rightDoorOpenedCarPart
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_rightDoorOpenedVehicleCarPart.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: root.rightDoorOpen ? 1.0 : 0.0
+ }
+
+ Image {
+ id: rightDoorOpened
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_rightDoorOpenedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ opacity: root.rightDoorOpen ? 1.0 : 0.0
+ Behavior on opacity { DefaultNumberAnimation {} }
+ }
+
+ Image {
+ id: rightDooralarm
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_rightDoorAlarmVehicle.png")
+ visible: rightDoorOpen && root.speed > 0
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+
+ Image {
+ id: trunk
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_trunkClosedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ visible: trunkOpened.opacity !== 1.0
+ }
+
+ Image {
+ id: trunkOpened
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_trunkOpenedVehicle.png")
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ opacity: root.trunkOpen ? 1.0 : 0.0
+ Behavior on opacity { DefaultNumberAnimation {} }
+ }
+
+ Image {
+ id: trunkAlarm
+
+ anchors.fill: parent
+ source: Paths.getImagePath("ic_trunkAlarmVehicle.png")
+ visible: trunkOpen && root.speed > 0
+ width: Sizes.dp(sourceSize.width)
+ height: Sizes.dp(sourceSize.height)
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/qmldir b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/qmldir
new file mode 100644
index 00000000..99a9629b
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/panels/qmldir
@@ -0,0 +1 @@
+Vehicle2DPanel 1.0 Vehicle2DPanel.qml
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/VehicleStore.qml b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/VehicleStore.qml
new file mode 100644
index 00000000..b02850a2
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/VehicleStore.qml
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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 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 shared.com.pelagicore.remotesettings 1.0
+import shared.com.pelagicore.drivedata 1.0
+
+
+QtObject {
+ id: root
+
+ property bool leftDoorOpened: false
+ property bool rightDoorOpened: false
+ property bool trunkOpened: false
+ property real roofOpenProgress: 0.0
+ property real speed: clusterSettings.speed
+
+ readonly property UISettings uiSettings: UISettings {
+ onDoor1OpenChanged: {
+ root.leftDoorOpened = uiSettings.door1Open
+ }
+ onDoor2OpenChanged: {
+ root.rightDoorOpened = uiSettings.door2Open
+ }
+ onTrunkOpenChanged: {
+ root.trunkOpened = uiSettings.trunkOpen
+ }
+ onRoofOpenProgressChanged: {
+ root.roofOpenProgress = uiSettings.roofOpenProgress
+ }
+ }
+
+ readonly property InstrumentCluster clusterSettings: InstrumentCluster {}
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/qmldir b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/qmldir
new file mode 100644
index 00000000..213b520f
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/stores/qmldir
@@ -0,0 +1 @@
+VehicleStore 1.0 VehicleStore.qml
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/VehicleICView.qml b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/VehicleICView.qml
new file mode 100644
index 00000000..0b58a503
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/VehicleICView.qml
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.2
+
+import shared.Sizes 1.0
+
+import "../panels" 1.0
+import "../stores" 1.0
+
+Item {
+ id: root
+
+ property VehicleStore store
+
+ Vehicle2DPanel {
+ anchors.top: root.top
+ anchors.topMargin: Sizes.dp(720 - 652)
+ anchors.left: root.left
+ anchors.right: root.right
+ height: Sizes.dp(652)
+
+ leftDoorOpen: root.store.leftDoorOpened
+ rightDoorOpen: root.store.rightDoorOpened
+ trunkOpen: root.store.trunkOpened
+ roofOpen: root.store.roofOpenProgress == 1.0
+ speed: store.speed
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/qmldir b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/qmldir
new file mode 100644
index 00000000..e5d545b0
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.luxoft.vehicle-ic/views/qmldir
@@ -0,0 +1 @@
+VehicleICView 1.0 VehicleICView.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/+lucee/icon.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/+lucee/icon.png
new file mode 100644
index 00000000..9b4fe494
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/+lucee/icon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4aba024d537ac6325b36c714b04bf71d54f65e731b831193c4a63eb71ba7ada1
+size 756
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/Main.qml b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/Main.qml
new file mode 100644
index 00000000..ac56bd47
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/Main.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.Controls 2.2
+
+import QtQuick 2.9
+import QtPositioning 5.9
+
+import shared.com.pelagicore.map 1.0
+import shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+import "views" 1.0
+import "stores" 1.0
+
+Item {
+ MapStore {
+ id: store
+ }
+
+ // used for copying the offline DB
+ readonly property var _mapsHelper: MapsHelper {
+ appPath: Qt.resolvedUrl("./")
+
+ onAppPathChanged: {
+ if (appPath !== "") {
+ initMap("ic");
+ }
+ }
+ }
+
+ ICMapView {
+ id: icMapView
+ anchors.fill: parent
+ mapPlugin: store.mapPlugin
+ mapCenter: store.mapCenter
+ mapZoomLevel: store.mapZoomLevel
+ mapTilt: store.mapTilt
+ mapBearing: store.mapBearing
+ activeMapType: Style.theme === Style.Light ?
+ store.getMapType(icMapView.mapReady, store.defaultLightThemeId)
+ : store.getMapType(icMapView.mapReady, store.defaultDarkThemeId);
+
+ nextTurnDistanceMeasuredIn: store.nextTurnDistanceMeasuredIn
+ nextTurnDistance: store.nextTurnDistance
+ naviGuideDirection: store.naviGuideDirection
+
+ onMapReadyChanged: {
+ store.getAvailableMapsAndLocation(icMapView.mapReady, icMapView.supportedMapTypes);
+ }
+
+ Connections {
+ target: store
+ function onNavigationDemoActiveChanged() {
+ if (store.navigationDemoActive) {
+ icMapView.path = store.routePoints;
+ icMapView.state = "demo_driving";
+ } else {
+ icMapView.state = "initial";
+ }
+ }
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l-dark.png
new file mode 100644
index 00000000..d5383c84
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:da6621b5650fc38d61af05b7b5824d733403a6caed69012124a4c78a541907f0
+size 870
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l.png
new file mode 100644
index 00000000..788595fd
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_l.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:445d12de0c8e036abc18343f1fa1e34cd2cff0f2f012a3c7256ddd7e2318431b
+size 923
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r-dark.png
new file mode 100644
index 00000000..3ded2531
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:ec067d873d75de30164b07de9d30e139220352754ba07507638300b04d838a02
+size 878
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r.png
new file mode 100644
index 00000000..11d61ceb
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_bear_r.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:3fec1e3bb182bb8801b3f98d8adb18c3af250833de5098ed23b05f135c24830d
+size 938
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l-dark.png
new file mode 100644
index 00000000..2b90181e
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a226b2b445670415228fcd036121673aac79b0d04b903fe5f848a34d6948130b
+size 1113
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l.png
new file mode 100644
index 00000000..e7a94997
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_l.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:03d245a4a5b2b9a3ed1e0203637163f10d8ee434338ef382c42904522b84994f
+size 1167
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r-dark.png
new file mode 100644
index 00000000..51f7365d
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1eb11f5af439d5ca8f3ac483d9dbeaa37e917ce90ebe789f130fc74df65fb84d
+size 1057
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r.png
new file mode 100644
index 00000000..025190ac
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_hard_r.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:bbeace26bdc407f07485650b939f256af549b65bf4d9779e87176085d0840a3c
+size 1096
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left-dark.png
new file mode 100644
index 00000000..ce132b37
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2b178943f15563fdcf9bb4c246308d7981ebff6450f5f8a4f4b8bbc285139348
+size 848
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left.png
new file mode 100644
index 00000000..642feb9f
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_left.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4c581d4e99b5a60f33519fbcd8ef9172a294e4628287fb3735427e61aa26dd5e
+size 895
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left-dark.png
new file mode 100644
index 00000000..6f30cddf
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:85b7b65fc75cc448610ea57ab618cf4fdd1a36ddef7bb2108def83e27e4b7f9f
+size 1090
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left.png
new file mode 100644
index 00000000..ac4d8bc8
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_left.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:fd9b7c13e6c5820fcef132f957a053a7d33aeb75f94754963aae8ddd77059d73
+size 1142
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right-dark.png
new file mode 100644
index 00000000..ebc90038
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:2be3e5a99c79af84addf4030838a6bfc1d9a141c316bce125f7b9cf2fdaf03da
+size 1113
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right.png
new file mode 100644
index 00000000..70b9eaed
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_light_right.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1a26eb7dae93ff7ef4d320bb5d3f54e276ab45c0fb25f7af0f82e70689d5299c
+size 1179
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right-dark.png
new file mode 100644
index 00000000..8866c5b7
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c8eed602798517d3f439512bb3cc281deac2b5387e0573c2da9449727aee0056
+size 799
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right.png
new file mode 100644
index 00000000..564e8832
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_right.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0578ca0818dce6e8c9a775a8c1f49cbd825d2eea9e1082b466006e3904a201bf
+size 847
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight-dark.png
new file mode 100644
index 00000000..218c6a76
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:694337b302e02615c664884fa0021c448bb45d036df3d42a58b1b9bf947f6400
+size 379
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight.png
new file mode 100644
index 00000000..84946dc3
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_straight.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a48d636e373e12d7de40535ff5743cfd8f36f37b374d6dd401b312b54e52090f
+size 427
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l-dark.png
new file mode 100644
index 00000000..1f83fe92
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0b6468cd07a8d8bc8cc3b3d0b7049bb8b97a3351eef1a872531702db81ff09e1
+size 1283
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l.png
new file mode 100644
index 00000000..2554bf45
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_l.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0488de2c6e86dabdc7c4878863221730558b836eb9d5d0073a1c37e997797ef0
+size 1348
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r-dark.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r-dark.png
new file mode 100644
index 00000000..110c55a4
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r-dark.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a86f2f40fbb40a701d7135e3a302d6464893d9c84ffee6ff97109f63c9dccf18
+size 1324
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r.png
new file mode 100644
index 00000000..2b58ba7e
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/nav_uturn_r.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:b981cc2e4515117cf75b4429c617d8690240cd9084977bcea08c08862d006f11
+size 1352
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-destination.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-destination.png
new file mode 100644
index 00000000..56795361
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-destination.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:965a2a35819e13e25364dc621b8228488861f367da7b37afe470422d991bbf9e
+size 7558
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-your-position.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-your-position.png
new file mode 100644
index 00000000..f17de750
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/assets/pin-your-position.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:936b2c29a56aff78c225360aae06109ae7ac57a0ed2875873405b1be9d9d3ec1
+size 6154
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/helper.js b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/helper.js
new file mode 100644
index 00000000..a45f4bdd
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/helper.js
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** 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 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" : "";
+ return "../assets/" + asset + themeStr + '.png'
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/qmldir
new file mode 100644
index 00000000..8671f1d9
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/helpers/qmldir
@@ -0,0 +1,2 @@
+module helpers
+Helper 1.0 helper.js
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/icon.png b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/icon.png
new file mode 100644
index 00000000..807797da
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/icon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5be35d0a4dab322c2d3238ccf3dd74995042ed42fa309e4d85645ff1bc0e67a0
+size 857
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/maps/mapboxgl.db b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/maps/mapboxgl.db
new file mode 100644
index 00000000..7291d76e
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/maps/mapboxgl.db
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:67d18923a064b1102451e864010b793a412b339d7d38682abd47a5641e4fa3ca
+size 52367360
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/MapStore.qml b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/MapStore.qml
new file mode 100644
index 00000000..54659583
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/MapStore.qml
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** 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 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 QtPositioning 5.9
+import QtLocation 5.9
+import Qt.labs.platform 1.0
+import shared.utils 1.0
+
+import shared.com.pelagicore.remotesettings 1.0
+import shared.com.pelagicore.drivedata 1.0
+
+QtObject {
+ id: root
+
+ property var mapCenter: QtPositioning.coordinate(48.135771, 11.574052) // Munich
+ readonly property string defaultLightThemeId: "mapbox://styles/qtauto/cjcm1by3q12dk2sqnquu0gju9"
+ readonly property string defaultDarkThemeId: "mapbox://styles/qtauto/cjcm1czb812co2sno1ypmp1r8"
+
+ function getAvailableMapsAndLocation(mapReady, supportedMapTypes) {
+ if (mapReady) {
+ mapTypeModel.clear();
+ console.info("Supported map types:");
+ for (var i = 0; i < supportedMapTypes.length; i++) {
+ var map = supportedMapTypes[i];
+ mapTypeModel.append({"name": map.name, "data": map}) // fill the map type model
+ console.info("\t", map.name, ", description:", map.description
+ , ", style:", map.style, ", night mode:", map.night);
+ }
+ }
+ }
+
+ function getMapType(mapBoxPanelReady, name) {
+ if (!mapBoxPanelReady || !mapTypeModel.count) {
+ return
+ }
+ for (var i = 0; i < mapTypeModel.count; i++) {
+ var map = mapTypeModel.get(i);
+ if (map && map.name === name) {
+ return map.data;
+ }
+ }
+ }
+
+ function createRouteFromRaw(rawPoints) {
+ var routePath = [];
+ if (!!rawPoints) {
+ for (var i=0; i < rawPoints.length; ++i) {
+ routePath.push(QtPositioning.coordinate(rawPoints[i][0], rawPoints[i][1]));
+ }
+ }
+
+ return routePath;
+ }
+
+ // lists the various map styles (including the custom ones); filled in Map.onMapReadyChanged
+ readonly property ListModel mapTypeModel: ListModel { }
+
+ readonly property Plugin mapPlugin: Plugin {
+ preferred: ["mapboxgl", "osm"]
+ locales: Config.languageLocale
+
+ readonly property string cacheDirUrl: {
+ StandardPaths.writableLocation(StandardPaths.CacheLocation) + "/ic";
+ }
+
+ // OSM Plugin Parameters
+ PluginParameter { name: "osm.useragent"; value: "Neptune UI" }
+
+ // Mapbox Plugin Parameters
+ PluginParameter {
+ name: "mapboxgl.access_token"
+ value: "pk.eyJ1IjoicXRhdXRvIiwiYSI6ImNqY20wbDZidzBvcTQyd3J3NDlkZ21jdjUifQ"
+ +".4KYDlP7UmQEVPYffr6VuVQ"
+ }
+ PluginParameter {
+ name: "mapboxgl.mapping.additional_style_urls"
+ value: [root.defaultLightThemeId, root.defaultDarkThemeId].join(",")
+ }
+
+ // Offline maps support
+ PluginParameter {
+ name: "mapboxgl.mapping.cache.size";
+ value: "50 MiB"
+ }
+ PluginParameter {
+ name: "mapboxgl.mapping.cache.directory";
+ value: mapPlugin.cacheDirUrl.toString().substring(mapPlugin.cacheDirUrl.indexOf(':')+1)
+ }
+ }
+
+ readonly property NavigationState naviState: NavigationState {
+ id: naviState
+ onMapCenterChanged: {
+ if (naviState.mapCenter) {
+ root.mapCenter =
+ QtPositioning.coordinate(naviState.mapCenter[0], naviState.mapCenter[1]);
+ }
+ }
+ onRoutePointsChanged: root.routePoints = createRouteFromRaw(naviState.routePoints);
+ }
+
+ property var routePoints: [];
+ property bool navigationDemoActive: routePoints.length > 0;
+ property alias mapZoomLevel: naviState.mapZoomLevel;
+ property alias mapTilt: naviState.mapTilt;
+ property alias mapBearing: naviState.mapBearing;
+ property alias naviGuideDirection: naviState.nextTurn;
+ property alias nextTurnDistanceMeasuredIn: naviState.nextTurnDistanceMeasuredIn;
+ property alias nextTurnDistance: naviState.nextTurnDistance;
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/qmldir
new file mode 100644
index 00000000..ff52f7a6
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/stores/qmldir
@@ -0,0 +1 @@
+MapStore 1.0 MapStore.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/ICMapView.qml b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/ICMapView.qml
new file mode 100644
index 00000000..111259aa
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/ICMapView.qml
@@ -0,0 +1,188 @@
+/****************************************************************************
+**
+** 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 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 QtLocation 5.9
+import QtPositioning 5.14
+import QtQuick.Controls 2.13
+
+import shared.animations 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+import "../helpers" 1.0
+
+Item {
+ id: root
+
+ property alias mapCenter: mainMap.center
+ property alias mapZoomLevel: mainMap.zoomLevel
+ property alias mapTilt: mainMap.tilt
+ property alias mapBearing: mainMap.bearing
+ property alias mapReady: mainMap.mapReady
+ property alias activeMapType: mainMap.activeMapType
+ property alias supportedMapTypes: mainMap.supportedMapTypes
+ property var path
+ property var mapPlugin
+
+
+ property string nextTurnDistanceMeasuredIn
+ property real nextTurnDistance
+ property string naviGuideDirection
+
+ state: "initial"
+ states: [
+ State {
+ // just a map w/o any additional items in it
+ name: "initial"
+ PropertyChanges {
+ target: posMarker
+ coordinate: QtPositioning.coordinate()
+ rotation: 0.0
+ visible: false
+ }
+ PropertyChanges {
+ target: destMarker
+ visible: false
+ coordinate: QtPositioning.coordinate()
+ }
+ PropertyChanges {
+ target: pathView
+ visible: false
+ path: []
+ }
+ },
+ State {
+ name: "demo_driving"
+ PropertyChanges {
+ target: posMarker
+ coordinate: root.mapCenter
+ rotation: 0.0
+ visible: true
+ }
+ PropertyChanges {
+ target: destMarker
+ visible: true
+ coordinate: root.path[root.path.length - 1]
+ }
+ PropertyChanges {
+ target: pathView
+ visible: true
+ path: root.path
+ }
+ PropertyChanges {
+ target: instructions
+ visible: root.naviGuideDirection !== ""
+ }
+ }
+ ]
+
+ Map {
+ id: mainMap
+ anchors.fill: parent
+ enabled: false
+ Behavior on tilt { DefaultSmoothedAnimation {} }
+ zoomLevel: 10
+ plugin: root.mapPlugin
+ copyrightsVisible: false
+
+ MapPolyline {
+ id: pathView
+ line.color: Style.accentColor
+ line.width: Sizes.dp(8)
+ smooth: true
+ opacity: Style.opacityHigh
+ }
+
+ MapQuickItem {
+ id: destMarker
+ anchorPoint: Qt.point(markerImage.width * 0.5, markerImage.height * 0.8)
+ sourceItem: Image {
+ id: markerImage
+ source: Qt.resolvedUrl("../assets/pin-destination.png")
+ width: Sizes.dp(69.5) // half size of the source
+ height: Sizes.dp(80.5)
+ }
+ }
+
+ Item {
+ id: instructions
+ visible: false
+ anchors.top: posMarker.bottom
+ anchors.topMargin: Sizes.dp(100)
+ anchors.horizontalCenter: posMarker.horizontalCenter
+ width: Sizes.dp(660)
+ height: Sizes.dp(100)
+
+ Rectangle {
+ anchors.fill: parent
+ opacity: 0.5
+ color: Style.theme === Style.Dark ? "black" : "white"
+ radius: 10
+ }
+
+ Label {
+ width: Sizes.dp(400)
+ height: Sizes.dp(100)
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: Sizes.dp(30)
+ opacity: 0.9
+ font.pixelSize: Sizes.fontSizeXL
+ font.bold: true
+ verticalAlignment: Text.AlignVCenter
+ text: qsTr("Next turn: ") + root.nextTurnDistance
+ + " " + root.nextTurnDistanceMeasuredIn
+ }
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: Sizes.dp(30)
+ source: root.naviGuideDirection !== ""
+ ? Helper.localAsset(root.naviGuideDirection, Style.theme)
+ : ""
+ }
+ }
+
+ MapQuickItem {
+ id: posMarker
+ anchorPoint: Qt.point(posImage.width * 0.5, posImage.height * 0.5)
+ sourceItem: Image {
+ id: posImage
+ source: Qt.resolvedUrl("../assets/pin-your-position.png")
+ width: Sizes.dp(58) // half size of the source
+ height: Sizes.dp(67.5)
+ }
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/qmldir
new file mode 100644
index 00000000..1f059387
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.map-ic/views/qmldir
@@ -0,0 +1 @@
+ICMapView 1.0 ICMapView.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/Main.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/Main.qml
new file mode 100644
index 00000000..89acf5d7
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/Main.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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 QtQuick.Controls 2.2
+
+import shared.Sizes 1.0
+
+import "stores" 1.0
+import "views" 1.0
+
+Item {
+ id: root
+ ICMusicView {
+ id: icMusicView
+ anchors.fill: parent
+ store: MusicStore {}
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/+lucee/TitleColumn.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/+lucee/TitleColumn.qml
new file mode 100644
index 00000000..6a177dfc
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/+lucee/TitleColumn.qml
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** 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 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 QtQuick.Controls 2.2
+import QtQuick.Layouts 1.2
+
+import shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+ColumnLayout {
+ id: root
+ spacing: Sizes.dp(15)
+
+ property int preferredWidth: Sizes.dp(240)
+ property alias currentSongTitle: songTitle.text
+ property alias currentArtisName: artistName.text
+ property alias currentAlbumName: albumName.text
+
+ property bool alignHorizontal: false
+
+ Label {
+ id: songTitle
+ Layout.preferredWidth: root.width
+ wrapMode: Text.WordWrap
+ font.weight: Font.Normal
+ font.pixelSize: Sizes.dp(40)
+ maximumLineCount: 2
+ horizontalAlignment: alignHorizontal ? Text.AlignHCenter : Text.AlignLeft
+ elide: Text.ElideRight
+ }
+
+ Label {
+ id: artistName
+ Layout.preferredWidth: root.width
+ wrapMode: Text.WordWrap
+ font.pixelSize: Sizes.dp(26)
+ font.weight: Font.Normal
+ visible: text !== ""
+ maximumLineCount: 1
+ horizontalAlignment: alignHorizontal ? Text.AlignHCenter : Text.AlignLeft
+ elide: Text.ElideRight
+ }
+
+ Label {
+ id: albumName
+ Layout.preferredWidth: root.width
+ wrapMode: Text.WordWrap
+ font.pixelSize: Sizes.dp(20)
+ visible: text !== ""
+ opacity: Style.opacityMedium
+ maximumLineCount: 1
+ horizontalAlignment: alignHorizontal ? Text.AlignHCenter : Text.AlignLeft
+ elide: Text.ElideRight
+
+ }
+}
+
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/MusicProgress.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/MusicProgress.qml
new file mode 100644
index 00000000..93f4f4ea
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/MusicProgress.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** 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 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 QtQuick.Controls 2.2
+
+import shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+Control {
+ id: root
+
+ property bool clusterView: false
+ property bool labelOnTop: true
+ property string progressText: "0:0 / 0:0"
+ property real value // 0 <= value <=1
+ property int progressBarLabelLeftMargin: Sizes.dp(10)
+ readonly property int progressBarWidth: root.width - (root.labelOnTop
+ ? Sizes.dp(6) : Sizes.dp(5))
+
+ signal updatePosition(var value)
+
+ contentItem: Item {
+ anchors.fill: root
+ Label {
+ id: progressLabel
+ anchors.top: parent.top
+ anchors.topMargin: root.labelOnTop ? Sizes.dp(48) : 0
+ anchors.left: parent.left
+ anchors.leftMargin: root.progressBarLabelLeftMargin
+ font.pixelSize: Sizes.fontSizeS
+ text: root.progressText
+ opacity: Style.opacityMedium
+ }
+
+ ProgressBar {
+ id: progressBar
+ implicitWidth: root.progressBarWidth
+ implicitHeight: Sizes.dp(8)
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: Sizes.dp(-24)
+ anchors.horizontalCenterOffset: root.labelOnTop ? 0 : Sizes.dp(90)
+ value: root.value
+ }
+
+ MouseArea {
+ width: parent.width
+ height: Sizes.dp(50)
+ anchors.centerIn: progressBar
+ enabled: !root.clusterView
+ onPressed: {
+ var newValue = LayoutMirroring.enabled ? ((1 - mouseX / root.width)) : (mouseX / root.width);
+ root.updatePosition(newValue);
+ }
+ }
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/TitleColumn.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/TitleColumn.qml
new file mode 100644
index 00000000..d16602aa
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/TitleColumn.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** 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 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 QtQuick.Controls 2.2
+import QtQuick.Layouts 1.2
+
+import shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+ColumnLayout {
+ id: root
+ spacing: Sizes.dp(15)
+
+ property int preferredWidth: Sizes.dp(240)
+ property alias currentSongTitle: songTitle.text
+ property alias currentArtisName: artistName.text
+
+ Label {
+ id: songTitle
+ Layout.preferredWidth: root.width
+ wrapMode: Text.WordWrap
+ font.weight: Font.Light
+ maximumLineCount: 2
+ elide: Text.ElideRight
+ }
+
+ Label {
+ id: artistName
+ Layout.preferredWidth: root.width
+ wrapMode: Text.WordWrap
+ font.pixelSize: Sizes.fontSizeS
+ visible: text !== ""
+ opacity: Style.opacityMedium
+ maximumLineCount: 1
+ elide: Text.ElideRight
+ }
+}
+
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/qmldir
new file mode 100644
index 00000000..09b47c0b
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/controls/qmldir
@@ -0,0 +1,2 @@
+MusicProgress 1.0 MusicProgress.qml
+TitleColumn 1.0 TitleColumn.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/icon.png b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/icon.png
new file mode 100644
index 00000000..e0176b92
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/icon.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:98297ae069ab8ac243aeedc49fb5a0c90e7c156803e3e9ba75ee1ff1a0ea7abe
+size 709
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/ICAlbumArtPanel.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/ICAlbumArtPanel.qml
new file mode 100644
index 00000000..f525bd9a
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/ICAlbumArtPanel.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** 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 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 shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+import "../controls" 1.0
+
+Item {
+ id: root
+
+ property bool musicPlaying: false
+ property real musicPosition: 0.0
+ property alias currentSongTitle: titleColumn.currentSongTitle
+ property alias currentArtisName: titleColumn.currentArtisName
+ property alias currentProgressLabel: musicProgress.progressText
+
+ TitleColumn {
+ id: titleColumn
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ anchors.topMargin: Sizes.dp(140)
+ }
+
+ MusicProgress {
+ id: musicProgress
+ width: root.width
+ height: Sizes.dp(100)
+ anchors.top: titleColumn.bottom
+ anchors.topMargin: Sizes.dp(10)
+ anchors.leftMargin: Sizes.dp(40)
+ anchors.rightMargin: Sizes.dp(40)
+ value: root.musicPosition
+ progressBarLabelLeftMargin: 3
+ clusterView: true
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/qmldir
new file mode 100644
index 00000000..92edda7e
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/panels/qmldir
@@ -0,0 +1 @@
+ICAlbumArtPanel 1.0 ICAlbumArtPanel.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/MusicStore.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/MusicStore.qml
new file mode 100644
index 00000000..50d0a64f
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/MusicStore.qml
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** 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 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 QtIvi 1.0
+import QtIvi.Media 1.0
+
+import shared.utils 1.0
+
+Store {
+ id: root
+
+ property alias musicPlaylist: player.playQueue
+ property int musicCount: player.playQueue.count
+
+ property MediaPlayer player: MediaPlayer { id: player }
+ property var currentEntry: player.currentTrack;
+ property bool playing: player.playState === MediaPlayer.Playing
+ property bool shuffleOn: player.playMode === MediaPlayer.Shuffle
+ property bool repeatOn: player.playMode === MediaPlayer.RepeatTrack
+ property string elapsedTime: Qt.formatTime(new Date(player.position), 'mm:ss')
+ property string totalTime: Qt.formatTime(new Date(player.duration), 'mm:ss')
+ property real currentTrackPosition : player.position / player.duration
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/qmldir
new file mode 100644
index 00000000..59cb9371
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/stores/qmldir
@@ -0,0 +1 @@
+MusicStore 1.0 MusicStore.qml
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/ICMusicView.qml b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/ICMusicView.qml
new file mode 100644
index 00000000..11dafa03
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/ICMusicView.qml
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** 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 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 shared.utils 1.0
+import shared.Style 1.0
+import shared.Sizes 1.0
+
+import "../stores" 1.0
+import "../panels" 1.0
+
+Item {
+ id: root
+
+ property MusicStore store
+
+ Image {
+ anchors.fill: parent
+ source: Style.image("instrument-cluster-bg")
+ fillMode: Image.Stretch
+ }
+
+ ICAlbumArtPanel {
+ id: albumArt
+ width: Sizes.dp(540)
+ height: Sizes.dp(464)
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: Sizes.dp(50)
+ musicPlaying: root.store.playing
+ musicPosition: root.store.currentTrackPosition
+ currentSongTitle: root.store.currentEntry
+ ? root.store.currentEntry.title
+ : qsTr("Track unavailable")
+ currentArtisName: root.store.currentEntry ? root.store.currentEntry.artist : ""
+ currentProgressLabel: root.store.elapsedTime + " / " + root.store.totalTime
+ }
+}
diff --git a/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/qmldir b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/qmldir
new file mode 100644
index 00000000..68ca7e17
--- /dev/null
+++ b/src/neptune-cluster-app/apps/com.pelagicore.music-ic/views/qmldir
@@ -0,0 +1 @@
+ICMusicView 1.0 ICMusicView.qml
diff --git a/src/neptune-cluster-app/main.cpp b/src/neptune-cluster-app/main.cpp
new file mode 100644
index 00000000..abc64db2
--- /dev/null
+++ b/src/neptune-cluster-app/main.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2019-2020 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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
+**
+****************************************************************************/
+
+#include <QtGlobal>
+#include <QtGui/QGuiApplication>
+#include <QtGui/QIcon>
+#include <QtGui/QOpenGLContext>
+#include <QtQml/QQmlApplicationEngine>
+#include <QtCore/QLoggingCategory>
+#include <QtCore/QDir>
+#include <QtCore/QString>
+#include <QtCore/QCommandLineParser>
+
+#ifdef STUDIO3D_RUNTIME_INSTALLED
+ #include <qstudio3dglobal.h>
+#endif
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QCoreApplication::setApplicationName(QStringLiteral("Neptune Cluster"));
+ QCoreApplication::setOrganizationName(QStringLiteral("Luxoft Sweden AB"));
+ QCoreApplication::setOrganizationDomain(QStringLiteral("luxoft.com"));
+ QCoreApplication::setApplicationVersion("0.1");
+ QGuiApplication app(argc, argv);
+ // force application path, it'll update @load_path and others
+ QDir::setCurrent(qApp->applicationDirPath());
+
+ // @todo: add -c config file option and config file for it (json, xml, etc)
+ QCommandLineParser cmdParser;
+ cmdParser.setApplicationDescription(
+ "Neptune Cluster\n\n"
+ "Logging is turned off by default, to control log output please check command line "
+ "options or Qt Help for QT_LOGGING_RULES environment variable.\n");
+ cmdParser.addHelpOption();
+ cmdParser.addVersionOption();
+ const QCommandLineOption enableDefaultLoggingOption("verbose",
+ "Enables default Qt logging filter.");
+ cmdParser.addOption(enableDefaultLoggingOption);
+ cmdParser.process(app);
+ if (!cmdParser.isSet(enableDefaultLoggingOption)) {
+ QLoggingCategory::setFilterRules("*=false");
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_STYLE_PATH")) {
+ qputenv("QT_QUICK_CONTROLS_STYLE_PATH"
+ , (QCoreApplication::applicationDirPath() + QStringLiteral("/styles")).toLocal8Bit());
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_CONF")) {
+ qputenv("QT_QUICK_CONTROLS_CONF", (QCoreApplication::applicationDirPath()
+ + QStringLiteral("/styles/neptune/style.conf")).toLocal8Bit());
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_QUICK_CONTROLS_ICON_PATH")) {
+ qputenv("QT_QUICK_CONTROLS_ICON_PATH", (QCoreApplication::applicationDirPath()
+ + QStringLiteral("/imports_shared/assets/icons")).toLocal8Bit());
+ }
+
+ if (!qEnvironmentVariableIsSet("SERVER_CONF_PATH")) {
+ qputenv("SERVER_CONF_PATH", (QCoreApplication::applicationDirPath()
+ + QStringLiteral("/server.conf")).toLocal8Bit());
+ }
+
+ if (!qEnvironmentVariableIsSet("QT_STYLE_OVERRIDE")) {
+ qputenv("QT_STYLE_OVERRIDE", QStringLiteral("neptune").toLocal8Bit());
+ }
+
+#ifdef STUDIO3D_RUNTIME_INSTALLED
+ QSurfaceFormat::setDefaultFormat(Q3DS::surfaceFormat());
+#endif
+
+ QQmlApplicationEngine engine;
+ engine.addImportPath(QDir::currentPath()+QStringLiteral("/imports_shared/"));
+ engine.load(QStringLiteral("neptune-cluster/main.qml"));
+ if (engine.rootObjects().isEmpty())
+ return -1;
+
+ return app.exec();
+}
diff --git a/src/neptune-cluster-app/main.qml b/src/neptune-cluster-app/main.qml
new file mode 100644
index 00000000..51cfd694
--- /dev/null
+++ b/src/neptune-cluster-app/main.qml
@@ -0,0 +1,100 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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.12
+import QtQuick.Window 2.12
+
+import shared.Style 1.0
+import shared.Sizes 1.0
+import "../apps/com.theqtcompany.cluster/stores" 1.0
+import "../apps/com.theqtcompany.cluster/views" 1.0
+
+Window {
+ id: root
+ visible: true
+ width: 1920
+ height: 1080
+ title: qsTr("Cluster")
+ color: "black"
+
+ readonly property real mockedWindowsAcpectRatio: 1920 / 720
+ Component.onCompleted: {
+ root.Style.theme = Style.Dark;
+ }
+
+ ClusterRootStore {
+ id:clrst
+ devMode: true
+ }
+
+ Connections {
+ target: clrst.uiSettings
+ function onThemeChanged() { root.Style.theme = clrst.uiSettings.theme }
+ function onAccentColorChanged() { root.Style.accentColor = clrst.uiSettings.accentColor }
+ }
+
+ MockedWindows {
+ id: mockedWindows
+
+ clip: true
+ height: Math.floor(root.width / mockedWindowsAcpectRatio) <= root.height
+ ? root.width / mockedWindowsAcpectRatio
+ : root.height;
+ width: height * mockedWindowsAcpectRatio
+
+ onWidthChanged: {
+ root.Sizes.scale = mockedWindows.width / 1920;
+ }
+
+ anchors.centerIn: parent
+
+ ClusterView {
+ rtlMode: clrst.uiSettings.rtlMode
+ anchors.fill: parent
+ store: clrst;
+ }
+
+ Image {
+ z: -1
+ anchors.fill: parent
+ source: Style.image("instrument-cluster-bg")
+ fillMode: Image.Stretch
+ }
+ }
+
+ Launcher {
+ id:lnch
+ z: 2
+ anchors.top: mockedWindows.top
+ anchors.horizontalCenter: mockedWindows.horizontalCenter
+ onAppClicked: mockedWindows.runApp(appUrl)
+ }
+}
diff --git a/src/neptune-cluster-app/neptune-cluster-app.pro b/src/neptune-cluster-app/neptune-cluster-app.pro
new file mode 100644
index 00000000..154c5fe4
--- /dev/null
+++ b/src/neptune-cluster-app/neptune-cluster-app.pro
@@ -0,0 +1,48 @@
+requires(linux|macos) # @todo add win
+
+TEMPLATE = app
+TARGET = neptune-cluster-app
+QT *= quick gui core ivicore
+
+isEmpty(INSTALL_PREFIX) {
+ INSTALL_PREFIX=/opt
+}
+
+# check ogl-runtime
+qtHaveModule(studio3d) {
+ QT *= studio3d
+ DEFINES *= STUDIO3D_RUNTIME_INSTALLED
+}
+
+CONFIG += c++11
+macos: CONFIG -= app_bundle
+
+DESTDIR = $$OUT_PWD/../../
+
+QMAKE_RPATHDIR += $$QMAKE_REL_RPATH_BASE/$$relative_path($$INSTALL_PREFIX/neptune3/lib, $$INSTALL_PREFIX/neptune3/)
+LIBS += -L$$LIB_DESTDIR -l$$qtLibraryTarget(remotesettings) -l$$qtLibraryTarget(drivedata)
+
+SOURCES += \
+ main.cpp
+
+OTHER_FILES += $$files($$PWD/*.qml, true)
+
+target.path = $$INSTALL_PREFIX/neptune3
+
+installFiles.files = $$files($$PWD/*.qml, false) apps
+installFiles.path = $$INSTALL_PREFIX/neptune3/neptune-cluster/
+installFiles.CONFIG += no_check_exist
+
+INSTALLS += target installFiles
+
+# copy files in neptune-cluster-app build folder
+FILES = main.qml ClusterRootStore.qml MockedWindows.qml Launcher.qml
+do_copydata.commands += $(MKDIR) $$shell_path($$DESTDIR/neptune-cluster) $$escape_expand(\n\t)
+for (f , FILES) {
+ do_copydata.commands += $(COPY) $$shell_path($$PWD/$${f}) $$shell_path($$DESTDIR/neptune-cluster/) $$escape_expand(\n\t)
+}
+
+do_copydata.commands += $(COPY_DIR) $$shell_path($$PWD/apps) $$shell_path($$DESTDIR/neptune-cluster/) $$escape_expand(\n\t)
+
+first.depends = do_copydata
+QMAKE_EXTRA_TARGETS += first do_copydata
diff --git a/src/neptune3-ui-qsr-cluster/main.cpp b/src/neptune3-ui-qsr-cluster/main.cpp
index f2b2965b..9a9627b2 100644
--- a/src/neptune3-ui-qsr-cluster/main.cpp
+++ b/src/neptune3-ui-qsr-cluster/main.cpp
@@ -37,6 +37,7 @@ functional safety standards and it depends on Qt classes.
You should not use this example in production environment.
*/
#include <QtGui>
+#include <QtGui/QFontDatabase>
#include <QtSafeRenderer/qsafelayout.h>
#include <QtSafeRenderer/qsafechecksum.h>
@@ -51,25 +52,42 @@ int main(int argc, char **argv)
{
QGuiApplication app(argc, argv);
+ QFontDatabase::addApplicationFont("imports_shared/assets/fonts/DejaVuSans.ttf");
+
QDir::setCurrent(qApp->applicationDirPath());
SafeRenderer::QSafeLayoutFileReader layout("qsr-safelayout/SafeTelltalesPanel.srl");
- //Demo case, update window position on Cluster window move
- QSettings settings(QStringLiteral("Luxoft Sweden AB"), QStringLiteral("QSRCluster"));
- bool stickToCluster = settings.value(QStringLiteral("gui/stick_to_cluster"), true).toBool();
+ //Demo case, update window position on non-Safe UI cluster window position change and resize
+ bool stickToCluster = false;
+ if (SafeWindow::isRunningOnDesktop()) {
+ QSettings settings(QStringLiteral("Luxoft Sweden AB"), QStringLiteral("QSRCluster"));
+ stickToCluster = settings.value(QStringLiteral("gui/stick_to_cluster"), true).toBool();
+ }
SafeRenderer::QSafeSize screenSize;
if (stickToCluster) {
- screenSize.setWidth(layout.size().width());
- screenSize.setHeight(layout.size().height());
+ // Demo Desktop case
+ // if layout doesn't fit on screen -> resize it to fit for the startup
+ // as we don't have info about non-safe UI window size and also avoid snapping on
+ // screen edges (it won't be possible to move or resize window)
+ QSize availSize = qApp->primaryScreen()->availableSize();
+ if (availSize.width() < layout.size().width() * 1.1
+ || availSize.height() < layout.size().height() * 1.1) {
+ QSize windowSize(layout.size().width(), layout.size().height());
+ windowSize.scale(availSize * 0.9, Qt::KeepAspectRatio);
+ screenSize.setWidth(windowSize.width());
+ screenSize.setHeight(windowSize.height());
+ } else {
+ screenSize.setWidth(layout.size().width());
+ screenSize.setHeight(layout.size().height());
+ }
} else {
screenSize.setWidth(static_cast<SafeRenderer::quint32>(qApp->primaryScreen()->size().width()));
screenSize.setHeight(static_cast<SafeRenderer::quint32>(qApp->primaryScreen()->size().height()));
}
- SafeWindow telltaleWindow(screenSize, layout.size());
- telltaleWindow.setFlag(Qt::WindowDoesNotAcceptFocus, true);
+ SafeWindow telltaleWindow(screenSize, layout.size(), stickToCluster);
NeptuneSafeStateManager stateManager(telltaleWindow, layout);
@@ -98,6 +116,8 @@ int main(int argc, char **argv)
if (stickToCluster) {
QObject::connect(&msgHandler, &TcpMsgHandler::mainWindowPosGot, &telltaleWindow, &SafeWindow::moveWindow);
+ QObject::connect(&msgHandler, &TcpMsgHandler::mainWindowPanelSizeGot, &telltaleWindow, &SafeWindow::resizeWindow);
+ QObject::connect(&msgHandler, &TcpMsgHandler::mainWindowPanelOriginGot, &telltaleWindow, &SafeWindow::applyPanelOrigin);
}
//Remote settings server client
diff --git a/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster.pro b/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster.pro
index f719c071..e67bfe3d 100644
--- a/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster.pro
+++ b/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster.pro
@@ -9,7 +9,18 @@ else: target.path = $$INSTALL_PREFIX/neptune3
INSTALLS += target
CONFIG += exceptions c++11
-macos: CONFIG -= app_bundle
+macos: {
+ CONFIG -= app_bundle
+ SOURCES += safewindow_mac.mm
+ HEADERS += safewindow_mac.h
+}
+
+win32 {
+ wrapper.files = neptune3-ui-qsr-cluster_wrapper.bat
+ wrapper.path = $$INSTALL_PREFIX/neptune3
+ INSTALLS += wrapper
+ LIBS += -lUser32
+}
QT = core gui qtsaferenderer network ivicore
@@ -18,7 +29,7 @@ LIBS += -L$$LIB_DESTDIR -l$$qtLibraryTarget(remotesettings) -l$$qtLibraryTarget(
INCLUDEPATH += $$OUT_PWD/../drivedata/frontend
INCLUDEPATH += $$OUT_PWD/../remotesettings/frontend
-SOURCES = main.cpp \
+SOURCES += main.cpp \
icsettingshandler.cpp \
neptunesafestatemanager.cpp \
safewindow.cpp \
diff --git a/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster_wrapper.bat b/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster_wrapper.bat
new file mode 100644
index 00000000..5e9f3211
--- /dev/null
+++ b/src/neptune3-ui-qsr-cluster/neptune3-ui-qsr-cluster_wrapper.bat
@@ -0,0 +1,37 @@
+@echo off
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Copyright (C) 2020 Luxoft Sweden AB
+:: Contact: https://www.qt.io/licensing/
+::
+:: This file is part of the Neptune 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
+::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+SetLocal EnableDelayedExpansion
+set WRAPPER_PWD=%~dp0
+set PATH=%WRAPPER_PWD%\..\bin;%WRAPPER_PWD%\..\..\..\Tools\OpenSSL\Win_x64\bin;%PATH%
+%WRAPPER_PWD%\neptune3-ui-qsr-cluster %*
+EndLocal
diff --git a/src/neptune3-ui-qsr-cluster/safewindow.cpp b/src/neptune3-ui-qsr-cluster/safewindow.cpp
index cf305bd3..4901caf4 100644
--- a/src/neptune3-ui-qsr-cluster/safewindow.cpp
+++ b/src/neptune3-ui-qsr-cluster/safewindow.cpp
@@ -30,20 +30,65 @@
****************************************************************************/
#include "safewindow.h"
+#ifdef Q_OS_MACOS
+ #include "safewindow_mac.h"
+#endif
-SafeWindow::SafeWindow(const SafeRenderer::QSafeSize &size, const SafeRenderer::QSafeSize &frameSize,
+SafeWindow::SafeWindow(const SafeRenderer::QSafeSize &size,
+ const SafeRenderer::QSafeSize &frameSize, bool stickToCluster,
QWindow *parent)
:QWindow(parent)
,AbstractWindow(size)
,m_buffer(frameSize)
+ ,m_transparent(qgetenv("QSR_FILL_BLACK_BACKGROUND").isNull())
+ ,m_stickToCluster(stickToCluster)
{
resize(size.width(), size.height());
- m_transparent = qgetenv("QSR_FILL_BLACK_BACKGROUND").isNull();
+ if (m_stickToCluster) {
+ #ifdef Q_OS_LINUX
+ // KDE desktop runs Plasma, which doesn't allow in our case rise qsr window,
+ // that's why qsr window stays under non-safe UI window.
+ // For KDE we set for window stay-on-top flag which solves described issue.
+ // Interacting without this flag is a bit more comfortable, so we leave it for other
+ // environments
+ const QString desktopEnvironment = QString(qgetenv("DESKTOP_SESSION")).toLower();
+ if (desktopEnvironment.contains(QStringLiteral("plasma"))
+ || desktopEnvironment.contains(QStringLiteral("kde"))) {
+ setFlag(Qt::WindowStaysOnTopHint);
+ }
+ #endif
+
+ // Desktop demo case: center on the screen on start
+ setPosition(qApp->primaryScreen()->availableGeometry().x()
+ + (qApp->primaryScreen()->availableGeometry().width() - size.width()) / 2,
+ qApp->primaryScreen()->availableGeometry().y()
+ + (qApp->primaryScreen()->availableGeometry().height() - size.height()) / 2);
+ }
//to run on KMS/DRM on NUC set transparent to false
//otherwise nothing will be shown
if (m_transparent) {
+ #ifdef Q_OS_MACOS
+ // Need to call native Obj-C method to make window
+ // transparent om Mac QTBUG-77637
+ SafeWindowMac::setWindowTransparent(reinterpret_cast<void*>(this->winId()));
+ #endif
+ #ifdef Q_OS_WIN32
+ // QWindow doesn't allow making window background transparent on Windows,
+ // we have to use native calls to set black color as transparent.
+ // We make window stay on top as rise() function doesn't work as it does on
+ // macOS and Linux platforms (still remains under cluster window)
+ this->setFlag(Qt::WindowStaysOnTopHint);
+ this->setFlag(Qt::WindowTitleHint);
+ this->setFlag(Qt::WindowSystemMenuHint);
+ this->setFlag(Qt::WindowCloseButtonHint);
+
+ HWND hwnd = reinterpret_cast<HWND>(this->winId());
+ SetWindowLong(hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
+ SetLayeredWindowAttributes(hwnd, 0, 0, LWA_COLORKEY);
+ #endif
+
QSurfaceFormat fmt = format();
fmt.setAlphaBufferSize(8);
setFormat(fmt);
@@ -53,6 +98,14 @@ SafeWindow::SafeWindow(const SafeRenderer::QSafeSize &size, const SafeRenderer::
m_backingStore = new QBackingStore(this);
}
+bool SafeWindow::isRunningOnDesktop() {
+#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
+ return true;
+#else
+ return qApp->platformName() == QStringLiteral("xcb");
+#endif
+}
+
bool SafeWindow::event(QEvent *event)
{
if (event->type() == QEvent::UpdateRequest) {
@@ -80,7 +133,7 @@ void SafeWindow::exposeEvent(QExposeEvent *)
void SafeWindow::render(const SafeRenderer::Rect &dirtyArea)
{
- (void)dirtyArea;
+ Q_UNUSED(dirtyArea)
renderNow();
}
@@ -106,18 +159,55 @@ void SafeWindow::renderNow()
void SafeWindow::render(QPainter *painter)
{
- int x = (width() - m_buffer.image().width()) / 2;
- int y = (height() - m_buffer.image().height()) / 2;
-
- QRect rect(x, y, m_buffer.image().width(), m_buffer.image().height());
- painter->drawImage(rect, m_buffer.image());
+ if (m_stickToCluster) {
+ // Desktop demo case: fit frame to window
+ QRect rect(0, 0, width(), height());
+ painter->setRenderHint(QPainter::SmoothPixmapTransform, true);
+ painter->drawImage(rect, m_buffer.image(), m_buffer.image().rect());
+ } else {
+ // Center qsr rendered frame inside window
+ int x = (width() - m_buffer.image().width()) / 2;
+ int y = (height() - m_buffer.image().height()) / 2;
+
+ QRect rect(x, y, m_buffer.image().width(), m_buffer.image().height());
+ painter->drawImage(rect, m_buffer.image());
+ }
}
void SafeWindow::moveWindow(int x, int y)
{
+ m_rootWindowX = x;
+ m_rootWindowY = y;
+
+ setWindowState(Qt::WindowNoState);
+ setPosition(m_rootWindowX + m_panelOriginX, m_rootWindowY + m_panelOriginY);
+ raise();
+ requestActivate();
+}
+
+void SafeWindow::resizeWindow(int width, int height)
+{
+ if (width <= 0 || height <= 0)
+ return;
+
+ setWindowState(Qt::WindowNoState);
+ resize(width, height);
+ raise();
+ requestActivate();
+}
+
+void SafeWindow::applyPanelOrigin(int dx, int dy)
+{
+ m_panelOriginX = dx;
+ m_panelOriginY = dy;
+
setWindowState(Qt::WindowNoState);
- setPosition(x, y);
+ setPosition(m_rootWindowX + m_panelOriginX, m_rootWindowY + m_panelOriginY);
raise();
requestActivate();
}
+SafeRenderer::AbstractFrameBuffer *SafeWindow::buffer()
+{
+ return &m_buffer;
+}
diff --git a/src/neptune3-ui-qsr-cluster/safewindow.h b/src/neptune3-ui-qsr-cluster/safewindow.h
index 853cffd9..50d5d60f 100644
--- a/src/neptune3-ui-qsr-cluster/safewindow.h
+++ b/src/neptune3-ui-qsr-cluster/safewindow.h
@@ -82,21 +82,31 @@ class SafeWindow : public QWindow, public SafeRenderer::AbstractWindow
{
Q_OBJECT
public:
- explicit SafeWindow(const SafeRenderer::QSafeSize &size,
- const SafeRenderer::QSafeSize &frameSize, QWindow *parent = 0);
+ SafeWindow(const SafeRenderer::QSafeSize &size,
+ const SafeRenderer::QSafeSize &frameSize,
+ bool stickToCluster, QWindow *parent = 0);
virtual void render(QPainter *painter);
//Window
- virtual void render(const SafeRenderer::Rect &dirtyArea);
- virtual SafeRenderer::AbstractFrameBuffer *buffer() {
- return &m_buffer;
- }
+ virtual void render(const SafeRenderer::Rect &dirtyArea) override;
+ virtual SafeRenderer::AbstractFrameBuffer *buffer() override;
+
+ // Copies behavior of QtApplicationManager to decide if we are running on Desktop
+ static bool isRunningOnDesktop();
public slots:
void renderLater();
void renderNow();
+ // Apply cluster widow position
+ // Used when running on Desktop
void moveWindow(int x, int y);
+ // Apply cluster panel width and height to window size
+ // Used when running on Desktop
+ void resizeWindow(int width, int weight);
+ // Apply cluster panel position inside cluster window
+ // Used when running on desktop
+ void applyPanelOrigin(int dx, int dy);
protected:
bool event(QEvent *event) override;
@@ -108,6 +118,10 @@ private:
QBackingStore *m_backingStore;
ScreenBuffer m_buffer;
bool m_transparent;
+ int m_rootWindowX{0};
+ int m_rootWindowY{0};
+ int m_panelOriginX{0};
+ int m_panelOriginY{0};
+ bool m_stickToCluster;
};
-
-#endif // RASTERWINDOW_H
+#endif // SAFEWINDOW_H
diff --git a/src/neptune3-ui-qsr-cluster/safewindow_mac.h b/src/neptune3-ui-qsr-cluster/safewindow_mac.h
new file mode 100644
index 00000000..a4f3fbba
--- /dev/null
+++ b/src/neptune3-ui-qsr-cluster/safewindow_mac.h
@@ -0,0 +1,38 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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
+**
+****************************************************************************/
+
+#ifndef SAFEWINDOW_MAC_H
+#define SAFEWINDOW_MAC_H
+ class SafeWindowMac {
+ public:
+ static void setWindowTransparent(void *view);
+ };
+#endif
diff --git a/src/neptune3-ui-qsr-cluster/safewindow_mac.mm b/src/neptune3-ui-qsr-cluster/safewindow_mac.mm
new file mode 100644
index 00000000..52aea06a
--- /dev/null
+++ b/src/neptune3-ui-qsr-cluster/safewindow_mac.mm
@@ -0,0 +1,39 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 Luxoft Sweden AB
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Neptune 3 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
+**
+****************************************************************************/
+
+#include "safewindow_mac.h"
+#import <Appkit/AppKit.h>
+
+void SafeWindowMac::setWindowTransparent(void *view)
+{
+ NSWindow *nsWindow = (static_cast<NSView *>(view)).window;
+ nsWindow.backgroundColor = NSColor.clearColor;
+}
diff --git a/src/neptune3-ui-qsr-cluster/tcpmsghandler.cpp b/src/neptune3-ui-qsr-cluster/tcpmsghandler.cpp
index 24875144..4954f709 100644
--- a/src/neptune3-ui-qsr-cluster/tcpmsghandler.cpp
+++ b/src/neptune3-ui-qsr-cluster/tcpmsghandler.cpp
@@ -153,12 +153,27 @@ void TcpMsgHandler::readData()
}
if (event.type() == SafeRenderer::EventSetPosition) {
- const SafeRenderer::QSafeEventPosition &movePos = static_cast<const SafeRenderer::QSafeEventPosition &>(event);
- const char* item = "mainWindow";
+ const SafeRenderer::QSafeEventPosition &eventData =
+ static_cast<const SafeRenderer::QSafeEventPosition &>(event);
+ const char* itemWindowPos = "mainWindowPos";
+ const char* itemPanelSize = "mainWindowPanelSize";
+ const char* itemPanelOrigin = "mainWindowPanelOrigin";
+
//Demo case, move telltales over Cluster window
- if (movePos.id() == SafeRenderer::qsafe_hash(item, SafeRenderer::safe_strlen(item))) {
- //skip handling, just apply position
- emit mainWindowPosGot(static_cast<int>(movePos.x()), static_cast<int>(movePos.y()));
+ if (eventData.id() == SafeRenderer::qsafe_hash(itemWindowPos,
+ SafeRenderer::safe_strlen(itemWindowPos))) {
+ //skip handling, just apply window position
+ emit mainWindowPosGot(eventData.x(), eventData.y());
+ continue;
+ } else if (eventData.id() == SafeRenderer::qsafe_hash(itemPanelSize,
+ SafeRenderer::safe_strlen(itemPanelSize))) {
+ // got cluster panel size
+ emit mainWindowPanelSizeGot(eventData.x(), eventData.y());
+ continue;
+ } else if (eventData.id() == SafeRenderer::qsafe_hash(itemPanelOrigin,
+ SafeRenderer::safe_strlen(itemPanelOrigin))) {
+ // got cluster panel position inside window
+ emit mainWindowPanelOriginGot(eventData.x(), eventData.y());
continue;
}
}
diff --git a/src/neptune3-ui-qsr-cluster/tcpmsghandler.h b/src/neptune3-ui-qsr-cluster/tcpmsghandler.h
index 5dc4302e..363bb8f5 100644
--- a/src/neptune3-ui-qsr-cluster/tcpmsghandler.h
+++ b/src/neptune3-ui-qsr-cluster/tcpmsghandler.h
@@ -63,6 +63,8 @@ private:
signals:
void mainWindowPosGot(int x, int y);
+ void mainWindowPanelSizeGot(int width, int height);
+ void mainWindowPanelOriginGot(int dx, int dy);
private:
NeptuneSafeStateManager *m_stateManager;
diff --git a/src/neptune3-ui/main.cpp b/src/neptune3-ui/main.cpp
index 80591cb8..ff76f49d 100644
--- a/src/neptune3-ui/main.cpp
+++ b/src/neptune3-ui/main.cpp
@@ -36,9 +36,10 @@
#include <QtIviCore/QtIviCoreVersion>
#include <QtAppManMain/main.h>
#include <QtAppManMain/defaultconfiguration.h>
-#include <QtAppManPackage/package.h>
-#include <QtAppManInstaller/sudo.h>
+#include <QtAppManPackage/packageutilities.h>
+#include <QtAppManManager/sudo.h>
#include <QtAppManWindow/touchemulation.h>
+#include <QtGui/QFontDatabase>
#include <QGuiApplication>
#include <QTranslator>
#include <QLibraryInfo>
@@ -90,11 +91,10 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
Logging::initialize();
- Package::ensureCorrectLocale();
+ PackageUtilities::ensureCorrectLocale();
try {
- QStringList deploymentWarnings;
- Sudo::forkServer(Sudo::DropPrivilegesPermanently, &deploymentWarnings);
+ Sudo::forkServer(Sudo::DropPrivilegesPermanently);
qputenv("QTIVIMEDIA_SIMULATOR_DATABASE", QFile::encodeName(QDir::homePath() + "/media.db"));
qputenv("QT_IM_MODULE", "qtvirtualkeyboard");
@@ -114,6 +114,8 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
startExtraProcess(QCoreApplication::applicationDirPath() + "/drivedata-simulation-server");
startExtraProcess(QCoreApplication::applicationDirPath() + "/remotesettings-server");
#endif
+ QFontDatabase::addApplicationFont(QCoreApplication::applicationDirPath()
+ + "/imports_shared/assets/fonts/DejaVuSans.ttf");
// load the Qt translations
QTranslator qtTranslator;
@@ -128,7 +130,7 @@ Q_DECL_EXPORT int main(int argc, char *argv[])
#endif
cfg.parse();
- a.setup(&cfg, deploymentWarnings);
+ a.setup(&cfg);
#ifdef USE_QT_SAFE_RENDERER
//Set env variables for Qt Safe Renderer for sending heartbeats
diff --git a/src/neptune3-ui/neptune3-ui.pro b/src/neptune3-ui/neptune3-ui.pro
index 0838def9..106b0d1f 100644
--- a/src/neptune3-ui/neptune3-ui.pro
+++ b/src/neptune3-ui/neptune3-ui.pro
@@ -1,10 +1,13 @@
-VERSION = 5.13.1
+VERSION = 5.15.1
TEMPLATE = app
TARGET = neptune3-ui
include(../../config.pri)
-macos:CONFIG -= app_bundle
+macos: {
+ CONFIG -= app_bundle
+ CONFIG *= separate_debug_info
+}
CONFIG *= no_private_qt_headers_warning link_pkgconfig
QT *= appman_main-private testlib gui-private
diff --git a/src/remotesettings/app/DevelopmentPage.qml b/src/remotesettings/app/DevelopmentPage.qml
index 6f049124..d84f16fa 100644
--- a/src/remotesettings/app/DevelopmentPage.qml
+++ b/src/remotesettings/app/DevelopmentPage.qml
@@ -1,6 +1,6 @@
-/****************************************************************************
+/****************************************************************************
**
-** Copyright (C) 2019 Luxoft Sweden AB
+** Copyright (C) 2019-2020 Luxoft Sweden AB
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Neptune 3 UI.
@@ -54,7 +54,7 @@ Flickable {
Layout.alignment: Qt.AlignHCenter
Label {
- text: "System UI"
+ text: qsTr("System UI")
Layout.alignment: Qt.AlignHCenter
font.bold: true
}
@@ -69,11 +69,21 @@ Flickable {
}
Label {
- text: "Cluster"
+ text: qsTr("Cluster")
Layout.alignment: Qt.AlignHCenter
font.bold: true
}
+ Button {
+ Layout.alignment: Qt.AlignHCenter
+ text: instrumentCluster.enableSimulation
+ ? qsTr("Disable simulation")
+ : qsTr("Enable simulation")
+ onClicked: {
+ instrumentCluster.enableSimulation = !instrumentCluster.enableSimulation;
+ }
+ }
+
GridLayout {
Layout.alignment: Qt.AlignHCenter
columns: root.width < neptuneScale(100) ? 2 : 4
@@ -94,13 +104,13 @@ Flickable {
Label {
- text: "Vehicle state"
+ text: qsTr("Vehicle state")
Layout.alignment: Qt.AlignHCenter
font.bold: true
}
GridLayout {
- enabled: instrumentCluster.isConnected
+ enabled: instrumentCluster.isConnected && !instrumentCluster.enableSimulation
Layout.alignment: Qt.AlignHCenter
columns: root.width > 2 * (outsideTemperatureLabel.width + outsideTemperature.width + columnSpacing)
? 4 : 2
@@ -116,9 +126,9 @@ Flickable {
Slider {
id: outsideTemperature
value: instrumentCluster.outsideTemperatureCelsius
- from: -100
+ from: -60.0
stepSize: 0.5
- to: 100.0
+ to: 60.0
onValueChanged: {
if (pressed) {
instrumentCluster.outsideTemperatureCelsius = value
@@ -141,37 +151,22 @@ Flickable {
value: instrumentCluster.mileageKm
from: 0
stepSize: 0.5
- to: 9E6
+ to: 1E6
onValueChanged: if (pressed) { instrumentCluster.mileageKm = value }
Label {
anchors.centerIn: parent.handle
anchors.verticalCenterOffset: - parent.handle.height * 2
- text: parent.value
+ text: parent.value.toFixed(2)
}
}
// Route progress
Label {
- text: qsTr("Route \n progress, %")
+ text: qsTr("Route \n progress, % ")
}
- Slider {
- id: routeProgressSlider
- from: 0
- to: 1.0
- stepSize: 0.01
- value: instrumentCluster.navigationProgressPercents
- onValueChanged: {
- if (pressed) {
- instrumentCluster.navigationProgressPercents = value
- }
- }
-
- Label {
- anchors.centerIn: parent.handle
- anchors.verticalCenterOffset: - parent.handle.height * 2
- text: parent.value.toFixed(2)
- }
+ Label {
+ text: (100.0 * instrumentCluster.navigationProgressPercents).toFixed(0)
}
// Route distance
@@ -200,7 +195,7 @@ Flickable {
RowLayout {
- enabled: instrumentCluster.isConnected
+ enabled: instrumentCluster.isConnected && !instrumentCluster.enableSimulation
Layout.alignment: Qt.AlignHCenter
// driveTrainState field
Label {
@@ -245,60 +240,23 @@ Flickable {
Layout.alignment: Qt.AlignHCenter
spacing: 50
- //Driving mode range Field
- Dial {
- id: drivingModeRangeDial
- from: 0
- to: 1000
- stepSize: 1.0
- value: instrumentCluster.drivingModeRangeKm
- onMoved: instrumentCluster.drivingModeRangeKm = value
-
- Label {
- text: qsTr("Range:")
- anchors.bottom: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
- Label {
- text: Math.round(parent.value)
- anchors.top: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- }
+ Label {
+ text: qsTr("Range: ") + instrumentCluster.drivingModeRangeKm
}
- // ECO mode range Field
- Dial {
- id: ecoModeRangeDial
- from: 0
- to: 500
- stepSize: 1.0
- value: instrumentCluster.drivingModeECORangeKm
- onMoved: instrumentCluster.drivingModeECORangeKm = value
-
- Label {
- text: qsTr("ECO Range:")
- anchors.bottom: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- }
-
-
- Label {
- text: Math.round(parent.value)
- anchors.top: parent.verticalCenter
- anchors.horizontalCenter: parent.horizontalCenter
- }
+ Label {
+ text: qsTr("ECO Range: ") + instrumentCluster.drivingModeECORangeKm
}
}
Label {
- text: "Telltales"
+ text: qsTr("Telltales")
Layout.alignment: Qt.AlignHCenter
font.bold: true
}
GridLayout {
- enabled: instrumentCluster.isConnected
+ enabled: instrumentCluster.isConnected && !instrumentCluster.enableSimulation
Layout.alignment: Qt.AlignHCenter
columns: root.width < neptuneScale(100) ? 2 : 4
diff --git a/src/remotesettings/app/app.pro b/src/remotesettings/app/app.pro
index 8312a400..e5fd7b68 100644
--- a/src/remotesettings/app/app.pro
+++ b/src/remotesettings/app/app.pro
@@ -1,4 +1,4 @@
-VERSION = 5.13.1
+VERSION = 5.15.1
TARGET = neptune-companion-app
DESTDIR = $$BUILD_DIR
QT += quick ivicore ivimedia
@@ -35,26 +35,7 @@ QMAKE_RPATHDIR += $$QMAKE_REL_RPATH_BASE/$$relative_path($$INSTALL_PREFIX/neptun
#needed for the android deployment to include additional qml plugins
QML_IMPORT_PATH += $$BUILD_DIR/imports_shared_cpp
-android {
- copydata.commands = $(COPY_DIR) $$[QT_INSTALL_PLUGINS]/qtivi $$BUILD_DIR/plugins
- first.depends = $(first) copydata
- export(first.depends)
- export(copydata.commands)
- QMAKE_EXTRA_TARGETS += first copydata
-
-#This is used to tell the deployment tool to include these additional
-#libs to the apk. This library (libQt5RemoteObjects) is not directly used by the
-#app itself, but by the backend plugin.
- ANDROID_EXTRA_LIBS = $$[QT_INSTALL_LIBS]/libQt5RemoteObjects.so
-
-#In case we have some other than QML plugins to include to the apk, this is the
-#variable to use. In this case we use it to include the Qtivi backend plugin,
-#which is expected to be found under directory "qtivi". For this to work, the
-#built plugin has then to be found under "$$BUILD_DIR/plugins/qtivi/".
-#There is a line in the backend plugin's .pro file that places the plugin under
-#"$$BUILD_DIR/plugins/" when building for android
- ANDROID_EXTRA_PLUGINS = $$BUILD_DIR/plugins/
-}
+android: QT += remoteobjects
HEADERS += \
client.h
diff --git a/src/remotesettings/app/main.cpp b/src/remotesettings/app/main.cpp
index daa26731..fdc99c88 100644
--- a/src/remotesettings/app/main.cpp
+++ b/src/remotesettings/app/main.cpp
@@ -33,6 +33,7 @@
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QDir>
+#include <QtCore/QCommandLineParser>
#include <QtIviCore/QtIviCoreVersion>
#include "client.h"
@@ -43,9 +44,27 @@
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QCoreApplication::setApplicationName(QStringLiteral("Neptune Companion"));
+ QCoreApplication::setOrganizationName(QStringLiteral("Luxoft Sweden AB"));
+ QCoreApplication::setOrganizationDomain(QStringLiteral("luxoft.com"));
QCoreApplication::setApplicationVersion(STR(NEPTUNE_COMPANION_APP_VERSION));
QGuiApplication app(argc, argv);
+ QCommandLineParser cmdParser;
+ cmdParser.setApplicationDescription(
+ "Neptune Companion\n\n"
+ "Logging is turned off by default, to control log output please check command line "
+ "options or Qt Help for QT_LOGGING_RULES environment variable.\n");
+ cmdParser.addHelpOption();
+ cmdParser.addVersionOption();
+ const QCommandLineOption enableDefaultLoggingOption("verbose",
+ "Enables default Qt logging filter.");
+ cmdParser.addOption(enableDefaultLoggingOption);
+ cmdParser.process(app);
+ if (!cmdParser.isSet(enableDefaultLoggingOption)) {
+ QLoggingCategory::setFilterRules("*=false");
+ }
+
Client client;
QQmlApplicationEngine engine;
diff --git a/src/remotesettings/app/main.qml b/src/remotesettings/app/main.qml
index 95d0b80f..d677b1e4 100644
--- a/src/remotesettings/app/main.qml
+++ b/src/remotesettings/app/main.qml
@@ -143,7 +143,7 @@ ApplicationWindow {
Connections {
target: client
- onServerUrlChanged: {
+ function onServerUrlChanged() {
if (client.serverUrl.toString().length)
connectionDialog.url = client.serverUrl.toString();
else
@@ -153,7 +153,7 @@ ApplicationWindow {
Connections {
target: client
- onConnectedChanged: {
+ function onConnectedChanged() {
if (client.connected)
connectionDialog.close();
}
diff --git a/src/remotesettings/backend/backend.pro b/src/remotesettings/backend/backend.pro
index 18d6ca26..689437fc 100644
--- a/src/remotesettings/backend/backend.pro
+++ b/src/remotesettings/backend/backend.pro
@@ -1,5 +1,5 @@
TEMPLATE=lib
-TARGET = $$qtLibraryTarget(remotesettings_backend_qtro)
+TARGET = $$qt5LibraryTarget(remotesettings_backend_qtro, "plugins/qtivi/")
CONFIG += ivigenerator plugin
QT_FOR_CONFIG += ivicore
diff --git a/src/src.pro b/src/src.pro
index 3b496a5f..85df6c3c 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -5,6 +5,11 @@ SUBDIRS += remotesettings \
drivedata \
connectivity
+linux|macos:{
+ SUBDIRS += neptune-cluster-app
+ neptune-cluster-app.depends = neptune3-ui drivedata remotesettings
+}
+
#build Qt Safe Renderer Cluster
qtHaveModule(qtsaferenderer):load(qtsaferenderer-tools):qtsaferenderer-tools-available {
SUBDIRS += neptune3-ui-qsr-cluster