diff --git a/plugins/FlashforgeFinderIntegration/package.json b/plugins/FlashforgeFinderIntegration/package.json index dbbd27f..d095cb5 100644 --- a/plugins/FlashforgeFinderIntegration/package.json +++ b/plugins/FlashforgeFinderIntegration/package.json @@ -10,11 +10,20 @@ "package_id": "FlashforgeFinderIntegration", "package_type": "plugin", "package_version": "1.0.0", - "sdk_version": "7.2.0", - "supported_sdk_versions": ["7.2.0"], + "sdk_version": "8.1.0", + "supported_sdk_versions": [ + "7.2.0", + "7.3.0", + "7.4.0", + "7.5.0", + "7.8.0", + "7.9.0", + "8.0.0", + "8.1.0" + ], "tags": [ "Flashforge", - "Finder" + "Finder" ], "website": "https://github.com/ronoaldo/FlashforgeFinderIntegration" } diff --git a/plugins/FlashforgeFinderIntegration/plugin.json b/plugins/FlashforgeFinderIntegration/plugin.json index 8b44620..60c32ac 100644 --- a/plugins/FlashforgeFinderIntegration/plugin.json +++ b/plugins/FlashforgeFinderIntegration/plugin.json @@ -4,6 +4,15 @@ "version": "1.0.0", "description": "Flashforge Finder integration utilities to enable setting up and using the printer. This plugin uses the configuration files from https://github.com/eskeyaar/Flashforge-Finder-", "api": 5, - "supported_sdk_versions": ["7.2.0"], + "supported_sdk_versions": [ + "7.2.0", + "7.3.0", + "7.4.0", + "7.5.0", + "7.8.0", + "7.9.0", + "8.0.0", + "8.1.0" + ], "i18n-catalog": "cura" } diff --git a/plugins/GXWriter/GXWriter.py b/plugins/GXWriter/GXWriter.py index fea8af1..f2bd097 100644 --- a/plugins/GXWriter/GXWriter.py +++ b/plugins/GXWriter/GXWriter.py @@ -18,7 +18,13 @@ from io import StringIO, BufferedIOBase from typing import cast, List from . import gx -from PyQt5 import QtGui, QtCore + +qt_version = 6 +try: + from PyQt6 import QtGui, QtCore +except ImportError: + qt_version = 5 + from PyQt5 import QtGui, QtCore # Helper function that extracts values from gcode to add to the binary header. def getValue(line, key, default=None): @@ -100,15 +106,17 @@ def _createSnapshot(self, g, *args): try: # Convert the image to grayscale, and back to 24bits so it renders properly # in printer. + qt_format_ctx = QtGui.QImage.Format if qt_version == 6 else QtGui.QImage + qt_openmode_ctx = QtCore.QIODeviceBase.OpenModeFlag if qt_version == 6 else QtCore.QIODevice img = Snapshot.snapshot(width = 80, height = 60) - img = img.convertToFormat(QtGui.QImage.Format_Grayscale8) - img = img.convertToFormat(QtGui.QImage.Format_RGB666) + img = img.convertToFormat(qt_format_ctx.Format_Grayscale8) + img = img.convertToFormat(qt_format_ctx.Format_RGB666) # Converts the image into BMP byte array. arr = QtCore.QByteArray() buff = QtCore.QBuffer(arr) - buff.open(QtCore.QIODevice.WriteOnly) + buff.open(qt_openmode_ctx.WriteOnly) img.save(buff, format="BMP") - g.bmp = arr.data() + g.bmp = arr.data() except Exception: Logger.logException("w", "Failed to create snapshot image") g.bmp = gx._SAMPLE_BMP diff --git a/plugins/GXWriter/package.json b/plugins/GXWriter/package.json index 8e1069a..86c151c 100644 --- a/plugins/GXWriter/package.json +++ b/plugins/GXWriter/package.json @@ -10,13 +10,19 @@ "package_id": "GXWriter", "package_type": "plugin", "package_version": "1.0.0", - "sdk_version": "7.1.0", - "supported_sdk_versions": ["5.0.0", "6.0.0", "7.0.0"], + "sdk_version": "8.1.0", + "supported_sdk_versions": [ + "5.0.0", + "6.0.0", + "7.0.0", + "8.0.0", + "8.1.0" + ], "tags": [ "flashforge", - "finder", - "monoprice", - "xgcode" + "finder", + "monoprice", + "xgcode" ], "website": "https://github.com/ronoaldo/FlashforgeFinderIntegration" } diff --git a/plugins/GXWriter/plugin.json b/plugins/GXWriter/plugin.json index d5b428f..10ef1bc 100644 --- a/plugins/GXWriter/plugin.json +++ b/plugins/GXWriter/plugin.json @@ -4,6 +4,21 @@ "version": "1.0.0", "description": "GXWriter writes the required header metadata to printers that interpret GX files, such as Flashforge Finder and Monoprice.", "api": 5, - "supported_sdk_versions": ["6.0.0", "6.1.0", "6.2.0", "6.3.0", "7.0.0", "7.1.0", "7.2.0"], + "supported_sdk_versions": [ + "6.0.0", + "6.1.0", + "6.2.0", + "6.3.0", + "7.0.0", + "7.1.0", + "7.2.0", + "7.3.0", + "7.4.0", + "7.5.0", + "7.8.0", + "7.9.0", + "8.0.0", + "8.1.0" + ], "i18n-catalog": "cura" }