diff options
author | Daniel d'Andrada <daniel.dandrada@luxoft.com> | 2018-08-16 11:35:36 +0200 |
---|---|---|
committer | Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> | 2018-08-22 10:46:54 +0000 |
commit | 9a55e31958d20005f4899e31398b8f8eaf5d48a5 (patch) | |
tree | dfa1f8806319307cf6152eea8aed3d6400c92597 /Main.qml | |
parent | 7b244d7f3d7db956756aa721dffe65b184bade98 (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.qml | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -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() } } |