LocalPrinterMenu.qml 644 B

1234567891011121314151617181920212223
  1. // Copyright (c) 2018 Ultimaker B.V.
  2. // Cura is released under the terms of the LGPLv3 or higher.
  3. import QtQuick 2.2
  4. import QtQuick.Controls 1.4
  5. import UM 1.2 as UM
  6. import Cura 1.0 as Cura
  7. Instantiator {
  8. model: UM.ContainerStacksModel {
  9. filter: {"type": "machine", "um_network_key": null}
  10. }
  11. MenuItem {
  12. text: model.name;
  13. checkable: true;
  14. checked: Cura.MachineManager.activeMachineId == model.id
  15. exclusiveGroup: group;
  16. onTriggered: Cura.MachineManager.setActiveMachine(model.id);
  17. }
  18. onObjectAdded: menu.insertItem(index, object)
  19. onObjectRemoved: menu.removeItem(object)
  20. }