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/EditDevicesPage.qml
Michael Zanetti 834c7a43c5 moar work!
2017-11-10 15:11:49 +01:00

39 lines
1019 B
QML

import QtQuick 2.4
import QtQuick.Controls 2.1
import QtQuick.Layouts 1.2
import "components"
import Guh 1.0
Page {
id: root
header: GuhHeader {
text: "Configure Things"
onBackPressed: pageStack.pop()
}
ListView {
anchors.fill: parent
model: Engine.deviceManager.devices
delegate: ItemDelegate {
width: parent.width
contentItem: RowLayout {
spacing: app.margins
ColorIcon {
height: app.iconSize
width: height
name: app.interfaceToIcon(model.interfaces[0])
color: app.guhAccent
}
Label {
Layout.fillWidth: true
text: model.name
}
}
onClicked: {
pageStack.push(Qt.resolvedUrl("devicepages/ConfigureThingPage.qml"), {device: Engine.deviceManager.devices.get(index)})
}
}
}
}