aboutsummaryrefslogtreecommitdiffstats
path: root/Main.qml
diff options
context:
space:
mode:
authorBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2018-09-03 16:52:13 +0200
committerDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-11-06 14:33:46 +0000
commit44a150c80313694ed14ae08e621444239c5c34b0 (patch)
tree3acff82ba63740b92cc9412dfc9ec7fd8219cd5e /Main.qml
parent5b81eea8a935627a51015eece0483d3b6f30d799 (diff)
[hud] initial implementation of the HUD
Change-Id: I69772305bf2c3fa14e6b50b0639841e3ad4fe2a0 Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
Diffstat (limited to 'Main.qml')
-rw-r--r--Main.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/Main.qml b/Main.qml
index 13c5b84d..ce6af895 100644
--- a/Main.qml
+++ b/Main.qml
@@ -36,6 +36,7 @@ import QtQuick.Window 2.3
import centerconsole 1.0
import notification 1.0
import instrumentcluster 1.0
+import hud 1.0
import stores 1.0
import shared.com.pelagicore.styles.neptune 3.0
@@ -51,6 +52,9 @@ QtObject {
if (instrumentClusterWindowLoader.item) {
instrumentClusterWindowLoader.item.contentItem.NeptuneStyle.accentColor = newAccentColor;
}
+ if (hudWindowLoader.item) {
+ hudWindowLoader.item.contentItem.NeptuneStyle.accentColor = newAccentColor;
+ }
}
onGrabImageRequested: {
@@ -69,6 +73,9 @@ QtObject {
if (instrumentClusterWindowLoader.item) {
instrumentClusterWindowLoader.item.contentItem.NeptuneStyle.theme = chosenTheme;
}
+ if (hudWindowLoader.item) {
+ hudWindowLoader.item.contentItem.NeptuneStyle.theme = chosenTheme;
+ }
}
onApplicationICWindowSwitchCountChanged: {
@@ -94,4 +101,16 @@ QtObject {
}
active: !root.store.runningOnSingleScreenEmbedded && root.store.clusterStore.showCluster
}
+
+ readonly property Loader hudWindowLoader: Loader {
+ id: hudWindowLoader
+
+ sourceComponent: Component {
+ HUDWindow {
+ hudAppInfo: root.store.applicationModel ? root.store.applicationModel.hudAppInfo : null
+ hudStore: root.store.hudStore
+ }
+ }
+ active: !root.store.runningOnSingleScreenEmbedded && root.store.hudStore.showHUD
+ }
}