aboutsummaryrefslogtreecommitdiffstats
path: root/Main.qml
diff options
context:
space:
mode:
authorDaniel d'Andrada <daniel.dandrada@luxoft.com>2018-08-16 11:35:36 +0200
committerBramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>2018-08-22 10:46:54 +0000
commit9a55e31958d20005f4899e31398b8f8eaf5d48a5 (patch)
treedfa1f8806319307cf6152eea8aed3d6400c92597 /Main.qml
parent7b244d7f3d7db956756aa721dffe65b184bade98 (diff)
Isolate all system and process monitoring code into a single component
Also adapt to and make use of the latest appman API changes, namely: - SystemMonitor is no longer a singleton - ProcessMonitor has properties for current CPU and memory consumption (so you don't have to resort to signals) Change-Id: Ibc7f158037689973d0841880746aa3b9a7ed1047 Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
Diffstat (limited to 'Main.qml')
-rw-r--r--Main.qml12
1 files changed, 9 insertions, 3 deletions
diff --git a/Main.qml b/Main.qml
index d3d42eaa..70b4c3a8 100644
--- a/Main.qml
+++ b/Main.qml
@@ -117,6 +117,8 @@ Window {
anchors.centerIn: parent
+ systemModel: systemModel
+
settings: uiSettings
rotation: {
@@ -344,11 +346,15 @@ Window {
value: popupParent.showModalOverlay ? popupParent : display }
}
+ SystemModel {
+ id: systemModel
+ }
+
CenterConsoleMonitorOverlay {
anchors.fill: display
rotation: display.rotation
- model: SystemModel
- fpsVisible: SystemModel.centerConsolePerfOverlayEnabled
+ model: systemModel
+ fpsVisible: systemModel.centerConsolePerfOverlayEnabled
activeAppId: display.applicationModel.activeAppInfo ? display.applicationModel.activeAppInfo.id : ""
window: root
}
@@ -391,7 +397,7 @@ Window {
InstrumentClusterWindow {
applicationModel: display.applicationModel
invertedOrientation: instrumentClusterWindowLoader.invertedOrientation
- performanceOverlayVisible: SystemModel.instrumentClusterPerfOverlayEnabled
+ performanceOverlayVisible: systemModel.instrumentClusterPerfOverlayEnabled
Component.onCompleted: uiSettings.updateTheme()
}
}