Доделал переключение каналов, небольшой рефакторинг
This commit is contained in:
10
HomeForm.qml
10
HomeForm.qml
@@ -4,12 +4,16 @@ import QtQuick.Controls 2.0
|
||||
Page {
|
||||
title: qsTr("nooLight")
|
||||
|
||||
function showError(text) {
|
||||
ToolTip.show(text, 1000)
|
||||
}
|
||||
|
||||
LightsModel {
|
||||
id: lightsModel
|
||||
|
||||
serviceUrl: settings.serviceUrl
|
||||
|
||||
onError: console.log(text)
|
||||
onError: showError(text)
|
||||
}
|
||||
|
||||
ListView {
|
||||
@@ -25,6 +29,10 @@ Page {
|
||||
|
||||
title: groupName || ""
|
||||
lights: channels
|
||||
|
||||
onChannelClicked: {
|
||||
lightsModel.switchChannel(channelId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user