36 lines
614 B
QML
36 lines
614 B
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 2.0
|
|
|
|
Page {
|
|
title: qsTr("nooLight")
|
|
|
|
LightsModel {
|
|
id: lightsModel
|
|
|
|
serviceUrl: settings.serviceUrl
|
|
|
|
onError: console.log(text)
|
|
}
|
|
|
|
ListView {
|
|
anchors.fill: parent
|
|
anchors.margins: 5
|
|
|
|
model: lightsModel
|
|
spacing: 5
|
|
|
|
delegate: LightGroup {
|
|
width: parent.width
|
|
height: childrenRect.height
|
|
|
|
title: groupName || ""
|
|
lights: channels
|
|
}
|
|
}
|
|
|
|
BusyIndicator {
|
|
anchors.centerIn: parent
|
|
running: lightsModel.isLoading
|
|
}
|
|
}
|