Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ab18418baa |
2
build.py
2
build.py
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
|
||||
import PyInstaller.__main__
|
||||
from PyQt5.Qt import QT_VERSION_STR
|
||||
from PyQt6.Qt import QT_VERSION_STR
|
||||
|
||||
args = [
|
||||
# "--clean",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
description = ST-TEN-5 IVECO DAILY ELETTRICO
|
||||
instruction_folder = st-ten-5
|
||||
image_for_warning= st-ten-5
|
||||
|
||||
[hardware_config]
|
||||
archive_synchronizer: present
|
||||
uvc_camera: absent
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
[machine]
|
||||
description = TEST-LINUX
|
||||
#instruction_folder = st-ten-1
|
||||
image_for_warning= st-ten-1
|
||||
instruction_folder = st-ten-5
|
||||
image_for_warning= st-ten-5
|
||||
|
||||
|
||||
[hardware_config]
|
||||
|
|
@ -20,8 +20,8 @@ digital_io: present
|
|||
external_flush_blow: absent
|
||||
|
||||
[archive_synchronizer]
|
||||
#archive_endpoint: https://dev.r5portal.it/api/st-ten-save/
|
||||
archive_endpoint: https://r5portal.it/api/st-ten-save/
|
||||
archive_endpoint: https://dev.r5portal.it/api/st-ten-save/
|
||||
#archive_endpoint: https://r5portal.it/api/st-ten-save/
|
||||
poll_time: 10
|
||||
hold_time: 10
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ discard_idx:12 # BIT NUMBER OF THE I/0 MODULE USED FOR DISCARD SENSING
|
|||
|
||||
[recipe]
|
||||
recipe_name_field: codice_ricetta
|
||||
part_number_field: codice_prodotto
|
||||
part_number_field: part_number
|
||||
label_template_field: modello_etichetta
|
||||
description_field: descrizione
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
pyqt5-tools designer
|
||||
pyqt6-tools designer
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
pyqt5-tools designer
|
||||
pyqt6-tools designer
|
||||
|
|
@ -11,7 +11,7 @@ import requests
|
|||
from google.api_core.exceptions import Forbidden
|
||||
from google.cloud import storage
|
||||
from lib.db import Archive, db
|
||||
from PyQt5.QtCore import QThread
|
||||
from PyQt6.QtCore import QThread
|
||||
from requests.adapters import HTTPAdapter, Retry
|
||||
from urllib3.exceptions import InsecureRequestWarning
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import traceback
|
|||
import types
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import (QMutex, QObject, QSemaphore, Qt, QThread, QTimer,
|
||||
from PyQt6.QtCore import (QMutex, QObject, QSemaphore, Qt, QThread, QTimer,
|
||||
pyqtSignal)
|
||||
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ class Component(QObject):
|
|||
if self._period is not None:
|
||||
if self._timer is None:
|
||||
self._timer = QTimer()
|
||||
self._timer.setTimerType(Qt.PreciseTimer)
|
||||
self._timer.setTimerType(Qt.TimerType.PreciseTimer)
|
||||
self._timer.setSingleShot(self._single_shot)
|
||||
self._timer.setInterval(round(self._period * 1000))
|
||||
self.log.debug(f"init periodic: period: {self._period}, single shot: {self._single_shot}")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from collections import deque
|
||||
|
||||
from PyQt5.QtCore import QMutex
|
||||
from PyQt6.QtCore import QMutex
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import sys
|
|||
import time
|
||||
from collections import OrderedDict
|
||||
|
||||
from PyQt5.QtCore import QMutex
|
||||
from PyQt6.QtCore import QMutex
|
||||
|
||||
from components.component import Component
|
||||
from components.furness_controls_fco730_registers import registers as fco730_registers
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ from itertools import cycle
|
|||
import cv2
|
||||
import imutils
|
||||
import numpy as np
|
||||
from PyQt5.QtCore import QMutex, Qt, QThread, pyqtSignal
|
||||
from PyQt5.QtGui import QImage, QPixmap
|
||||
from PyQt5.QtWidgets import (QDialog, QFormLayout, QLabel, QMessageBox,
|
||||
from Pyqt6.QtCore import QMutex, Qt, QThread, pyqtSignal
|
||||
from Pyqt6.QtGui import QImage, QPixmap
|
||||
from Pyqt6.QtWidgets import (QDialog, QFormLayout, QLabel, QMessageBox,
|
||||
QPushButton, QSizePolicy, QSlider)
|
||||
|
||||
from . import gxipy as gx
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ if "--sim-modbus" not in sys.argv:
|
|||
else:
|
||||
from components.dummies.pymodbus import ModbusClient
|
||||
|
||||
from PyQt5.QtCore import QMutex
|
||||
from PyQt6.QtCore import QMutex
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
|
||||
from PyQt5.QtCore import QThread, pyqtSignal
|
||||
from Pyqt6.QtCore import QThread, pyqtSignal
|
||||
|
||||
if "--sim-serial" in sys.argv:
|
||||
from components.dummies.serial import serial
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import subprocess
|
|||
import sys
|
||||
import traceback
|
||||
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ import traceback
|
|||
|
||||
import cv2
|
||||
from bottle import post, request, response, route, run
|
||||
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtCore import QObject, pyqtSignal, pyqtSlot
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import copy
|
|||
import ctypes
|
||||
import sys
|
||||
import platform
|
||||
from PyQt5.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
|
||||
from PyQt6.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
|
||||
from .component import Component
|
||||
import ndef
|
||||
import nfc
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if "--sim-serial" in sys.argv:
|
|||
else:
|
||||
import serial
|
||||
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from lib.db import Recipes, db
|
||||
from PyQt5.QtCore import QSemaphore, pyqtSignal
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtCore import QSemaphore, pyqtSignal
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
|
||||
from .component import Component
|
||||
from .modbus_component import ModbusComponent
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import platform
|
|||
import time
|
||||
from enum import Enum
|
||||
|
||||
from PyQt5.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
|
||||
from PyQt5.QtWidgets import QMessageBox, QApplication
|
||||
from PyQt6.QtCore import QMutex, Qt, QTimer, pyqtSlot, pyqtSignal
|
||||
from PyQt6.QtWidgets import QMessageBox, QApplication
|
||||
|
||||
from .component import Component
|
||||
|
||||
|
|
@ -96,12 +96,10 @@ class USB_586x(Component):
|
|||
|
||||
@pyqtSlot()
|
||||
def start(self):
|
||||
# ACQUISITION TIMER
|
||||
self.timer = QTimer()
|
||||
self.timer.setTimerType(Qt.PreciseTimer)
|
||||
self.timer.setInterval(int(1000 / 20))
|
||||
self.timer.timeout.connect(self._get)
|
||||
self.timer.start()
|
||||
if self._timer is not None:
|
||||
self._timer.setTimerType(Qt.TimerType.PreciseTimer)
|
||||
self._timer.timeout.connect(self.on_timeout)
|
||||
self._timer.start(1000)
|
||||
super().start()
|
||||
|
||||
# Read data for buffer
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ from itertools import cycle
|
|||
import cv2
|
||||
import imutils
|
||||
import numpy as np
|
||||
from PyQt5.QtCore import QMutex, Qt, QThread, pyqtSignal
|
||||
from PyQt5.QtGui import QImage, QPixmap
|
||||
from PyQt5.QtWidgets import (QDialog, QFormLayout, QLabel, QMessageBox,
|
||||
from Pyqt6.QtCore import QMutex, Qt, QThread, pyqtSignal
|
||||
from Pyqt6.QtGui import QImage, QPixmap
|
||||
from Pyqt6.QtWidgets import (QDialog, QFormLayout, QLabel, QMessageBox,
|
||||
QPushButton, QSizePolicy, QSlider)
|
||||
|
||||
if "--sim-camera" in sys.argv:
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ from pathlib import Path
|
|||
|
||||
import cv2
|
||||
import numpy as np
|
||||
from PyQt5.QtCore import (QFileSystemWatcher, QLineF, QMutex, QPointF, QRectF,
|
||||
from Pyqt6.QtCore import (QFileSystemWatcher, QLineF, QMutex, QPointF, QRectF,
|
||||
Qt, QThread, pyqtSignal)
|
||||
from PyQt5.QtGui import (QBrush, QColor, QFont, QImage, QPainter, QPainterPath,
|
||||
from Pyqt6.QtGui import (QBrush, QColor, QFont, QImage, QPainter, QPainterPath,
|
||||
QPen, QPixmap)
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from Pyqt6.QtWidgets import QApplication
|
||||
|
||||
from .component import Component
|
||||
from .consumer import Consumer
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import socket
|
|||
from configparser import ConfigParser
|
||||
from pathlib import Path
|
||||
|
||||
from PyQt5.QtCore import QFileSystemWatcher, QObject, pyqtSignal
|
||||
from PyQt6.QtCore import QFileSystemWatcher, QObject, pyqtSignal
|
||||
|
||||
from .dict_merger import merge_dicts
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import traceback
|
|||
from functools import wraps
|
||||
from types import FunctionType
|
||||
|
||||
from PyQt5.QtCore import QCoreApplication, QObject, QThread, QTimer
|
||||
from PyQt6.QtCore import QCoreApplication, QObject, QThread, QTimer
|
||||
|
||||
|
||||
def save_init_state(self, *args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ from functools import wraps
|
|||
from queue import Queue
|
||||
from types import FunctionType
|
||||
|
||||
from PyQt5.QtCore import QCoreApplication, QObject, QSemaphore, QThread, QTimer
|
||||
from PyQt6.QtCore import QCoreApplication, QObject, QSemaphore, QThread, QTimer
|
||||
|
||||
|
||||
def thread_command_execute(self):
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from PyQt5.QtCore import QSharedMemory
|
||||
from PyQt6.QtCore import QSharedMemory
|
||||
|
||||
|
||||
class SingleProcess:
|
||||
|
|
|
|||
|
|
@ -69,8 +69,8 @@ try:
|
|||
TecnaMarpossProvasetT3, FurnessControlsLeakTester, TecnaScrewdriver, USB_586x, RFID_PN532,BrotherLabelPrinter)
|
||||
from lib.db import Users
|
||||
from lib.helpers import ConfigReader
|
||||
from PyQt5.QtCore import QObject, QThread, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtWidgets import QApplication, QMessageBox
|
||||
from PyQt6.QtCore import QObject, QThread, pyqtSignal, pyqtSlot, Qt
|
||||
from PyQt6.QtWidgets import QApplication, QMessageBox
|
||||
from ui import About, Archive, Login, Main_Window, Test, Users_Management, Recipe_Selection, \
|
||||
Barcode_Recipe_Selection
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ pillow
|
|||
pycoral
|
||||
pymodbus==3.6.8
|
||||
pyqt5
|
||||
pyqt5-tools
|
||||
#pyqt5-tools
|
||||
pyserial
|
||||
pyserial-asyncio
|
||||
qrcode
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import time
|
||||
from datetime import datetime
|
||||
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from Pyqt6.QtWidgets import QApplication
|
||||
|
||||
from src.components.os_label_printer import *
|
||||
from src.lib.helpers import ConfigReader
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import os
|
||||
import platform
|
||||
import sys
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
if platform.system().lower() == "windows":
|
||||
sys.path.append(f"{os.getcwd()}\src\components")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
from datetime import datetime
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from components import Os_Label_Printer
|
||||
from lib.helpers import ConfigReader
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
from datetime import datetime
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from Pyqt6.QtWidgets import QApplication
|
||||
|
||||
from components import Os_Label_Printer
|
||||
from lib.helpers import ConfigReader
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
from datetime import datetime
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from components import Os_Label_Printer
|
||||
from lib.helpers import ConfigReader
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import sys
|
||||
from PyQt5.QtCore import QTimer, Qt
|
||||
from Pyqt6.QtCore import QTimer, Qt
|
||||
from lxml import etree
|
||||
from PyQt5 import QtSvg
|
||||
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout
|
||||
from Pyqt6 import QtSvg
|
||||
from Pyqt6.QtWidgets import QApplication, QWidget, QVBoxLayout
|
||||
|
||||
|
||||
def turn_to(val):
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import signal
|
|||
import sys
|
||||
from uuid import uuid4 as uuid
|
||||
|
||||
from PyQt5.QtWidgets import QApplication
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
from peewee import AutoField, Model, TextField
|
||||
from playhouse.sqlite_ext import SqliteExtDatabase
|
||||
from PyQt5.QtCore import QObject, QThread, QTimer
|
||||
from PyQt6.QtCore import QObject, QThread, QTimer
|
||||
|
||||
# SETUP QUITTING ON CTRL+C
|
||||
signal.signal(signal.SIGINT, quit)
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ import traceback
|
|||
import weakref
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
from PyQt5 import uic
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt5.QtWidgets import QMainWindow
|
||||
from Pyqt6.QtCore import Qt, pyqtSignal
|
||||
from Pyqt6 import uic
|
||||
from Pyqt6.QtGui import QPixmap
|
||||
from Pyqt6.QtWidgets import QMainWindow
|
||||
from src.components import Vision
|
||||
|
||||
parser = argparse.ArgumentParser(prog='ST-TEN', description='Leak test system')
|
||||
|
|
@ -69,8 +69,8 @@ try:
|
|||
from components import (GalaxyCamera, NeoPixels, UVCCamera, VisionSaver)
|
||||
from lib.db import Users
|
||||
from lib.helpers import ConfigReader
|
||||
from PyQt5.QtCore import QObject, QThread, pyqtSignal
|
||||
from PyQt5.QtWidgets import QApplication, QMessageBox, QMainWindow
|
||||
from Pyqt6.QtCore import QObject, QThread, pyqtSignal
|
||||
from Pyqt6.QtWidgets import QApplication, QMessageBox, QMainWindow
|
||||
|
||||
class Main(QObject):
|
||||
do = pyqtSignal(dict)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QPixmap
|
||||
from ui.widget import Widget
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import weakref
|
|||
|
||||
from lib.db import Archive as ArchiveDbModel
|
||||
from lib.db import Users
|
||||
from PyQt5.QtWidgets import QAbstractItemView, QFileDialog
|
||||
from PyQt6.QtWidgets import QAbstractItemView, QFileDialog
|
||||
from ui.crud import Crud, Json_External_Dialog_Cell_Widget
|
||||
from ui.helpers import replace_widget
|
||||
from ui.widget import Widget
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import sys
|
||||
|
||||
import peewee
|
||||
from PyQt5 import Qt
|
||||
#from PyQt6 import Qt
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import Qt, QTimer, QThread
|
||||
from PyQt5.QtGui import QKeySequence, QPixmap, QPalette, QColor
|
||||
from PyQt5.QtWidgets import QShortcut, QApplication
|
||||
from PyQt6.QtCore import Qt, QTimer, QThread
|
||||
from PyQt6.QtGui import QKeySequence, QPixmap, QPalette, QColor
|
||||
from PyQt6.QtWidgets import QApplication
|
||||
|
||||
from ui.test_test import Test_Test
|
||||
from ui.widget import Widget
|
||||
|
|
@ -29,10 +29,10 @@ class Barcode_Recipe_Selection(Test_Test):
|
|||
False: QPalette(),
|
||||
None: QPalette(),
|
||||
}
|
||||
self.status_palettes[True].setColor(QPalette.Base, Qt.green)
|
||||
self.status_palettes[False].setColor(QPalette.Base, Qt.red)
|
||||
self.status_palettes["warning"].setColor(QPalette.Base, QColor(255, 165, 0))
|
||||
self.status_palettes[""].setColor(QPalette.Base, QColor(255, 255, 0))
|
||||
self.status_palettes[True].setColor(QPalette.ColorRole.Base, Qt.GlobalColor.green)
|
||||
self.status_palettes[False].setColor(QPalette.ColorRole.Base, Qt.GlobalColor.red)
|
||||
self.status_palettes["warning"].setColor(QPalette.ColorRole.Base, QColor(255, 165, 0))
|
||||
self.status_palettes[""].setColor(QPalette.ColorRole.Base, QColor(255, 255, 0))
|
||||
|
||||
self.recipe_selection_b.clicked.connect(self.parent.set_recipe_mode_table)
|
||||
self.barcode_input_l.setFocus()
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import sys
|
||||
import weakref
|
||||
|
||||
from PyQt5.QtCore import QEvent, Qt
|
||||
from PyQt5.QtWidgets import QApplication, QTableWidget
|
||||
from PyQt6.QtCore import QEvent, Qt
|
||||
from PyQt6.QtWidgets import QApplication, QTableWidget
|
||||
|
||||
|
||||
class CopyPastableCrudQTableWidget(QTableWidget):
|
||||
crud = None
|
||||
|
||||
def eventFilter(self, target, event):
|
||||
if event.type() == QEvent.KeyPress:
|
||||
if event.type() == QEvent.Type.KeyPress:
|
||||
pass
|
||||
# if event.key() == Qt.Key_C and (event.modifiers() & Qt.ControlModifier):
|
||||
# if event.key() == Qt.Key_C and (event.modifiers() & Qt.ControlModifier):
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ from datetime import datetime
|
|||
|
||||
from lib.db import Crud_DB
|
||||
from peewee import TextField
|
||||
from PyQt5.QtCore import Qt, QTimer, pyqtSignal, QSize
|
||||
from PyQt5.QtWidgets import (QAbstractItemView, QComboBox, QDialog,
|
||||
from PyQt6.QtCore import Qt, QTimer, pyqtSignal, QSize
|
||||
from PyQt6.QtWidgets import (QAbstractItemView, QComboBox, QDialog,
|
||||
QGridLayout, QHeaderView, QLineEdit, QMessageBox,
|
||||
QPlainTextEdit, QPushButton)
|
||||
from ui.dialog import Dialog
|
||||
|
|
@ -199,7 +199,7 @@ class Json_External_Dialog_Editor_Cell_Widget(QPushButton, Cell):
|
|||
super().__init__("\u238B modifica")
|
||||
Cell.__init__(self, action=action, readonly=readonly, autocomplete=autocomplete, field_name=field_name, field_alias=field_alias, field=field, row_number=row_number, crud=crud)
|
||||
self.dialog = Dialog()
|
||||
self.dialog.setAttribute(Qt.WA_DeleteOnClose, on=False)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose, on=False)
|
||||
self.dialog.setCentralWidget(self.editor)
|
||||
self.dialog.setWindowTitle(self.field_alias)
|
||||
self.clicked.connect(self.show_dialog)
|
||||
|
|
@ -277,13 +277,13 @@ class Crud(Widget):
|
|||
self.refresh("init")
|
||||
self.db_tw.horizontalHeader().sectionClicked.connect(self.toggle_sort)
|
||||
# self.db_tw.horizontalHeader().setStretchLastSection(True)
|
||||
self.db_tw.horizontalHeader().setSectionResizeMode(QHeaderView.Interactive)
|
||||
self.db_tw.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Interactive)
|
||||
# self.db_tw.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeToContents)
|
||||
self.db_tw.setSelectionBehavior(QAbstractItemView.SelectRows)
|
||||
self.db_tw.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
||||
if self.readonly is None or self.readonly is True:
|
||||
self.db_tw.setSelectionMode(QAbstractItemView.SingleSelection)
|
||||
self.db_tw.setSelectionMode(QAbstractItemView.SelectionMode.SingleSelection)
|
||||
else:
|
||||
self.db_tw.setSelectionMode(QAbstractItemView.ExtendedSelection)
|
||||
self.db_tw.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
|
||||
self.db_tw.itemSelectionChanged.connect(self.show_selection)
|
||||
self.revert_b.clicked.connect(lambda checked, selfi=weakref.ref(self): selfi().refresh("revert"))
|
||||
if self.pagination is not False:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import sys
|
||||
|
||||
from PyQt5 import QtGui, QtCore
|
||||
from PyQt5.QtCore import Qt, pyqtSlot
|
||||
from PyQt5.QtWidgets import QTableWidgetItem, QPushButton, QHeaderView, QLabel, QLineEdit
|
||||
from PyQt6 import QtGui, QtCore
|
||||
from PyQt6.QtCore import Qt, pyqtSlot
|
||||
from PyQt6.QtWidgets import QTableWidgetItem, QPushButton, QHeaderView, QLabel, QLineEdit
|
||||
from ui.widget import Widget
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import logging
|
||||
|
||||
from PyQt5 import uic
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QDialog
|
||||
from PyQt6 import uic
|
||||
from PyQt6.QtCore import Qt, pyqtSignal
|
||||
from PyQt6.QtGui import QIcon
|
||||
from PyQt6.QtWidgets import QDialog
|
||||
from ui.helpers import replace_widget
|
||||
|
||||
dialogs = {}
|
||||
|
|
@ -16,7 +16,7 @@ class Dialog(QDialog):
|
|||
super().__init__(*args, **kwargs)
|
||||
global dialogs
|
||||
dialogs[id(self)] = self
|
||||
self.setAttribute(Qt.WA_DeleteOnClose)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
||||
u = "src/ui/{0}/{0}.ui".format("dialog")
|
||||
self.ui = uic.loadUi(u, self)
|
||||
# LOGO
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import weakref
|
||||
|
||||
from PyQt5.QtCore import QObject
|
||||
from PyQt5.QtWidgets import (QCheckBox, QComboBox, QDoubleSpinBox, QLineEdit,
|
||||
from PyQt6.QtCore import QObject
|
||||
from PyQt6.QtWidgets import (QCheckBox, QComboBox, QDoubleSpinBox, QLineEdit,
|
||||
QListWidget, QPlainTextEdit, QRadioButton,
|
||||
QSpinBox)
|
||||
from ui.widget import Widget
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from PyQt5.QtGui import QColor
|
||||
from PyQt6.QtGui import QColor
|
||||
|
||||
|
||||
def calc_foreground_color(background_color):
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import subprocess
|
|||
import sys
|
||||
from components import ArchiveSynchronizer
|
||||
from lib.db import Session, Users
|
||||
from PyQt5.QtCore import QTimer, pyqtSignal
|
||||
from PyQt5.QtGui import QKeySequence, QIcon
|
||||
from PyQt5.QtWidgets import QMessageBox, QShortcut
|
||||
from PyQt6.QtCore import QTimer, pyqtSignal
|
||||
from PyQt6.QtGui import QKeySequence, QIcon, QShortcut
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
from ui.widget import Widget
|
||||
|
||||
# TESTING
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import sip
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt6 import sip
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
|
||||
from ui.window import Window
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from lib.helpers import get_resource
|
||||
from PyQt5.QtCore import QObject, Qt, QUrl
|
||||
from PyQt5.QtQuickWidgets import QQuickWidget
|
||||
from PyQt6.QtCore import QObject, Qt, QUrl
|
||||
from PyQt6.QtQuickWidgets import QQuickWidget
|
||||
|
||||
# TODO: https://www.pythonguis.com/tutorials/qml-qtquick-python-application/
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import weakref
|
|||
from glob import glob
|
||||
|
||||
from lib.db import Recipes, Users, db
|
||||
from PyQt5.QtCore import QTimer, pyqtSignal
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QFileDialog, QMessageBox, QShortcut
|
||||
from PyQt6.QtCore import QTimer, pyqtSignal
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
from PyQt6.QtWidgets import QFileDialog, QMessageBox
|
||||
|
||||
from lib.helpers.step import Step
|
||||
from ui.crud import Crud, Json_External_Dialog_Editor_Cell_Widget
|
||||
|
|
@ -421,47 +421,47 @@ class Recipe_Selection(Widget):
|
|||
"part_number": recipe.part_number,
|
||||
# "dimensione_lotto_abilitata": "x" if recipe.spec["count"] else "",
|
||||
# "dimensione_lotto": steps["count"].spec["amount"],
|
||||
"verifica_connettore_abilitata": "x" if recipe.spec["connector"] else "",
|
||||
"connettore": steps["connector"].spec["connector"],
|
||||
barcode_enable_field: "x" if recipe.spec["barcodes"] else "",
|
||||
barcode_serial_field: steps["barcodes"].spec["serial"],
|
||||
"verifica_resistenza_connettore_abilitata": "x" if recipe.spec["resistance"] else "",
|
||||
"scala_resistenza": steps["resistance"].spec["scale"],
|
||||
"r nominale": steps["resistance"].spec["expected"],
|
||||
"tolleranza_resistenza_pos": steps["resistance"].spec["tolerance_pos"],
|
||||
"tolleranza_resistenza_neg": steps["resistance"].spec["tolerance_neg"],
|
||||
"verifica_connettore_abilitata": "x" if recipe.spec.get("connector") else "",
|
||||
"connettore": steps.get("connector", {}).get("spec", {}).get("connector", ""),
|
||||
barcode_enable_field: "x" if recipe.spec.get("barcodes") else "",
|
||||
barcode_serial_field: steps.get("barcodes", {}).get("spec", {}).get("serial", ""),
|
||||
"verifica_resistenza_connettore_abilitata": "x" if recipe.spec.get("resistance") else "",
|
||||
"scala_resistenza": steps.get("resistance", {}).get("spec", {}).get("scale", ""),
|
||||
"r nominale": steps.get("resistance", {}).get("spec", {}).get("expected", ""),
|
||||
"tolleranza_resistenza_pos": steps.get("resistance", {}).get("spec", {}).get("tolerance_pos", ""),
|
||||
"tolleranza_resistenza_neg": steps.get("resistance", {}).get("spec", {}).get("tolerance_neg", ""),
|
||||
# "avvitatura_abilitata": "x" if recipe.spec["screws"] else "",
|
||||
# "viti": steps["screws"].spec["quantity"],
|
||||
"prova_tenuta_abilitata": "x" if recipe.spec["leak_1"] else "",
|
||||
"tempo_pre_riempimento": steps["leak_1"].spec["pre_filling_time"],
|
||||
"pressione_pre_riempimento": steps["leak_1"].spec["pre_filling_pressure"],
|
||||
"tempo_riempimento": steps["leak_1"].spec["filling_time"],
|
||||
"tempo_assestamento": steps["leak_1"].spec["settling_time"],
|
||||
"percentuale_minima_pressione_assestamento": steps["leak_1"].spec["settling_pressure_min_percent"],
|
||||
"percentuale_massima_pressione_assestamento": steps["leak_1"].spec["settling_pressure_max_percent"],
|
||||
"tempo_di_test": steps["leak_1"].spec["test_time"],
|
||||
"pressione_di_test_delta_minimo": steps["leak_1"].spec["test_pressure_qneg"],
|
||||
"pressione_di_test": steps["leak_1"].spec["test_pressure"],
|
||||
"pressione_di_test_delta_massimo": steps["leak_1"].spec["test_pressure_qpos"],
|
||||
"tempo_svuotamento": steps["leak_1"].spec["flush_time"],
|
||||
"pressione_svuotamento": steps["leak_1"].spec["flush_pressure"],
|
||||
"prova_tenuta_abilitata_2": "x" if recipe.spec["leak_2"] else "",
|
||||
"tempo_pre_riempimento_2": steps["leak_2"].spec["pre_filling_time"],
|
||||
"pressione_pre_riempimento_2": steps["leak_2"].spec["pre_filling_pressure"],
|
||||
"tempo_riempimento_2": steps["leak_2"].spec["filling_time"],
|
||||
"tempo_assestamento_2": steps["leak_2"].spec["settling_time"],
|
||||
"percentuale_minima_pressione_assestamento_2": steps["leak_2"].spec["settling_pressure_min_percent"],
|
||||
"percentuale_massima_pressione_assestamento_2": steps["leak_2"].spec["settling_pressure_max_percent"],
|
||||
"tempo_di_test_2": steps["leak_2"].spec["test_time"],
|
||||
"pressione_di_test_delta_minimo_2": steps["leak_2"].spec["test_pressure_qneg"],
|
||||
"pressione_di_test_2": steps["leak_2"].spec["test_pressure"],
|
||||
"pressione_di_test_delta_massimo_2": steps["leak_2"].spec["test_pressure_qpos"],
|
||||
"tempo_svuotamento_2": steps["leak_2"].spec["flush_time"],
|
||||
"pressione_svuotamento_2": steps["leak_2"].spec["flush_pressure"],
|
||||
"test_visione_abilitato": recipe.spec["vision"],
|
||||
"ricetta_visione": steps["vision"].spec["recipe"],
|
||||
"stampa_etichetta_abilitata": "x" if recipe.spec["print"] else "",
|
||||
print_template_field: steps["print"].spec["template"],
|
||||
# "viti": steps.get("screws", {}).get("spec", {}).get("quantity", ""),
|
||||
"prova_tenuta_abilitata": "x" if recipe.spec.get("leak_1") else "",
|
||||
"tempo_pre_riempimento": steps.get("leak_1", {}).get("spec", {}).get("pre_filling_time", ""),
|
||||
"pressione_pre_riempimento": steps.get("leak_1", {}).get("spec", {}).get("pre_filling_pressure", ""),
|
||||
"tempo_riempimento": steps.get("leak_1", {}).get("spec", {}).get("filling_time", ""),
|
||||
"tempo_assestamento": steps.get("leak_1", {}).get("spec", {}).get("settling_time", ""),
|
||||
"percentuale_minima_pressione_assestamento": steps.get("leak_1", {}).get("spec", {}).get("settling_pressure_min_percent", ""),
|
||||
"percentuale_massima_pressione_assestamento": steps.get("leak_1", {}).get("spec", {}).get("settling_pressure_max_percent", ""),
|
||||
"tempo_di_test": steps.get("leak_1", {}).get("spec", {}).get("test_time", ""),
|
||||
"pressione_di_test_delta_minimo": steps.get("leak_1", {}).get("spec", {}).get("test_pressure_qneg", ""),
|
||||
"pressione_di_test": steps.get("leak_1", {}).get("spec", {}).get("test_pressure", ""),
|
||||
"pressione_di_test_delta_massimo": steps.get("leak_1", {}).get("spec", {}).get("test_pressure_qpos", ""),
|
||||
"tempo_svuotamento": steps.get("leak_1", {}).get("spec", {}).get("flush_time", ""),
|
||||
"pressione_svuotamento": steps.get("leak_1", {}).get("spec", {}).get("flush_pressure", ""),
|
||||
"prova_tenuta_abilitata_2": "x" if recipe.spec.get("leak_2") else "",
|
||||
"tempo_pre_riempimento_2": steps.get("leak_2", {}).get("spec", {}).get("pre_filling_time", ""),
|
||||
"pressione_pre_riempimento_2": steps.get("leak_2", {}).get("spec", {}).get("pre_filling_pressure", ""),
|
||||
"tempo_riempimento_2": steps.get("leak_2", {}).get("spec", {}).get("filling_time", ""),
|
||||
"tempo_assestamento_2": steps.get("leak_2", {}).get("spec", {}).get("settling_time", ""),
|
||||
"percentuale_minima_pressione_assestamento_2": steps.get("leak_2", {}).get("spec", {}).get("settling_pressure_min_percent", ""),
|
||||
"percentuale_massima_pressione_assestamento_2": steps.get("leak_2", {}).get("spec", {}).get("settling_pressure_max_percent", ""),
|
||||
"tempo_di_test_2": steps.get("leak_2", {}).get("spec", {}).get("test_time", ""),
|
||||
"pressione_di_test_delta_minimo_2": steps.get("leak_2", {}).get("spec", {}).get("test_pressure_qneg", ""),
|
||||
"pressione_di_test_2": steps.get("leak_2", {}).get("spec", {}).get("test_pressure", ""),
|
||||
"pressione_di_test_delta_massimo_2": steps.get("leak_2", {}).get("spec", {}).get("test_pressure_qpos", ""),
|
||||
"tempo_svuotamento_2": steps.get("leak_2", {}).get("spec", {}).get("flush_time", ""),
|
||||
"pressione_svuotamento_2": steps.get("leak_2", {}).get("spec", {}).get("flush_pressure", ""),
|
||||
"test_visione_abilitato": recipe.spec.get("vision", ""),
|
||||
"ricetta_visione": steps.get("vision", {}).get("spec", {}).get("recipe", ""),
|
||||
"stampa_etichetta_abilitata": "x" if recipe.spec.get("print") else "",
|
||||
print_template_field: steps.get("print", {}).get("spec", {}).get("template", ""),
|
||||
}
|
||||
data.append(exportable)
|
||||
if len(data):
|
||||
|
|
@ -477,9 +477,9 @@ class Recipe_Selection(Widget):
|
|||
None,
|
||||
"Attenzione si sta cercando di cancellare tutte le ricette!",
|
||||
"Si è sicuri di voler eliminare tutte le ricette?\nQuesta operazione non può essere annullata!",
|
||||
buttons=QMessageBox.Ok | QMessageBox.Cancel,
|
||||
defaultButton=QMessageBox.Cancel
|
||||
buttons = QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel,
|
||||
defaultButton = QMessageBox.StandardButton.Cancel
|
||||
)
|
||||
if ret == QMessageBox.Ok:
|
||||
if ret == QMessageBox.StandardButton.Ok:
|
||||
Recipes.delete().execute()
|
||||
self.crud.refresh()
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from PyQt5.QtWidgets import QAbstractItemView
|
||||
from PyQt6.QtWidgets import QAbstractItemView
|
||||
from ui.editor import Editor
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
from glob import iglob
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QPushButton
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtWidgets import QPushButton
|
||||
from ui.crud import Cell, Combo_Box_Cell_Widget, Crud
|
||||
from ui.dialog import Dialog
|
||||
from ui.leak_step_editor import Leak_Step_Editor
|
||||
|
|
|
|||
|
|
@ -4,12 +4,12 @@ import os
|
|||
import sys
|
||||
import weakref
|
||||
from datetime import datetime, timedelta
|
||||
from PyQt5.QtCore import QTimer, pyqtSlot
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtCore import QTimer, pyqtSlot
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
from lib.db import Archive, Recipes, Users
|
||||
from lib.helpers import get_shift
|
||||
from lib.helpers.step import Step
|
||||
from playhouse.shortcuts import model_to_dict
|
||||
#from playhouse.shortcuts import model_to_dict
|
||||
from ui.barcode_recipe_selection import Barcode_Recipe_Selection
|
||||
from ui.helpers import replace_widget
|
||||
from ui.recipe_selection import Recipe_Selection
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import sys
|
||||
|
||||
from lib.db import Users
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QMessageBox, QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
from ui.widget import Widget
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import weakref
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtGui import QPixmap
|
||||
from ui.helpers import replace_widget
|
||||
from ui.widget import Widget
|
||||
|
||||
|
|
@ -56,4 +56,4 @@ class Test_Assembly(Widget):
|
|||
|
||||
def resizeEvent(self, event=None):
|
||||
if self.img is not None:
|
||||
self.img_l.setPixmap(self.img.scaled(self.img_l.width(), self.img_l.height(), Qt.KeepAspectRatio, Qt.SmoothTransformation))
|
||||
self.img_l.setPixmap(self.img.scaled(self.img_l.width(), self.img_l.height(), Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation))
|
||||
|
|
|
|||
|
|
@ -2,9 +2,8 @@ import re
|
|||
import sys
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import sys
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
#from PyQt6.QtWidgets import
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import sys
|
|||
import weakref
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
#from PyQt6.QtWidgets import
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import sys
|
|||
import weakref
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
#from PyQt6.QtWidgets import
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@ import sys
|
|||
import weakref
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QShortcut
|
||||
#from PyQt6.QtWidgets import
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import os.path
|
|||
import sys
|
||||
import weakref
|
||||
|
||||
from PyQt5 import QtSvg
|
||||
from PyQt5.QtCore import Qt
|
||||
|
||||
from PyQt6 import QtSvg
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtSvgWidgets import QSvgWidget
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence, QPixmap
|
||||
from PyQt5.QtWidgets import QShortcut, QApplication, QVBoxLayout
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QPixmap, QShortcut
|
||||
from PyQt6.QtWidgets import QApplication, QVBoxLayout
|
||||
from ui.test_test import Test_Test
|
||||
from lxml import etree
|
||||
|
||||
|
|
@ -24,7 +24,7 @@ class Test_Instructions(Test_Test):
|
|||
self.svg_root=None
|
||||
self.flag=False
|
||||
self.inputs={}
|
||||
self.svg_widget=QtSvg.QSvgWidget()
|
||||
self.svg_widget = QSvgWidget()
|
||||
self.layout = QVBoxLayout()
|
||||
self.layout.addWidget(self.svg_widget)
|
||||
self.svg_w.setLayout(self.layout)
|
||||
|
|
|
|||
|
|
@ -2,13 +2,13 @@ import os.path
|
|||
import sys
|
||||
import weakref
|
||||
|
||||
from PyQt5 import QtSvg
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt6 import QtSvg
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence, QPixmap
|
||||
from PyQt5.QtWidgets import QShortcut, QApplication, QVBoxLayout
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QPixmap, QShortcut
|
||||
from PyQt6.QtWidgets import QApplication, QVBoxLayout
|
||||
|
||||
from lxml import etree
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import sys
|
|||
import time
|
||||
import weakref
|
||||
|
||||
from PyQt5.QtGui import QPixmap
|
||||
from PyQt5.QtWidgets import QMessageBox, QDialog, QApplication
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt6.QtGui import QPixmap
|
||||
from PyQt6.QtWidgets import QMessageBox, QDialog, QApplication
|
||||
from PyQt6.QtCore import Qt
|
||||
from ui import Dialog
|
||||
from ui.test_instructions_reminder import Test_Instructions_Reminder
|
||||
from ui.test_test import Test_Test
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import sys
|
||||
|
||||
from PyQt5.QtGui import QPalette
|
||||
from PyQt6.QtGui import QPalette
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
@ -139,7 +139,7 @@ class Test_Resistance(Test_Test):
|
|||
p = "warning"
|
||||
else:
|
||||
p = False
|
||||
bg = self.status_palettes[p].color(QPalette.Base)
|
||||
bg = self.status_palettes[p].color(QPalette.ColorRole.Base)
|
||||
color = f"rgb({bg.red()}, {bg.green()}, {bg.blue()})"
|
||||
self.resistance_l.setStyleSheet(f"background-color: {color};\nborder: 1px solid black;\n")
|
||||
super().visualize(data, img=self.status_imgs_full[i])
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ import weakref
|
|||
from datetime import datetime
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import Qt, QTimer, pyqtSignal
|
||||
from PyQt5.QtGui import QColor, QPalette, QPixmap
|
||||
from PyQt6.QtCore import Qt, QTimer, pyqtSignal
|
||||
from PyQt6.QtGui import QColor, QPalette, QPixmap
|
||||
from ui import Dialog
|
||||
from ui.test_admin_permission import Test_Admin_Permission
|
||||
from ui.widget import Widget
|
||||
|
|
@ -73,7 +73,7 @@ class Test_Test(Widget):
|
|||
False: QPixmap("src/ui/imgs/fail.png"),
|
||||
None: QPixmap("src/ui/imgs/wait.png"),
|
||||
}
|
||||
self.status_imgs_small = {k: i.scaled(32, 32, Qt.KeepAspectRatio, Qt.SmoothTransformation) for k, i in self.status_imgs_full.items()}
|
||||
self.status_imgs_small = {k: i.scaled(32, 32, Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation) for k, i in self.status_imgs_full.items()}
|
||||
self.status_palettes = {
|
||||
True: QPalette(),
|
||||
"": QPalette(),
|
||||
|
|
@ -81,10 +81,10 @@ class Test_Test(Widget):
|
|||
False: QPalette(),
|
||||
None: QPalette(),
|
||||
}
|
||||
self.status_palettes[True].setColor(QPalette.Base, Qt.green)
|
||||
self.status_palettes[False].setColor(QPalette.Base, Qt.red)
|
||||
self.status_palettes["warning"].setColor(QPalette.Base, QColor(255, 165, 0))
|
||||
self.status_palettes[""].setColor(QPalette.Base, QColor(255, 255, 0))
|
||||
self.status_palettes[True].setColor(QPalette.ColorRole.Base, Qt.GlobalColor.green)
|
||||
self.status_palettes[False].setColor(QPalette.ColorRole.Base, Qt.GlobalColor.red)
|
||||
self.status_palettes["warning"].setColor(QPalette.ColorRole.Base, QColor(255, 165, 0))
|
||||
self.status_palettes[""].setColor(QPalette.ColorRole.Base, QColor(255, 255, 0))
|
||||
self.reset()
|
||||
self.visualize()
|
||||
|
||||
|
|
@ -237,7 +237,7 @@ class Test_Test(Widget):
|
|||
|
||||
def resizeEvent(self, event=None):
|
||||
if hasattr(self, "img_l"):
|
||||
self.img_l.setPixmap(self.img.scaled(self.img_l.width(), self.img_l.height(), Qt.KeepAspectRatio, Qt.SmoothTransformation))
|
||||
self.img_l.setPixmap(self.img.scaled(self.img_l.width(), self.img_l.height(), Qt.AspectRatioMode.KeepAspectRatio, Qt.TransformationMode.SmoothTransformation))
|
||||
|
||||
def challenge_admin(self, info):
|
||||
if not self.admin_challenged:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import sys
|
||||
|
||||
from PyQt5.QtCore import pyqtSignal
|
||||
from PyQt5.QtGui import QColor, QImage, QPalette, QPixmap
|
||||
from PyQt5.QtWidgets import QHeaderView, QProgressBar, QTableWidgetItem
|
||||
from PyQt6.QtCore import pyqtSignal
|
||||
from PyQt6.QtGui import QColor, QImage, QPalette, QPixmap
|
||||
from PyQt6.QtWidgets import QHeaderView, QProgressBar, QTableWidgetItem
|
||||
from ui.helpers import calc_foreground_color
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
|
@ -24,8 +24,8 @@ class Test_Vision(Test_Test):
|
|||
}
|
||||
self.results_tw.setColumnCount(len(self.results_table_headers))
|
||||
self.results_tw.setHorizontalHeaderLabels(self.results_table_headers.values())
|
||||
self.results_tw.horizontalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||
self.results_tw.verticalHeader().setSectionResizeMode(QHeaderView.Stretch)
|
||||
self.results_tw.horizontalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||
self.results_tw.verticalHeader().setSectionResizeMode(QHeaderView.ResizeMode.Stretch)
|
||||
|
||||
def start(self, recipe=None, step=None, pieces=None):
|
||||
show = super().start(recipe=recipe, step=step, pieces=pieces)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
import sys
|
||||
import weakref
|
||||
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt6.QtCore import Qt
|
||||
|
||||
from lib.helpers import timing
|
||||
from PyQt5.QtCore import QTimer
|
||||
from PyQt5.QtGui import QKeySequence, QPixmap
|
||||
from PyQt5.QtWidgets import QShortcut
|
||||
from PyQt6.QtCore import QTimer
|
||||
from PyQt6.QtGui import QKeySequence, QPixmap, QShortcut
|
||||
#from PyQt6.QtWidgets import
|
||||
from ui.test_test import Test_Test
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import traceback
|
||||
|
||||
from lib.db import Users
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt6.QtWidgets import QMessageBox
|
||||
from ui.crud import Crud, Line_Edit_Cell_Widget
|
||||
from ui.widget import Widget
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import logging
|
||||
|
||||
from lib.helpers import get_resource
|
||||
from PyQt5 import uic
|
||||
from PyQt5.QtCore import Qt
|
||||
from PyQt5.QtWidgets import QWidget
|
||||
from PyQt6 import uic
|
||||
from PyQt6.QtCore import Qt
|
||||
from PyQt6.QtWidgets import QWidget
|
||||
from ui.dialog import Dialog
|
||||
|
||||
|
||||
class Widget(QWidget):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.setAttribute(Qt.WA_DeleteOnClose)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
||||
me = self.__class__.__name__
|
||||
u = get_resource("ui/{0}/{0}.ui".format(me.lower()))
|
||||
self.ui = uic.loadUi(u, self)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import logging
|
||||
|
||||
from lib.helpers import get_resource
|
||||
from PyQt5 import uic
|
||||
from PyQt5.QtCore import Qt, pyqtSignal
|
||||
from PyQt5.QtGui import QIcon
|
||||
from PyQt5.QtWidgets import QMainWindow
|
||||
from PyQt6 import uic
|
||||
from PyQt6.QtCore import Qt, pyqtSignal
|
||||
from PyQt6.QtGui import QIcon
|
||||
from PyQt6.QtWidgets import QMainWindow
|
||||
from ui.dialog import Dialog
|
||||
|
||||
|
||||
|
|
@ -13,8 +13,8 @@ class Window(QMainWindow):
|
|||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
self.setAttribute(Qt.WA_DeleteOnClose)
|
||||
self.setWindowFlags(Qt.Window)
|
||||
self.setAttribute(Qt.WidgetAttribute.WA_DeleteOnClose)
|
||||
self.setWindowFlags(Qt.WindowType.Window)
|
||||
me = self.__class__.__name__
|
||||
u = get_resource("ui/{0}/{0}.ui".format(me.lower()))
|
||||
self.ui = uic.loadUi(u, self)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user