summaryrefslogtreecommitdiffstats
path: root/examples/applicationmanager/process-status/system-ui
diff options
context:
space:
mode:
authorRobert Griebl <robert.griebl@pelagicore.com>2019-01-14 16:30:38 +0100
committerDominik Holland <dominik.holland@pelagicore.com>2019-01-15 08:56:23 +0000
commitd6f4a9e53bace41d8d902ff41112d9b67d290a49 (patch)
tree01c88363dc25c91321534f510309abec39e8ca6f /examples/applicationmanager/process-status/system-ui
parentfce1eaec83a1b42c56f2949cb73d42576c479c5a (diff)
Add a runtime warning on non-Linux platforms to both monitoring examples
Non-Linux platforms will not generate all required cpu/memory stats to get useful output and graphs in these examples. Disabling the examples via qmake would have been an option, but would have led to problems with the examples' documentation. Change-Id: Id195187961d10c68e4611517f72ec54d2ecba7b9 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'examples/applicationmanager/process-status/system-ui')
-rw-r--r--examples/applicationmanager/process-status/system-ui/main.qml24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/applicationmanager/process-status/system-ui/main.qml b/examples/applicationmanager/process-status/system-ui/main.qml
index 4dc54556..b342939e 100644
--- a/examples/applicationmanager/process-status/system-ui/main.qml
+++ b/examples/applicationmanager/process-status/system-ui/main.qml
@@ -48,6 +48,30 @@ Pane {
width: 900
height: appsColumn.y + appsColumn.height
+ // Show a warning on non-Linux platforms
+ Rectangle {
+ visible: Qt.platform.os !== 'linux'
+ anchors {
+ bottom: parent.bottom
+ horizontalCenter: parent.horizontalCenter
+ }
+ width: parent.width / 2
+ height: warningLabel.height
+ z: 1000
+ color: "red"
+ border.color: "white"
+ Text {
+ id: warningLabel
+ width: parent.width
+ color: "white"
+ horizontalAlignment: Text.AlignHCenter
+ wrapMode: Text.Wrap
+ text: "Please note that this example will not show sensible data on your current " +
+ "platform (" + Qt.platform.os + "). Only Linux/multi-process will produce " +
+ "all relevant data points."
+ }
+ }
+
// Show name, icon and ProcessStatus data for each application
Column {
id: appsColumn