__init__.py 912 B

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