Factor out USBPrinterManager singleton

This commit is contained in:
fieldOfView 2018-08-22 15:44:11 +02:00
parent 5f81c6d1f4
commit 7b00d6879a
5 changed files with 51 additions and 53 deletions

View file

@ -14,5 +14,4 @@ def getMetaData():
def register(app):
# We are violating the QT API here (as we use a factory, which is technically not allowed).
# but we don't really have another means for doing this (and it seems to you know -work-)
qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance)
return {"output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager(app)}