Add better controls to header for closable list pages
This commit is contained in:
parent
84d98ffc93
commit
8be310ae22
@ -19,7 +19,29 @@ DeviceListPageBase {
|
|||||||
text: root.title
|
text: root.title
|
||||||
|
|
||||||
HeaderButton {
|
HeaderButton {
|
||||||
imageSource: "../images/system-shutdown.svg"
|
imageSource: root.invertControls ? "../images/down.svg" : "../images/up.svg"
|
||||||
|
onClicked: {
|
||||||
|
for (var i = 0; i < devicesProxy.count; i++) {
|
||||||
|
var device = devicesProxy.get(i);
|
||||||
|
var deviceClass = engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
|
var actionType = deviceClass.actionTypes.findByName("open");
|
||||||
|
engine.deviceManager.executeAction(device.id, actionType.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HeaderButton {
|
||||||
|
imageSource: "../images/media-playback-stop.svg"
|
||||||
|
onClicked: {
|
||||||
|
for (var i = 0; i < devicesProxy.count; i++) {
|
||||||
|
var device = devicesProxy.get(i);
|
||||||
|
var deviceClass = engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId);
|
||||||
|
var actionType = deviceClass.actionTypes.findByName("stop");
|
||||||
|
engine.deviceManager.executeAction(device.id, actionType.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HeaderButton {
|
||||||
|
imageSource: root.invertControls ? "../images/up.svg" : "../images/down.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
for (var i = 0; i < devicesProxy.count; i++) {
|
for (var i = 0; i < devicesProxy.count; i++) {
|
||||||
var device = devicesProxy.get(i);
|
var device = devicesProxy.get(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user