__init__.py 805 B

123456789101112131415161718
  1. # Copyright (c) 2017 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from . import USBPrinterOutputDeviceManager
  4. from PyQt5.QtQml import qmlRegisterSingletonType
  5. from UM.i18n import i18nCatalog
  6. i18n_catalog = i18nCatalog("cura")
  7. def getMetaData():
  8. return {}
  9. def register(app):
  10. # We are violating the QT API here (as we use a factory, which is technically not allowed).
  11. # but we don't really have another means for doing this (and it seems to you know -work-)
  12. qmlRegisterSingletonType(USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager, "Cura", 1, 0, "USBPrinterManager", USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance)
  13. return {"output_device": USBPrinterOutputDeviceManager.USBPrinterOutputDeviceManager.getInstance()}