Доделал переключение каналов, небольшой рефакторинг

This commit is contained in:
2018-08-12 10:06:17 +02:00
parent 39aeb66fff
commit b6001e4e81
7 changed files with 77 additions and 37 deletions

View File

@@ -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)
}
}
}