This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/guh-control/ui/devicepages/GenericDeviceStateDetailsPage.qml
2017-10-26 01:08:59 +02:00

42 lines
1.1 KiB
QML

import QtQuick 2.5
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.1
import Guh 1.0
import "../components"
Page {
id: root
property var device
readonly property var deviceClass: Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId)
header: GuhHeader {
text: "Details for " + root.device.name
onBackPressed: pageStack.pop()
}
ColumnLayout {
anchors { left: parent.left; top: parent.top; right: parent.right; margins: app.margins }
spacing: app.margins
Repeater {
model: deviceClass.stateTypes
delegate: RowLayout {
width: parent.width
height: app.largeFont
Label {
id: stateLabel
Layout.preferredWidth: parent.width / 2
text: name
}
Label {
id: valueLable
Layout.fillWidth: true
text: device.states.getState(id).value + " " + deviceClass.stateTypes.getStateType(id).unitString
}
}
}
}
}