41 lines
756 B
QML
41 lines
756 B
QML
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)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|