IoStatus QML Type
Provides information on the status of I/O devices. More...
Import Statement: | import QtApplicationManager 2.0 |
Properties
- deviceNames : list<string>
- ioLoad : var
- roleNames : list<string>
Methods
- update()
Detailed Description
IoStatus provides information on the status of I/O devices. Its property values are updated whenever the method update() is called.
You can use this component as a MonitorModel data source if you want to plot its previous values over time.
import QtQuick 2.11 import QtApplicationManager 2.0 ... MonitorModel { IoStatus { deviceNames: ["sda", "sdb"] } }
You can also use it alongside a Timer for instance, when you're only interested in its current value.
import QtQuick 2.11 import QtApplicationManager 2.0 ... IoStatus { id: ioStatus deviceNames: ["sda", "sdb"] } Timer { interval: 500 running: true repeat: true onTriggered: ioStatus.update() } Text { property string loadPercent: Number(ioStatus.ioLoad.sda * 100).toLocaleString(Qt.locale("en_US"), 'f', 1) text: "sda load: " + loadPercent + "%" }
Property Documentation
Names of the I/O devices to be probed.
Note: Currently this is only supported on Linux: device names have to match to filenames in the /sys/block
directory.
[read-only] ioLoad : var |
A map of devices registered in deviceNames and their corresponding I/O loads in the range [0, 1]. For instance the load of a device named "sda" can be accessed through ioLoad.sda
.
Devices whose status could not be fetched won't be present in this property.
The value of this property is updated when update() is called.
See also update.
Names of the roles provided by IoStatus when used as a MonitorModel data source.
See also MonitorModel.
Method Documentation
© 2019 Luxoft Sweden AB. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.