diff options
author | Robert Griebl <robert.griebl@pelagicore.com> | 2019-01-14 16:30:38 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2019-01-15 08:56:23 +0000 |
commit | d6f4a9e53bace41d8d902ff41112d9b67d290a49 (patch) | |
tree | 01c88363dc25c91321534f510309abec39e8ca6f /examples/applicationmanager/process-status | |
parent | fce1eaec83a1b42c56f2949cb73d42576c479c5a (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')
-rw-r--r-- | examples/applicationmanager/process-status/process-status.pro | 15 | ||||
-rw-r--r-- | examples/applicationmanager/process-status/system-ui/main.qml | 24 |
2 files changed, 39 insertions, 0 deletions
diff --git a/examples/applicationmanager/process-status/process-status.pro b/examples/applicationmanager/process-status/process-status.pro index e2a794d0..f72ad26c 100644 --- a/examples/applicationmanager/process-status/process-status.pro +++ b/examples/applicationmanager/process-status/process-status.pro @@ -1,6 +1,21 @@ TEMPLATE = app CONFIG += am-systemui +OTHER_FILES += \ + am-config.yaml \ + system-ui/*.qml \ + doc/images/*.png \ + doc/src/*.qdoc \ + apps/process-status.cpu-hog/*.yaml \ + apps/process-status.cpu-hog/*.qml \ + apps/process-status.cpu-hog/*.png \ + apps/process-status.mem-hog/*.yaml \ + apps/process-status.mem-hog/*.qml \ + apps/process-status.mem-hog/*.png \ + apps/process-status.slim/*.yaml \ + apps/process-status.slim/*.qml \ + apps/process-status.slim/*.png \ + target.path = $$[QT_INSTALL_EXAMPLES]/applicationmanager/process-status INSTALLS += target 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 |