blob: 1447113208451dd7ac2ae41f99b5f30f8cfd3528 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright (c) 2018 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.7
import QtQuick.Controls 2.4
import UM 1.5 as UM
import Cura 1.0 as Cura
Cura.Menu
{
id: menu
title: "Printer type"
property var outputDevice: Cura.MachineManager.printerOutputDevices[0]
Instantiator
{
id: printerTypeInstantiator
model: outputDevice != null ? outputDevice.connectedPrintersTypeCount : []
Cura.MenuItem
{
text: modelData.machine_type
checkable: true
checked: Cura.MachineManager.activeMachine.definition.name == modelData.machine_type
onTriggered:
{
Cura.MachineManager.switchPrinterType(modelData.machine_type)
}
}
onObjectAdded: function(index, object) { return menu.insertItem(index, object); }
onObjectRemoved: function(object) { return menu.removeItem(object); }
}
}
|