Добавил сервисную страницу, небольшой рефакторинг

This commit is contained in:
2018-08-14 20:24:20 +02:00
parent b6001e4e81
commit 76786176d2
6 changed files with 89 additions and 21 deletions

40
ServiceForm.qml Normal file
View File

@@ -0,0 +1,40 @@
import QtQuick 2.0
import QtQuick.Controls 2.2
Page {
id: root
title: qsTr("Service")
ListView {
model: lightsModel.channelsCount
anchors.fill: parent
delegate: Row {
spacing: 4
anchors.horizontalCenter: parent.horizontalCenter
Button {
width: 160
text: qsTr("Bind channel %1").arg(index)
onClicked: {
lightsModel.bindChannel(index)
}
}
Button {
width: 160
text: qsTr("Unbind channel %1").arg(index)
onClicked: {
lightsModel.unbindChannel(index)
}
}
}
}
}