HomeForm.qml 614 B

1234567891011121314151617181920212223242526272829303132333435
  1. import QtQuick 2.0
  2. import QtQuick.Controls 2.0
  3. Page {
  4. title: qsTr("nooLight")
  5. LightsModel {
  6. id: lightsModel
  7. serviceUrl: settings.serviceUrl
  8. onError: console.log(text)
  9. }
  10. ListView {
  11. anchors.fill: parent
  12. anchors.margins: 5
  13. model: lightsModel
  14. spacing: 5
  15. delegate: LightGroup {
  16. width: parent.width
  17. height: childrenRect.height
  18. title: groupName || ""
  19. lights: channels
  20. }
  21. }
  22. BusyIndicator {
  23. anchors.centerIn: parent
  24. running: lightsModel.isLoading
  25. }
  26. }