mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Changed namespace of usbprintermanager (QML) to Cura from UM
CURA-1339
This commit is contained in:
parent
a59c113887
commit
8a47903374
@ -30,10 +30,7 @@ i18n_catalog = i18nCatalog("cura")
|
||||
## Manager class that ensures that a usbPrinteroutput device is created for every connected USB printer.
|
||||
class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, Extension):
|
||||
def __init__(self, parent = None):
|
||||
QObject.__init__(self, parent)
|
||||
SignalEmitter.__init__(self)
|
||||
OutputDevicePlugin.__init__(self)
|
||||
Extension.__init__(self)
|
||||
super().__init__(parent = parent)
|
||||
self._serial_port_list = []
|
||||
self._usb_output_devices = {}
|
||||
self._usb_output_devices_model = None
|
||||
|
@ -19,5 +19,5 @@ def getMetaData():
|
||||
}
|
||||
|
||||
def register(app):
|
||||
qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "UM", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance)
|
||||
qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance)
|
||||
return {"extension":USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance(), "output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()}
|
||||
|
@ -18,7 +18,7 @@ Item
|
||||
property int platform_width: UM.MachineManager.getSettingValue("machine_width")
|
||||
property int platform_height: UM.MachineManager.getSettingValue("machine_depth")
|
||||
anchors.fill: parent;
|
||||
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
Component.onCompleted:
|
||||
{
|
||||
printer_connection.homeBed()
|
||||
|
@ -31,9 +31,9 @@ Item
|
||||
}
|
||||
|
||||
property variant printer_connection: {
|
||||
if (UM.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
||||
if (Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0){
|
||||
wizardPage.checkupProgress.connection = true
|
||||
return UM.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
return Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer
|
||||
}
|
||||
else {
|
||||
return null
|
||||
@ -142,7 +142,7 @@ Item
|
||||
anchors.left: connectionLabel.right
|
||||
anchors.top: parent.top
|
||||
wrapMode: Text.WordWrap
|
||||
text: UM.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete")
|
||||
text: Cura.USBPrinterManager.connectedPrinterList.rowCount() > 0 || base.addOriginalProgress.checkUp[0] ? catalog.i18nc("@info:status","Done"):catalog.i18nc("@info:status","Incomplete")
|
||||
}
|
||||
//////////////////////////////////////////////////////////
|
||||
Label
|
||||
|
@ -14,7 +14,7 @@ Item
|
||||
|
||||
SystemPalette{id: palette}
|
||||
UM.I18nCatalog { id: catalog; name:"cura"}
|
||||
property variant printer_connection: UM.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? UM.USBPrinterManager.connectedPrinterList.getItem(0).printer : null
|
||||
property variant printer_connection: Cura.USBPrinterManager.connectedPrinterList.rowCount() != 0 ? Cura.USBPrinterManager.connectedPrinterList.getItem(0).printer : null
|
||||
Label
|
||||
{
|
||||
id: pageTitle
|
||||
@ -62,7 +62,7 @@ Item
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
text: catalog.i18nc("@action:button","Upgrade to Marlin Firmware");
|
||||
onClicked: UM.USBPrinterManager.updateAllFirmware()
|
||||
onClicked: Cura.USBPrinterManager.updateAllFirmware()
|
||||
}
|
||||
Button {
|
||||
id: skipUpgradeButton
|
||||
|
Loading…
x
Reference in New Issue
Block a user