__init__.py 953 B

1234567891011121314151617181920212223
  1. # Copyright (c) 2015 Ultimaker B.V.
  2. # Cura is released under the terms of the AGPLv3 or higher.
  3. from . import USBPrinterManager
  4. from PyQt5.QtQml import qmlRegisterType, qmlRegisterSingletonType
  5. from UM.i18n import i18nCatalog
  6. i18n_catalog = i18nCatalog("cura")
  7. def getMetaData():
  8. return {
  9. "type": "extension",
  10. "plugin": {
  11. "name": "USB printing",
  12. "author": "Ultimaker",
  13. "version": "1.0",
  14. "api": 2,
  15. "description": i18n_catalog.i18nc("USB Printing plugin description","Accepts G-Code and sends them to a printer. Plugin can also update firmware")
  16. }
  17. }
  18. def register(app):
  19. qmlRegisterSingletonType(USBPrinterManager.USBPrinterManager, "UM", 1, 0, "USBPrinterManager", USBPrinterManager.USBPrinterManager.getInstance)
  20. return {"extension":USBPrinterManager.USBPrinterManager.getInstance(),"output_device": USBPrinterManager.USBPrinterManager.getInstance() }