CURA-4870 Start showing the list of printers separating between local

and networked priters.
This commit is contained in:
Diego Prado Gesto 2018-02-27 11:23:04 +01:00
parent 197508028a
commit 0d8302d864
4 changed files with 70 additions and 18 deletions

View file

@ -0,0 +1,26 @@
// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.2
import QtQuick.Controls 1.4
import UM 1.2 as UM
import Cura 1.0 as Cura
Instantiator
{
model: UM.ContainerStacksModel
{
filter: {"type": "machine", "um_network_key": null}
}
MenuItem
{
text: model.name;
checkable: true;
checked: Cura.MachineManager.activeMachineId == model.id
exclusiveGroup: group;
onTriggered: Cura.MachineManager.setActiveMachine(model.id);
}
onObjectAdded: menu.insertItem(index, object)
onObjectRemoved: menu.removeItem(object)
}