HomeForm.qml 588 B

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