From a861812f18af2f5ba43274c6059a80bdda16d5ba Mon Sep 17 00:00:00 2001 From: jkennedyvz <65985482+jkennedyvz@users.noreply.github.com> Date: Sun, 22 May 2022 18:14:33 -0700 Subject: [PATCH] refactor qt wrappers --- XSegEditor/QCursorDB.py | 6 +++--- XSegEditor/QIconDB.py | 6 +++--- XSegEditor/QImageDB.py | 6 +++--- XSegEditor/XSegEditor.py | 13 ++++++------- core/qtex/QSubprocessor.py | 6 +++--- core/qtex/QXIconButton.py | 6 +++--- core/qtex/QXMainWindow.py | 6 +++--- core/qtex/qtex.py | 6 +++--- requirements-cuda.txt | 4 ++-- 9 files changed, 29 insertions(+), 30 deletions(-) diff --git a/XSegEditor/QCursorDB.py b/XSegEditor/QCursorDB.py index 0909cba..a5dca61 100644 --- a/XSegEditor/QCursorDB.py +++ b/XSegEditor/QCursorDB.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * class QCursorDB(): @staticmethod diff --git a/XSegEditor/QIconDB.py b/XSegEditor/QIconDB.py index 1fd9e3e..9208e2e 100644 --- a/XSegEditor/QIconDB.py +++ b/XSegEditor/QIconDB.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * class QIconDB(): diff --git a/XSegEditor/QImageDB.py b/XSegEditor/QImageDB.py index 45cad78..59cc1bd 100644 --- a/XSegEditor/QImageDB.py +++ b/XSegEditor/QImageDB.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * class QImageDB(): @staticmethod diff --git a/XSegEditor/XSegEditor.py b/XSegEditor/XSegEditor.py index affc9f6..0ce7d42 100644 --- a/XSegEditor/XSegEditor.py +++ b/XSegEditor/XSegEditor.py @@ -12,9 +12,9 @@ from types import SimpleNamespace as sn import cv2 import numpy as np import numpy.linalg as npla -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * from core import imagelib, pathex from core.cv2ex import * @@ -152,9 +152,9 @@ class CanvasConfig(): if color_schemes is None: color_schemes = [ - ColorScheme( QColor(192,0,0,alpha=0), QColor(192,0,0,alpha=72), QColor(192,0,0), 2, QColor(255,255,255), QCursorDB.cross_red ), - ColorScheme( QColor(0,192,0,alpha=0), QColor(0,192,0,alpha=72), QColor(0,192,0), 2, QColor(255,255,255), QCursorDB.cross_green ), - ColorScheme( QColor(0,0,192,alpha=0), QColor(0,0,192,alpha=72), QColor(0,0,192), 2, QColor(255,255,255), QCursorDB.cross_blue ), + ColorScheme( QColor(192,0,0), QColor(192,0,0), QColor(192,0,0), 2, QColor(255,255,255), QCursorDB.cross_red ), + ColorScheme( QColor(0,192,0), QColor(0,192,0), QColor(0,192,0), 2, QColor(255,255,255), QCursorDB.cross_green ), + ColorScheme( QColor(0,0,192), QColor(0,0,192), QColor(0,0,192), 2, QColor(255,255,255), QCursorDB.cross_blue ), ] self.color_schemes = color_schemes @@ -941,7 +941,6 @@ class QCanvasOperator(QWidget): qp = self.qp qp.begin(self) qp.setRenderHint(QPainter.Antialiasing) - qp.setRenderHint(QPainter.HighQualityAntialiasing) qp.setRenderHint(QPainter.SmoothPixmapTransform) src_rect = QRect(0, 0, *self.img_size) diff --git a/core/qtex/QSubprocessor.py b/core/qtex/QSubprocessor.py index 223f50c..2c6a19f 100644 --- a/core/qtex/QSubprocessor.py +++ b/core/qtex/QSubprocessor.py @@ -3,9 +3,9 @@ import sys import time import traceback -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * from core.interact import interact as io diff --git a/core/qtex/QXIconButton.py b/core/qtex/QXIconButton.py index 235d149..fa9ac1a 100644 --- a/core/qtex/QXIconButton.py +++ b/core/qtex/QXIconButton.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * from localization import StringsDB from .QXMainWindow import * diff --git a/core/qtex/QXMainWindow.py b/core/qtex/QXMainWindow.py index a50e597..61217b9 100644 --- a/core/qtex/QXMainWindow.py +++ b/core/qtex/QXMainWindow.py @@ -1,6 +1,6 @@ -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * class QXMainWindow(QWidget): """ diff --git a/core/qtex/qtex.py b/core/qtex/qtex.py index d15e41d..6d5ec6b 100644 --- a/core/qtex/qtex.py +++ b/core/qtex/qtex.py @@ -1,7 +1,7 @@ import numpy as np -from PyQt5.QtCore import * -from PyQt5.QtGui import * -from PyQt5.QtWidgets import * +from PySide6.QtCore import * +from PySide6.QtGui import * +from PySide6.QtWidgets import * from localization import StringsDB from .QXMainWindow import * diff --git a/requirements-cuda.txt b/requirements-cuda.txt index b70520d..71ce5c9 100644 --- a/requirements-cuda.txt +++ b/requirements-cuda.txt @@ -8,5 +8,5 @@ scikit-image==0.14.2 scipy==1.4.1 colorama tensorflow-gpu==2.4.0 -pyqt5 -tf2onnx==1.9.3 \ No newline at end of file +pysides6 +tf2onnx==1.9.3