diff --git a/src/build-mac3.sh b/src/build-mac3.sh index 20322a6..172ebfb 100755 --- a/src/build-mac3.sh +++ b/src/build-mac3.sh @@ -63,8 +63,6 @@ done # PyQt5 #$PYTHON/bin/pylupdate5 conf/tonino.pro -# PyQt4 -#pylupdate4 conf/tonino.pro $QT_PATH/bin/lrelease -verbose conf/tonino.pro diff --git a/src/lib/main.py b/src/lib/main.py index 60a32ab..88a8454 100644 --- a/src/lib/main.py +++ b/src/lib/main.py @@ -59,7 +59,7 @@ import lib.serialport import lib.scales from uic import MainWindowUI, AboutDialogUI, PreferencesDialogUI, CalibDialogUI, TinyCalibDialogUI, TinyCalibDialogUI2, DebugDialogUI, PreCalibDialogUI -import uic.resources as resources +from uic import resources # platform dependent imports: if sys.platform.startswith('darwin'): @@ -409,18 +409,16 @@ def response2values(self, response:str, elemType:type, numOfArgs:Optional[int]) def toString(self, o:Any) -> str: if sys.version < '3': return str(o) + if isinstance(o, bytes): + return str(o, 'latin1') else: - if type(o) == bytes: - return str(o,'latin1') - else: - return str(o) + return str(o) def float2str(self, max_len:int, n:float) -> str: if n == int(n): return '%d'%n - else: - li:int = len(str(int(n))) + 1 # of characters for decimal point + preceding numbers - return ('{number:.{digits}f}'.format(number=n, digits=max(0,max_len-li))).rstrip('0').rstrip('.') + li:int = len(str(int(n))) + 1 # of characters for decimal point + preceding numbers + return ('{number:.{digits}f}'.format(number=n, digits=max(0,max_len-li))).rstrip('0').rstrip('.') # format given float numbers into a string of maximal total_size (plus additional space in-between) # trying to give as many digits as possible per number @@ -988,11 +986,11 @@ def scan(self,_:bool=False) -> None: raw_readings2 = self.app.getRawReadings(self.app.toninoPort) else: raw_readings2 = None - if raw_readings1 == None: + if raw_readings1 is None: raw_readings1 = raw_readings2 - if raw_readings2 == None: + if raw_readings2 is None: raw_readings2 = raw_readings1 - if dark_readings == None: + if dark_readings is None: dark_readings = [0., 0., 0., 0.] if raw_readings1 and raw_readings2 and dark_readings and len(raw_readings1)>3 and len(raw_readings2)>3 and len(dark_readings)>3: r:float = (raw_readings1[1] + raw_readings2[1]) / 2. - dark_readings[1] @@ -1181,12 +1179,14 @@ def master(self,_:bool=False) -> None: try: self.ui.logOutput.appendPlainText('') time.sleep(0.5) - res1:Optional[str] = self.insertRequestResponse('RSCAN') # RSCAN + res1:Optional[str] = self.insertRequestResponse('RSCAN') if res1 is not None: res = self.app.response2values(res1,float,5) if res is not None and len(res) == 5: self.app.pre_cal_targets.append(res[1]/res[3]) # append classic r/b ratio - self.ui.logOutput.appendPlainText('targets r/b: ' + str([f'{t:.3f}' for t in self.app.pre_cal_targets])) + out = 'targets r/b: ' + str([f'{t:.3f}' for t in self.app.pre_cal_targets]) + self.ui.logOutput.appendPlainText(out) + _log.info(out) if len(self.app.pre_cal_targets) >= self.app.pre_cal_cardinality: self.ui.pushButtonScan.setEnabled(True) self.ui.pushButtonScan.repaint() @@ -1205,12 +1205,14 @@ def scan(self,_:bool=False) -> None: self.ui.pushButtonPreCal.repaint() self.ui.logOutput.appendPlainText('') time.sleep(0.5) - res1 = self.insertRequestResponse('RSCAN') # RSCAN + res1 = self.insertRequestResponse('RSCAN') if res1: res = self.app.response2values(res1,float,5) if res is not None and len(res) == 5: self.sources.append(res[1]/res[3]) - self.ui.logOutput.appendPlainText('sources: ' + str([f'{t:.3f}' for t in self.sources])) + out = 'sources: ' + str([f'{t:.3f}' for t in self.sources]) + self.ui.logOutput.appendPlainText(out) + _log.info(out) if len(self.sources) == len(self.app.pre_cal_targets): self.ui.pushButtonPreCal.setEnabled(True) self.ui.pushButtonPreCal.repaint() @@ -1225,8 +1227,19 @@ def preCal(self,_:bool=False) -> None: try: if self.app.toninoPort: self.ui.logOutput.appendPlainText('') - c:list[float] - c,_ = poly.polyfit(self.sources,self.app.pre_cal_targets,self.app.pre_cal_degree,full=True) + _log.info('polyfit(%s.%s,%s)',self.sources,self.app.pre_cal_targets,self.app.pre_cal_degree) + c:np.ndarray + stats:list[float] + c,stats = poly.polyfit(self.sources,self.app.pre_cal_targets,self.app.pre_cal_degree,full=True) + try: + yv:np.ndarray = np.array(self.app.pre_cal_targets) + r2:np.ndarray = 1 - stats[0] / (yv.size * yv.var()) + if r2.size>0: + self.ui.logOutput.appendPlainText('RR: ') + self.ui.logOutput.appendPlainText(r2[0]) + _log.info('RR: %s',r2[0]) + except Exception as e: # pylint: disable=broad-except + _log.exception(e) coefficients:list[float] = list(c) coefficients.reverse() coefs:str = '' @@ -1235,6 +1248,7 @@ def preCal(self,_:bool=False) -> None: coefs = coefs + str(co).replace('.',',') + ' ' self.ui.logOutput.appendPlainText('coefficients:') self.ui.logOutput.appendPlainText(coefs[:-1]) + _log.info('coefficients: %s',coefs[:-1]) self.ui.logOutput.repaint() self.app.ser.sendCommand(self.app.toninoPort,self.app.formatCommand('SETPRE',coefficients,fitStringMaxLength=True)) except Exception as e: # pylint: disable=broad-except @@ -1302,7 +1316,7 @@ class ApplicationWindow(QMainWindow): endprogress = pyqtSignal() def __init__(self, application:Tonino) -> None: - super(QMainWindow, self).__init__() + super().__init__() self.app:Tonino = application self.ui:MainWindowUI.Ui_MainWindow = MainWindowUI.Ui_MainWindow() self.ui.setupUi(self) @@ -1578,7 +1592,7 @@ def fileDialog(self, msg:str, path:Optional[str]=None, ffilter:str='', openFile: else: res = QFileDialog.getSaveFileName(self,msg,path,ffilter) if res is not None and res != '': - if isinstance(res,list) or isinstance(res,tuple): + if isinstance(res, (list, tuple)): res = res[0] self.app.setWorkingDirectory(res) return res @@ -1801,7 +1815,8 @@ def sliderChanged(self,_:int=0) -> None: self.app.scales.setPolyfitDegree(self.ui.degreeSlider.value()) self.ui.widget.canvas.redraw(force=True) self.updateLCDS() - _log.debug('sliderChanged(%s)',self.ui.degreeSlider.value()) + if _log.isEnabledFor(logging.DEBUG): + _log.debug('sliderChanged(%s)',self.ui.degreeSlider.value()) # @@ -1877,8 +1892,7 @@ def selectionChanged(self, _newSelection:QItemSelection, _oldSelection:QItemSele def getSelectedRows(self) -> list[int]: if self.ui.tableView and self.ui.tableView.selectionModel(): return [s.row() for s in self.ui.tableView.selectionModel().selectedRows()] - else: - return [] + return [] # invoked by clicks on coordinates in the graph def toggleSelection(self, row:int) -> None: @@ -1931,7 +1945,7 @@ def showAbout(self,_:bool=False) -> None: def toggleDebug(self, ui:AboutDialogUI.Ui_Dialog) -> None: modifiers:Qt.KeyboardModifier = QApplication.keyboardModifiers() - if modifiers == Qt.KeyboardModifier.MetaModifier|Qt.KeyboardModifier.AltModifier: + if modifiers == (Qt.KeyboardModifier.MetaModifier|Qt.KeyboardModifier.AltModifier): self.toggleDebugLogging() else: self.debug = (self.debug + 1) % 3 @@ -1954,7 +1968,7 @@ def toggleDebugLogging(self) -> None: else: level = logging.INFO self.showMessage(QApplication.translate('Message','debug logging OFF',None),msecs=3000) - loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict if ('.' not in name)] # @UndefinedVariable pylint: disable=no-member + loggers = [logging.getLogger(name) for name in logging.root.manager.loggerDict if '.' not in name] # @UndefinedVariable pylint: disable=no-member for logger in loggers: logger.setLevel(level) for handler in logger.handlers: @@ -2031,9 +2045,10 @@ def checkPorts(self, ports:list[serial.tools.list_ports_common.ListPortInfo], on self.app.processEvents() version:Optional[list[int]] = self.app.getToninoFirmwareVersion(p.device,onStartup) if version: - _log.debug('port: %s',p.device) - _log.debug('serial: %s',p.serial_number) - _log.debug('firmware version: %s',version) + if _log.isEnabledFor(logging.DEBUG): + _log.debug('port: %s',p.device) + _log.debug('serial: %s',p.serial_number) + _log.debug('firmware version: %s',version) res = p.device,version,p.serial_number break return res diff --git a/src/lib/scales.py b/src/lib/scales.py index 9b705df..57da74d 100755 --- a/src/lib/scales.py +++ b/src/lib/scales.py @@ -225,20 +225,26 @@ def float2float(f, n=1): def computePolyfit(self) -> None: if self.polyfit_degree and len(self.coordinates) > self.polyfit_degree: _log.debug('computePolyfit: %s',self.polyfit_degree) - xv = np.array([e[0] for e in self.coordinates]) - yv = np.array([e[1] for e in self.coordinates]) + xv:np.ndarray = np.array([e[0] for e in self.coordinates]) + yv:np.ndarray = np.array([e[1] for e in self.coordinates]) + c:np.ndarray + stats:list[float] c, stats = poly.polyfit(xv,yv,self.polyfit_degree,full=True) - r2 = 1 - stats[0] / (yv.size * yv.var()) - if r2 and len(r2)>0: - self.setRR(r2[0]) - else: + try: + r2:np.ndarray = 1 - stats[0] / (yv.size * yv.var()) + if r2.size>0: + self.setRR(r2[0]) + else: + self.setRR(None) + except Exception: self.setRR(None) self.coefficients = list(c) self.coefficients.reverse() - _log.debug('polyfit(%s)=%s',self.polyfit_degree,self.coefficients) - # compute the inverse mapping - ci, _ = poly.polyfit(yv,xv,self.polyfit_degree,full=True) - _log.debug('inverse_polyfit(%s)=%s',self.polyfit_degree,list(reversed(list(ci)))) + if _log.isEnabledFor(logging.DEBUG): + _log.debug('polyfit(%s)=%s',self.polyfit_degree,self.coefficients) + # compute the inverse mapping + ci, _ = poly.polyfit(yv,xv,self.polyfit_degree,full=True) + _log.debug('inverse_polyfit(%s)=%s',self.polyfit_degree,list(reversed(list(ci)))) else: self.coefficients = None self.setRR(None) diff --git a/src/lib/serialport.py b/src/lib/serialport.py index 5fd97db..528cae2 100644 --- a/src/lib/serialport.py +++ b/src/lib/serialport.py @@ -31,14 +31,14 @@ _log: Final = logging.getLogger(__name__) def str2cmd(s:Union[str,bytes]) -> bytes: - if type(s) == bytes: + if isinstance(s,bytes): return s - return bytes(cast(str,s),'ascii') + bytes(cast(str,s),'ascii') def cmd2str(c:Union[str,bytes]) -> str: - if type(c) == bytes: + if isinstance(c,bytes): return str(c,'latin1') - return cast(str,c) + cast(str,c) class SerialPort: @@ -90,7 +90,7 @@ def configurePort(self,port:str) -> None: def openPort(self,port:str) -> None: _log.debug('openPort(%s)',port) try: - if self.port != None and port != self.port: + if self.port is not None and port != self.port: self.closePort() if not self.SP.is_open: # open port if not yet open @@ -120,8 +120,7 @@ def writeString(self,port:str, s:str) -> Optional[str]: self.SP.write(str2cmd(s + '\n')) self.SP.flush() return cmd2str(self.SP.readline()) - else: - return None + return None except Exception as e: # pylint: disable=broad-except _log.exception(e) self.closePort() @@ -141,12 +140,14 @@ def sendCommand(self,port:str, command:str, retry:bool=True) -> Optional[str]: time.sleep(0.3) r:bytes = self.SP.readline() response:str = cmd2str(r) - _log.debug('response(%s): %s',len(response),response.strip()) + if _log.isEnabledFor(logging.DEBUG): + _log.debug('response(%s): %s',len(response),response.strip()) if not (response and len(response) > 0): # we got an empty line, maybe the next line contains the response r = self.SP.readline() response = cmd2str(r) - _log.debug('second response(%s):%s',len(response),response.strip()) + if _log.isEnabledFor(logging.DEBUG): + _log.debug('second response(%s):%s',len(response),response.strip()) if response and len(response) > 0: # each is answered by the Tonino by returning ":\n" parts:list[str] = response.split(command + self.cmdSeparatorChar) @@ -156,16 +157,14 @@ def sendCommand(self,port:str, command:str, retry:bool=True) -> Optional[str]: res = '' if retry and res == None: return self.sendCommand(port,command,False) - else: - _log.debug('result: %s',res) - return res + _log.debug('result: %s',res) + return res except Exception as e: # pylint: disable=broad-except _log.exception(e) self.closePort() if retry: return self.sendCommand(port,command,False) - else: - return None + return None def getSerialPorts(self) -> list[serial.tools.list_ports_common.ListPortInfo]: # we are looking for @@ -187,19 +186,16 @@ def getSerialPorts(self) -> list[serial.tools.list_ports_common.ListPortInfo]: if tinyToninos and len(tinyToninos) > 0: self.setModel(1) return tinyToninos - else: - self.setModel(0) - return list(self.filter_ports_by_vid_pid(ports,vid,classicToninoPID)) - else: - # pyserial >2.7 - ports = list(serial.tools.list_ports.comports()) - tinyToninos = list(self.filter_ports_by_vid_pid(ports,vid,tinyToninoPID)) - if tinyToninos and len(tinyToninos) > 0: - self.setModel(1) - return tinyToninos - else: - self.setModel(0) - return list(self.filter_ports_by_vid_pid(ports,vid,classicToninoPID)) + self.setModel(0) + return list(self.filter_ports_by_vid_pid(ports,vid,classicToninoPID)) + # pyserial >2.7 + ports = list(serial.tools.list_ports.comports()) + tinyToninos = list(self.filter_ports_by_vid_pid(ports,vid,tinyToninoPID)) + if tinyToninos and len(tinyToninos) > 0: + self.setModel(1) + return tinyToninos + self.setModel(0) + return list(self.filter_ports_by_vid_pid(ports,vid,classicToninoPID)) def filter_ports_by_vid_pid(self,ports:list[serial.tools.list_ports_common.ListPortInfo],vid:Optional[int]=None,pid:Optional[int]=None) -> Iterator[serial.tools.list_ports_common.ListPortInfo]: """ Given a VID and PID value, scans for available port, and diff --git a/src/lib/suppress_errors.py b/src/lib/suppress_errors.py index f3041fe..7246fe8 100644 --- a/src/lib/suppress_errors.py +++ b/src/lib/suppress_errors.py @@ -38,14 +38,14 @@ def __init__(self): def __enter__(self): # Assign the null pointers to stdout and stderr. - if self.save_fds != []: + if self.save_fds: os.dup2(self.null_fds[0],1) os.dup2(self.null_fds[1],2) def __exit__(self, *_): # Re-assign the real stdout/stderr back to (1) and (2) try: - if self.save_fds != []: + if self.save_fds: os.dup2(self.save_fds[0],1) os.dup2(self.save_fds[1],2) except Exception: # pylint: disable=broad-except diff --git a/src/requirements-mac.txt b/src/requirements-mac.txt index ca8f25a..dd2993e 100644 --- a/src/requirements-mac.txt +++ b/src/requirements-mac.txt @@ -3,6 +3,6 @@ pyserial==3.5 pyyaml==6.0 numpy==1.24.1 scipy==1.10.0 -PyQt6==6.4.0 +PyQt6==6.4.1 matplotlib==3.6.3 darkdetect==0.7.1 diff --git a/src/requirements-win.txt b/src/requirements-win.txt index b08464d..802009a 100644 --- a/src/requirements-win.txt +++ b/src/requirements-win.txt @@ -3,5 +3,5 @@ pyserial==3.5 pyyaml==6.0 numpy==1.24.1 scipy==1.10.0 -PyQt6==6.4.0 +PyQt6==6.4.1 matplotlib==3.6.3 diff --git a/src/translations/tonino_de.ts b/src/translations/tonino_de.ts index fa9a2f4..7e23475 100755 --- a/src/translations/tonino_de.ts +++ b/src/translations/tonino_de.ts @@ -4,137 +4,137 @@ Dialog - + You need to recalibrate your Tonino after changing the default scale. Continue? Sie müssen Ihren Tonino neu kalibrieren, nachdem Sie die Standard Messskala geändert haben. Weitermachen? - + Calibration Kalibrierung - - - + + + Scan Messen - + Debug - + PreCalibration - + Clear Zurücksetzen - + Master - + PreCal - + Set - + Reset - + Open Scale Skala öffnen - + Save As Speichern unter - + Apply Scale Skala anwenden - + You need to recalibrate your Tonino after reseting. Continue? Sie müssen Ihren Tonino nach dem Zurücksetzen neu kalibrieren. Weitermachen? - + Uploading the scale will replace the existing scale on your Tonino. Continue? Durch das Übertragen der Messskala wird die vorhandene Messskala auf Ihrem Tonino ersetzt. Weitermachen? - + Version - + Copyright © 2023 Marko Luther, Paul Holleis - + OK - - + + Tonino* - - + + Tonino** - - + + Tonino - + Serial: - + The Tonino firmware is outdated! Die Tonino Firmware ist veraltet! - + Do you want to update to %s? Wollen Sie auf Version %s aktualisieren? - + The scale has been modified. Die Skala wurde geändert. - + Do you want to save your changes? Wollen Sie die Änderungen speichern? @@ -142,37 +142,37 @@ MAC_APPLICATION_MENU - + Services Dienste - + Hide %1 %1 ausblenden - + Hide Others Andere ausblenden - + Show All Alle anzeigen - + Preferences... Einstellungen... - + Quit %1 %1 beenden - + About %1 Über %1 @@ -180,194 +180,194 @@ MainWindow - - + + Tonino - + AVG - + STDEV - + CONF95% - + Add Hinzufügen - + Delete Löschen - + Sort Sortieren - + Clear Zurücksetzen - + Calibrate Kalibrieren - + Defaults Werkseinstellung - + Upload Übertragen - + File Ablage - + Open Recent Benutzte Skalen - + Apply Recent Benutzte Skalen - + Quit Beenden - + Ctrl+Q - - + + Help Hilfe - + Edit Bearbeiten - + Open... Öffnen... - + Ctrl+O - + Save Speichern - + Ctrl+S - + Save As... Speichern unter... - + Ctrl+Shift+S - + Ctrl+? - + About Über - + About Qt Über Qt - + Settings Einstellungen - + Cut Ausschneiden - + Ctrl+X - + Copy Kopieren - + Ctrl+C - + Paste Einfügen - + Ctrl+V - + Apply... Anwenden... - + Name - + add hinzufügen - + delete löschen @@ -380,9 +380,9 @@ Kalibrierung aktualisiert - - - + + + Error @@ -399,83 +399,83 @@ Das Speichern der Programmeinstellungen ist fehlgeschlagen - + Firmware update failed Firmware-Aktualisierung fehlgeschlagen - + Firmware successfully updated Die Firmware wurde aktualisiert - + Scale could not be loaded Skala konnte nicht geöffnet werden - + Scale could not be saved Skala konnte nicht gespeichert werden - + Scale could not be applied Skala konnte nicht angewendet werden - + Updating firmware... Die Firmware wird aktualisiert... - + Tonino reset to defaults Werkseinstellung wiederhergestellt - + Scale uploaded Skala übertragen - - + + Coordinate out of range Koordinate außerhalb des erlaubten Bereichs - + debug logging ON debug logging AN - + debug logging OFF debug logging AUS - + Connecting... Verbinden... - + Not connected Nicht Verbunden - + Connected to Tonino Verbunden mit Tonino - + Connected to TinyTonino Verbunden mit TinyTonino - + Scale could not be retrieved Skala konnte nicht empfangen werden @@ -483,72 +483,72 @@ Preferences - + Preferences Einstellungen - + Default Scale Standard Messskala - + Display Anzeige - + dim dunkel - + bright hell - + Flip Drehen - + Target Ziel - + Value Wert - + Range Spanne - + 0 - + 5 - + Name - + Agtron - + Tonino @@ -560,37 +560,37 @@ QDialogButtonBox - + OK - + Save Speichern - + Don't Save Nicht speichern - + Open Öffnen - + Cancel Abbrechen - + Close Schließen - + Abort Abort diff --git a/src/translations/tonino_es.ts b/src/translations/tonino_es.ts index 0259d93..86ef10c 100755 --- a/src/translations/tonino_es.ts +++ b/src/translations/tonino_es.ts @@ -4,137 +4,137 @@ Dialog - + You need to recalibrate your Tonino after changing the default scale. Continue? Deberá volver a calibrar su Tonino después de cambiar la escala de medición predeterminada. ¿Sigue adelante? - + Calibration Calibración - - - + + + Scan Escanear - + Debug - + PreCalibration - + Clear Limpiar - + Master - + PreCal - + Set - + Reset - + Open Scale Abrir Escala - + Save As Guardar como - + Apply Scale Aplicar Escala - + You need to recalibrate your Tonino after reseting. Continue? Deberá volver a calibrar su Tonino después de restablecerlo. ¿Sigue adelante? - + Uploading the scale will replace the existing scale on your Tonino. Continue? La transferencia de la escala de medidas reemplazará la escala de medidas existente en su Tonino. ¿Sigue adelante? - + Version Versión - + Copyright © 2023 Marko Luther, Paul Holleis - + OK - - + + Tonino* - - + + Tonino** - - + + Tonino - + Serial: - + The Tonino firmware is outdated! ¡El firmware de Tonino está desactualizado! - + Do you want to update to %s? ¿Desea actualizar a %s? - + The scale has been modified. La escala ha sido modificada. - + Do you want to save your changes? ¿Desea guardar los cambios? @@ -142,37 +142,37 @@ MAC_APPLICATION_MENU - + Services Servicios - + Hide %1 Ocultar %1 - + Hide Others Ocultar otros - + Show All Mostrar todo - + Preferences... Preferencias… - + Quit %1 Salir de %1 - + About %1 Acerca de %1 @@ -180,194 +180,194 @@ MainWindow - - + + Tonino - + AVG - + STDEV - + CONF95% - + Add Añadir - + Delete Eliminar - + Sort Ordenar - + Clear Limpiar - + Calibrate Calibrar - + Defaults Por Defecto - + Upload Cargar - + File Archivo - + Open Recent Abrir recientes - + Apply Recent Aplicar Reciente - + Quit Salir - + Ctrl+Q - - + + Help Ayuda - + Edit Edición - + Open... Abrir... - + Ctrl+O - + Save Guardar - + Ctrl+S - + Save As... Guarda como... - + Ctrl+Shift+S - + Ctrl+? - + About Acerca - + About Qt Acerca de Qt - + Settings Preferencias - + Cut Cortar - + Ctrl+X - + Copy Copiar - + Ctrl+C - + Paste Pegar - + Ctrl+V - + Apply... Aplicar... - + Name Nombre - + add Añadir - + delete eliminar @@ -380,9 +380,9 @@ Calibración actualizada - - - + + + Error @@ -399,83 +399,83 @@ Fallo al guardar las configuraciones - + Firmware update failed Falló la actualización del firmware - + Firmware successfully updated Firmware actualizado correctamente - + Scale could not be loaded La escala no pudo ser cargada - + Scale could not be saved La escala no pudo ser guardada - + Scale could not be applied La escala no pudo ser aplicada - + Updating firmware... Actualizando firmware... - + Tonino reset to defaults Tonino restaurado a valores por defecto - + Scale uploaded Escala cargada - - + + Coordinate out of range Coordinar fuera de rango - + debug logging ON - + debug logging OFF - + Connecting... Conectando... - + Not connected No conectado - + Connected to Tonino Conectado a Tonino - + Connected to TinyTonino Conectado a TinyTonino - + Scale could not be retrieved La escala no pudo ser recuperar @@ -483,72 +483,72 @@ Preferences - + Preferences Preferencias - + Default Scale Escala de medida estándar - + Display - + dim atenuar - + bright brillo - + Flip Retorcido - + Target Objetivo - + Value Valor - + Range Margen - + 0 - + 5 - + Name Nombre - + Agtron - + Tonino @@ -560,37 +560,37 @@ QDialogButtonBox - + OK Aceptar - + Save Guardar - + Don't Save No guardar - + Open Abrir - + Cancel Cancelar - + Close Cerrar - + Abort Interrumpir diff --git a/src/translations/tonino_fr.ts b/src/translations/tonino_fr.ts index 606a284..a5b7f25 100755 --- a/src/translations/tonino_fr.ts +++ b/src/translations/tonino_fr.ts @@ -4,137 +4,137 @@ Dialog - + You need to recalibrate your Tonino after changing the default scale. Continue? Vous devrez recalibrer votre Tonino après avoir changé l'échelle de mesure par défaut. Continuer? - + Calibration Calibrage - - - + + + Scan Mesurer - + Debug - + PreCalibration - + Clear Tout effacer - + Master - + PreCal - + Set - + Reset - + Open Scale Ouvrir Échelle - + Save As Enregistrer sous - + Apply Scale Appliquer Échelle - + You need to recalibrate your Tonino after reseting. Continue? Vous devrez recalibrer votre Tonino après l'avoir réinitialisé. Continuer? - + Uploading the scale will replace the existing scale on your Tonino. Continue? Le transfert de l'échelle de mesure remplacera l'échelle de mesure existante sur votre Tonino. Continuer? - + Version - + Copyright © 2023 Marko Luther, Paul Holleis - + OK - - + + Tonino* - - + + Tonino** - - + + Tonino - + Serial: - + The Tonino firmware is outdated! Il y a une nouvelle version du logiciel ! - + Do you want to update to %s? Voulez-vous installer la nouvelle version %s ? - + The scale has been modified. L'échelle a été modifiée. - + Do you want to save your changes? Voulez-vous sauvegarder les modifications ? @@ -142,37 +142,37 @@ MAC_APPLICATION_MENU - + Services Services - + Hide %1 Masquer %1 - + Hide Others Masquer les autres - + Show All Tout afficher - + Preferences... Préférences... - + Quit %1 Quitter %1 - + About %1 À propos de %1 @@ -180,194 +180,194 @@ MainWindow - - + + Tonino - + AVG - + STDEV - + CONF95% - + Add Ajouter - + Delete Supprimer - + Sort Trier - + Clear Tout effacer - + Calibrate Calibrer - + Defaults Paramètres par défaut - + Upload Charger - + File Fichier - + Open Recent Ouvrir récent - + Apply Recent Appliquer récent - + Quit Quitter - + Ctrl+Q - - + + Help Aide - + Edit Édition - + Open... Ouvrir... - + Ctrl+O - + Save Enregistrer - + Ctrl+S - + Save As... Enregistrer sous... - + Ctrl+Shift+S - + Ctrl+? - + About À propos - + About Qt À propos de Qt - + Settings Préférences - + Cut Couper - + Ctrl+X - + Copy Copier - + Ctrl+C - + Paste Coller - + Ctrl+V - + Apply... Appliquer... - + Name Nom - + add ajouter - + delete supprimer @@ -380,9 +380,9 @@ Étalonnage mis à jour - - - + + + Error @@ -399,83 +399,83 @@ La sauvegarde des paramètres a échoué - + Firmware update failed La mise à jour a échoué - + Firmware successfully updated La mise à jour a été correctement installée - + Scale could not be loaded L'échelle n'a pas pu être chargée - + Scale could not be saved L'échelle n'a pas pu être sauvegardée - + Scale could not be applied L'échelle n'a pas pu être appliquée - + Updating firmware... Mise à jour en cours... - + Tonino reset to defaults Tonino utilise les paramètres par défaut - + Scale uploaded Échelle chargée - - + + Coordinate out of range Les coordinées sont hors limite - + debug logging ON - + debug logging OFF - + Connecting... Connection en cours... - + Not connected Non connecté - + Connected to Tonino Connecté à Tonino - + Connected to TinyTonino Connecté à TinyTonino - + Scale could not be retrieved L'échelle n'a pas pu être récupéré @@ -483,72 +483,72 @@ Preferences - + Preferences Préférences - + Default Scale Échelle de mesure standard - + Display Afficher - + dim sombre - + bright lumineux - + Flip Tordu - + Target Cible - + Value Valeur - + Range Marge - + 0 - + 5 - + Name Nom - + Agtron - + Tonino @@ -560,37 +560,37 @@ QDialogButtonBox - + OK - + Save Enregistrer - + Don't Save Ne pas enregistrer - + Open Ouvrir - + Cancel Annuler - + Close Fermer - + Abort Abandonner diff --git a/src/translations/tonino_it.ts b/src/translations/tonino_it.ts index 306e1a3..cbf3d2d 100755 --- a/src/translations/tonino_it.ts +++ b/src/translations/tonino_it.ts @@ -4,137 +4,137 @@ Dialog - + You need to recalibrate your Tonino after changing the default scale. Continue? Dovrai ricalibrare il tuo Tonino dopo aver cambiato la scala di misurazione predefinita. Continuare? - + Calibration Calibrazione - - - + + + Scan Misura - + Debug - + PreCalibration - + Clear Liberare - + Master - + PreCal - + Set - + Reset - + Open Scale Apri scala - + Save As Salva come - + Apply Scale Applica scala - + You need to recalibrate your Tonino after reseting. Continue? Dovrai ricalibrare il tuo Tonino dopo averlo resettato. Continuare? - + Uploading the scale will replace the existing scale on your Tonino. Continue? Il trasferimento della scala di misurazione sostituirà la scala di misurazione esistente sul tuo Tonino. Continuare? - + Version Versione - + Copyright © 2023 Marko Luther, Paul Holleis - + OK - - + + Tonino* - - + + Tonino** - - + + Tonino - + Serial: - + The Tonino firmware is outdated! Il firmware di Tonino è obsoleto! - + Do you want to update to %s? Vuoi aggiornare alla versione %s? - + The scale has been modified. La scala è stata modificata. - + Do you want to save your changes? Vuoi salvare i cambiamenti? @@ -142,37 +142,37 @@ MAC_APPLICATION_MENU - + Services Servizi - + Hide %1 Nascondi %1 - + Hide Others Nascondi altre - + Show All Mostra tutte - + Preferences... Preferenze... - + Quit %1 Esci da %1 - + About %1 Informazioni su %1 @@ -180,194 +180,194 @@ MainWindow - - + + Tonino - + AVG - + STDEV - + CONF95% - + Add Aggiungere - + Delete Cancellare - + Sort Ordina - + Clear Liberare - + Calibrate Calibra - + Defaults Impostazione di base - + Upload Caricare - + File - + Open Recent Apri recente - + Apply Recent Applica recente - + Quit Esci - + Ctrl+Q - - + + Help Aiuto - + Edit Composizione - + Open... Apri... - + Ctrl+O - + Save Salva - + Ctrl+S - + Save As... Salva come... - + Ctrl+Shift+S - + Ctrl+? - + About Informazioni - + About Qt Informazioni di Qt - + Settings Preferenze - + Cut Taglia - + Ctrl+X - + Copy Copia - + Ctrl+C - + Paste Incolla - + Ctrl+V - + Apply... Applica... - + Name Nome - + add aggiungere - + delete cancellare @@ -380,9 +380,9 @@ La calibrazione è stato aggiornato - - - + + + Error @@ -399,83 +399,83 @@ Salvataggio impostazioni fallito - + Firmware update failed L'aggiornamento del firmware è fallito - + Firmware successfully updated Il firmware è stato aggiornato - + Scale could not be loaded La scala non è stata caricata - + Scale could not be saved La scala non è stata salvata - + Scale could not be applied Scala non applicabile - + Updating firmware... Aggiornamento firmware... - + Tonino reset to defaults Tonino resettato all'impostazione di base - + Scale uploaded Scala caricata - - + + Coordinate out of range Coordinate fuori dal range - + debug logging ON - + debug logging OFF - + Connecting... Connessione in corso... - + Not connected Non collegato - + Connected to Tonino Collegato a Tonino - + Connected to TinyTonino Collegato a TinyTonino - + Scale could not be retrieved La scala non è stata ricevuto @@ -483,72 +483,72 @@ Preferences - + Preferences Preferenze - + Default Scale Scala di misura standard - + Display - + dim scuro - + bright chiaro - + Flip Ritorto - + Target Valore top - + Value Valore - + Range Gamma - + 0 - + 5 - + Name Nome - + Agtron - + Tonino @@ -556,37 +556,37 @@ QDialogButtonBox - + OK - + Save Salva - + Don't Save Non salvare - + Open Apri - + Cancel Anulla - + Close Chiudi - + Abort Cancellare diff --git a/src/translations/tonino_nl.ts b/src/translations/tonino_nl.ts index 0c7c803..d689dcb 100755 --- a/src/translations/tonino_nl.ts +++ b/src/translations/tonino_nl.ts @@ -4,137 +4,137 @@ Dialog - + You need to recalibrate your Tonino after changing the default scale. Continue? Je moet je Tonino opnieuw kalibreren nadat je de standaard meetschaal hebt gewijzigd. Ga verder? - + Calibration Kalibratie - - - + + + Scan Scannen - + Debug - + PreCalibration - + Clear Legen - + Master - + PreCal - + Set - + Reset - + Open Scale Open Schaal - + Save As Opslaan Als - + Apply Scale Schaal Toepassen - + You need to recalibrate your Tonino after reseting. Continue? Je moet je Tonino opnieuw kalibreren na het resetten. Ga verder? - + Uploading the scale will replace the existing scale on your Tonino. Continue? Door de meetschaal over te zetten, vervangt u de bestaande maatschaal op uw Tonino. Ga verder? - + Version Versie - + Copyright © 2023 Marko Luther, Paul Holleis - + OK OK - - + + Tonino* - - + + Tonino** - - + + Tonino Tonino - + Serial: - + The Tonino firmware is outdated! De Tonino firmware is verouderd! - + Do you want to update to %s? Wilt u updaten naar %s? - + The scale has been modified. De schaal is gewijzigd. - + Do you want to save your changes? Wilt u uw wijzigingen opslaan? @@ -142,37 +142,37 @@ MAC_APPLICATION_MENU - + Services Voorzieningen - + Hide %1 Verberg %1 - + Hide Others Anderen Verbergen - + Show All Toon Alles - + Preferences... Voorkeuren... - + Quit %1 Sluiten %1 - + About %1 Over %1 @@ -180,194 +180,194 @@ MainWindow - - + + Tonino - + AVG - + STDEV - + CONF95% - + Add Toevoegen - + Delete Verwijder - + Sort Sorteer - + Clear Legen - + Calibrate Kalibreren - + Defaults Standaardwaarden - + Upload Uploaden - + File Bestand - + Open Recent Open Recent - + Apply Recent Toepassen Recent - + Quit Sluiten - + Ctrl+Q - - + + Help - + Edit Wijzig - + Open... Open... - + Ctrl+O - + Save Opslaan - + Ctrl+S - + Save As... Opslaan Als... - + Ctrl+Shift+S - + Ctrl+? - + About Over - + About Qt Over Qt - + Settings Instellingen - + Cut Knip - + Ctrl+X - + Copy Kopieer - + Ctrl+C - + Paste Plak - + Ctrl+V - + Apply... Toepassen... - + Name Naam - + add toevoegen - + delete verwijder @@ -392,9 +392,9 @@ Kalibratie geupdatet - - - + + + Error @@ -411,83 +411,83 @@ Instellingen konden niet worden opgeslagen - + Firmware update failed Firmware update mislukt - + Firmware successfully updated Firmware geupdatet - + Scale could not be loaded Schaal kon niet worden geladen - + Scale could not be saved Schaal kon niet worden opgeslagen - + Scale could not be applied Schaal kon niet worden toegepast - + Updating firmware... Firmware updaten... - + Tonino reset to defaults Tonino voorkeuren resetten - + Scale uploaded Schaal geupload - - + + Coordinate out of range Coordinaat buiten bereik - + debug logging ON - + debug logging OFF - + Connecting... Verbinden... - + Not connected Niet verbonden - + Connected to Tonino Verbonden met Tonino - + Connected to TinyTonino Verbonden met TinyTonino - + Scale could not be retrieved Schaal kon niet worden ontvangen @@ -495,72 +495,72 @@ Preferences - + Preferences Voorkeuren - + Default Scale Standaard Meetschaal - + Display Aonen - + dim donker - + bright licht - + Flip Gedraaid - + Target Doel - + Value Waarde - + Range Marge - + 0 0 - + 5 5 - + Name Naam - + Agtron - + Tonino Tonino @@ -572,37 +572,37 @@ QDialogButtonBox - + OK OK - + Save Opslaan - + Don't Save Niet Opslaan - + Open Open - + Cancel Annuleer - + Close Sluit - + Abort Afbreken diff --git a/src/ui/AboutDialogUI.ui b/src/ui/AboutDialogUI.ui index f6fabcd..27d6e0c 100644 --- a/src/ui/AboutDialogUI.ui +++ b/src/ui/AboutDialogUI.ui @@ -132,6 +132,9 @@ Serial + + Qt::TextSelectableByMouse + diff --git a/src/uic/AboutDialogUI.py b/src/uic/AboutDialogUI.py index 6aa056b..1266741 100644 --- a/src/uic/AboutDialogUI.py +++ b/src/uic/AboutDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/AboutDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -19,7 +19,7 @@ def setupUi(self, Dialog): self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") - self.logoLabel = QtWidgets.QLabel(Dialog) + self.logoLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -36,7 +36,7 @@ def setupUi(self, Dialog): self.verticalLayout.setObjectName("verticalLayout") spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.verticalLayout.addItem(spacerItem) - self.nameLabel = QtWidgets.QLabel(Dialog) + self.nameLabel = QtWidgets.QLabel(parent=Dialog) font = QtGui.QFont() font.setPointSize(20) font.setBold(True) @@ -48,26 +48,27 @@ def setupUi(self, Dialog): self.nameLabel.setTextFormat(QtCore.Qt.TextFormat.RichText) self.nameLabel.setObjectName("nameLabel") self.verticalLayout.addWidget(self.nameLabel) - self.debugLabel = QtWidgets.QLabel(Dialog) + self.debugLabel = QtWidgets.QLabel(parent=Dialog) self.debugLabel.setText("") self.debugLabel.setObjectName("debugLabel") self.verticalLayout.addWidget(self.debugLabel) - self.versionLabel = QtWidgets.QLabel(Dialog) + self.versionLabel = QtWidgets.QLabel(parent=Dialog) self.versionLabel.setToolTip("") self.versionLabel.setAccessibleDescription("") self.versionLabel.setText("Version") self.versionLabel.setObjectName("versionLabel") self.verticalLayout.addWidget(self.versionLabel) - self.copyrightLabel = QtWidgets.QLabel(Dialog) + self.copyrightLabel = QtWidgets.QLabel(parent=Dialog) self.copyrightLabel.setToolTip("") self.copyrightLabel.setAccessibleDescription("") self.copyrightLabel.setText("Copyright © 2023 Marko Luther, Paul Holleis") self.copyrightLabel.setObjectName("copyrightLabel") self.verticalLayout.addWidget(self.copyrightLabel) - self.serialLabel = QtWidgets.QLabel(Dialog) + self.serialLabel = QtWidgets.QLabel(parent=Dialog) self.serialLabel.setToolTip("") self.serialLabel.setAccessibleDescription("") self.serialLabel.setText("Serial") + self.serialLabel.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.TextSelectableByMouse) self.serialLabel.setObjectName("serialLabel") self.verticalLayout.addWidget(self.serialLabel) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) @@ -76,7 +77,7 @@ def setupUi(self, Dialog): self.horizontalButtonLayout.setObjectName("horizontalButtonLayout") spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalButtonLayout.addItem(spacerItem2) - self.pushButton = QtWidgets.QPushButton(Dialog) + self.pushButton = QtWidgets.QPushButton(parent=Dialog) self.pushButton.setToolTip("") self.pushButton.setAccessibleDescription("") self.pushButton.setText("OK") diff --git a/src/uic/CalibDialogUI.py b/src/uic/CalibDialogUI.py index 68add2a..4102873 100644 --- a/src/uic/CalibDialogUI.py +++ b/src/uic/CalibDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/CalibDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -26,7 +26,7 @@ def setupUi(self, Dialog): self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(0, 0, -1, -1) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.calibLowLabel = QtWidgets.QLabel(Dialog) + self.calibLowLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -47,7 +47,7 @@ def setupUi(self, Dialog): self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(-1, -1, 0, -1) self.horizontalLayout.setObjectName("horizontalLayout") - self.pushButtonScan = QtWidgets.QPushButton(Dialog) + self.pushButtonScan = QtWidgets.QPushButton(parent=Dialog) self.pushButtonScan.setToolTip("") self.pushButtonScan.setAccessibleDescription("") self.pushButtonScan.setText("Scan") @@ -55,7 +55,7 @@ def setupUi(self, Dialog): self.horizontalLayout.addWidget(self.pushButtonScan) self.verticalLayout_3.addLayout(self.horizontalLayout) self.horizontalLayout_2.addLayout(self.verticalLayout_3) - self.calibHighLabel = QtWidgets.QLabel(Dialog) + self.calibHighLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -69,7 +69,7 @@ def setupUi(self, Dialog): self.calibHighLabel.setObjectName("calibHighLabel") self.horizontalLayout_2.addWidget(self.calibHighLabel) self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonBox.setObjectName("buttonBox") diff --git a/src/uic/DebugDialogUI.py b/src/uic/DebugDialogUI.py index ac9cc42..617bc56 100644 --- a/src/uic/DebugDialogUI.py +++ b/src/uic/DebugDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/DebugDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -26,7 +26,7 @@ def setupUi(self, Dialog): self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(0, 0, -1, -1) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.logOutput = QtWidgets.QPlainTextEdit(Dialog) + self.logOutput = QtWidgets.QPlainTextEdit(parent=Dialog) self.logOutput.setObjectName("logOutput") self.horizontalLayout_2.addWidget(self.logOutput) self.verticalLayout_3 = QtWidgets.QVBoxLayout() @@ -37,7 +37,7 @@ def setupUi(self, Dialog): self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(-1, -1, 0, -1) self.horizontalLayout.setObjectName("horizontalLayout") - self.pushButtonScan = QtWidgets.QPushButton(Dialog) + self.pushButtonScan = QtWidgets.QPushButton(parent=Dialog) self.pushButtonScan.setToolTip("") self.pushButtonScan.setAccessibleDescription("") self.pushButtonScan.setText("Scan") @@ -46,7 +46,7 @@ def setupUi(self, Dialog): self.verticalLayout_3.addLayout(self.horizontalLayout) self.horizontalLayout_2.addLayout(self.verticalLayout_3) self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonBox.setObjectName("buttonBox") diff --git a/src/uic/MainWindowUI.py b/src/uic/MainWindowUI.py index 4e4b1d7..08849c4 100644 --- a/src/uic/MainWindowUI.py +++ b/src/uic/MainWindowUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/MainWindowUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -16,14 +16,14 @@ def setupUi(self, MainWindow): MainWindow.setWindowTitle("Tonino") MainWindow.setToolTip("") MainWindow.setAccessibleDescription("") - self.centralwidget = QtWidgets.QWidget(MainWindow) + self.centralwidget = QtWidgets.QWidget(parent=MainWindow) self.centralwidget.setObjectName("centralwidget") self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.centralwidget) self.verticalLayout_4.setObjectName("verticalLayout_4") - self.splitter = QtWidgets.QSplitter(self.centralwidget) + self.splitter = QtWidgets.QSplitter(parent=self.centralwidget) self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal) self.splitter.setObjectName("splitter") - self.layoutWidget = QtWidgets.QWidget(self.splitter) + self.layoutWidget = QtWidgets.QWidget(parent=self.splitter) self.layoutWidget.setObjectName("layoutWidget") self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget) self.verticalLayout.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) @@ -41,7 +41,7 @@ def setupUi(self, MainWindow): self.verticalLayout_2.setContentsMargins(0, 0, 0, -1) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setObjectName("verticalLayout_2") - self.label_2 = QtWidgets.QLabel(self.layoutWidget) + self.label_2 = QtWidgets.QLabel(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -57,7 +57,7 @@ def setupUi(self, MainWindow): self.label_2.setText("AVG") self.label_2.setObjectName("label_2") self.verticalLayout_2.addWidget(self.label_2, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.LCDavg = QtWidgets.QLCDNumber(self.layoutWidget) + self.LCDavg = QtWidgets.QLCDNumber(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -82,7 +82,7 @@ def setupUi(self, MainWindow): self.verticalLayout_3.setContentsMargins(0, -1, 0, -1) self.verticalLayout_3.setSpacing(2) self.verticalLayout_3.setObjectName("verticalLayout_3") - self.label_4 = QtWidgets.QLabel(self.layoutWidget) + self.label_4 = QtWidgets.QLabel(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -96,7 +96,7 @@ def setupUi(self, MainWindow): self.label_4.setText("STDEV") self.label_4.setObjectName("label_4") self.verticalLayout_3.addWidget(self.label_4, 0, QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) - self.LCDstdev = QtWidgets.QLCDNumber(self.layoutWidget) + self.LCDstdev = QtWidgets.QLCDNumber(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -119,7 +119,7 @@ def setupUi(self, MainWindow): self.verticalLayout_5.setContentsMargins(0, -1, 0, -1) self.verticalLayout_5.setSpacing(0) self.verticalLayout_5.setObjectName("verticalLayout_5") - self.label_5 = QtWidgets.QLabel(self.layoutWidget) + self.label_5 = QtWidgets.QLabel(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -133,7 +133,7 @@ def setupUi(self, MainWindow): self.label_5.setText("CONF95%") self.label_5.setObjectName("label_5") self.verticalLayout_5.addWidget(self.label_5) - self.LCDconf = QtWidgets.QLCDNumber(self.layoutWidget) + self.LCDconf = QtWidgets.QLCDNumber(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -154,7 +154,7 @@ def setupUi(self, MainWindow): spacerItem5 = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout.addItem(spacerItem5) self.verticalLayout.addLayout(self.horizontalLayout) - self.tableView = QtWidgets.QTableView(self.layoutWidget) + self.tableView = QtWidgets.QTableView(parent=self.layoutWidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Expanding) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) @@ -180,7 +180,7 @@ def setupUi(self, MainWindow): self.tableView.verticalHeader().setVisible(False) self.tableView.verticalHeader().setHighlightSections(False) self.verticalLayout.addWidget(self.tableView) - self.widget = mplwidget(self.splitter) + self.widget = mplwidget(parent=self.splitter) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(0) @@ -193,13 +193,13 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) self.horizontalLayout_2.setContentsMargins(0, 0, -1, 0) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.pushButtonAdd = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonAdd = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonAdd.setToolTip("") self.pushButtonAdd.setAccessibleDescription("") self.pushButtonAdd.setText("Add") self.pushButtonAdd.setObjectName("pushButtonAdd") self.horizontalLayout_2.addWidget(self.pushButtonAdd) - self.pushButtonDelete = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonDelete = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonDelete.setToolTip("") self.pushButtonDelete.setAccessibleDescription("") self.pushButtonDelete.setText("Delete") @@ -207,13 +207,13 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.addWidget(self.pushButtonDelete) spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_2.addItem(spacerItem6) - self.pushButtonSort = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonSort = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonSort.setToolTip("") self.pushButtonSort.setAccessibleDescription("") self.pushButtonSort.setText("Sort") self.pushButtonSort.setObjectName("pushButtonSort") self.horizontalLayout_2.addWidget(self.pushButtonSort) - self.pushButtonClear = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonClear = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonClear.setToolTip("") self.pushButtonClear.setAccessibleDescription("") self.pushButtonClear.setText("Clear") @@ -223,7 +223,7 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.addItem(spacerItem7) spacerItem8 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_2.addItem(spacerItem8) - self.pushButtonCalib = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonCalib = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonCalib.setToolTip("") self.pushButtonCalib.setAccessibleDescription("") self.pushButtonCalib.setText("Calibrate") @@ -234,13 +234,13 @@ def setupUi(self, MainWindow): self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetDefaultConstraint) self.horizontalLayout_5.setObjectName("horizontalLayout_5") - self.label_3 = QtWidgets.QLabel(self.centralwidget) + self.label_3 = QtWidgets.QLabel(parent=self.centralwidget) self.label_3.setToolTip("") self.label_3.setAccessibleDescription("") self.label_3.setText("0") self.label_3.setObjectName("label_3") self.horizontalLayout_5.addWidget(self.label_3) - self.degreeSlider = QtWidgets.QSlider(self.centralwidget) + self.degreeSlider = QtWidgets.QSlider(parent=self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -259,7 +259,7 @@ def setupUi(self, MainWindow): self.degreeSlider.setTickInterval(1) self.degreeSlider.setObjectName("degreeSlider") self.horizontalLayout_5.addWidget(self.degreeSlider) - self.label = QtWidgets.QLabel(self.centralwidget) + self.label = QtWidgets.QLabel(parent=self.centralwidget) self.label.setMinimumSize(QtCore.QSize(0, 0)) self.label.setToolTip("") self.label.setAccessibleDescription("") @@ -269,13 +269,13 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.addLayout(self.horizontalLayout_5) spacerItem10 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_2.addItem(spacerItem10) - self.pushButtonDefaults = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonDefaults = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonDefaults.setToolTip("") self.pushButtonDefaults.setAccessibleDescription("") self.pushButtonDefaults.setText("Defaults") self.pushButtonDefaults.setObjectName("pushButtonDefaults") self.horizontalLayout_2.addWidget(self.pushButtonDefaults) - self.pushButtonUpload = QtWidgets.QPushButton(self.centralwidget) + self.pushButtonUpload = QtWidgets.QPushButton(parent=self.centralwidget) self.pushButtonUpload.setToolTip("") self.pushButtonUpload.setAccessibleDescription("") self.pushButtonUpload.setText("Upload") @@ -283,78 +283,78 @@ def setupUi(self, MainWindow): self.horizontalLayout_2.addWidget(self.pushButtonUpload) self.verticalLayout_4.addLayout(self.horizontalLayout_2) MainWindow.setCentralWidget(self.centralwidget) - self.status = QtWidgets.QStatusBar(MainWindow) + self.status = QtWidgets.QStatusBar(parent=MainWindow) self.status.setToolTip("") self.status.setAccessibleDescription("") self.status.setSizeGripEnabled(False) self.status.setObjectName("status") MainWindow.setStatusBar(self.status) - self.menuBar = QtWidgets.QMenuBar(MainWindow) + self.menuBar = QtWidgets.QMenuBar(parent=MainWindow) self.menuBar.setGeometry(QtCore.QRect(0, 0, 971, 24)) self.menuBar.setObjectName("menuBar") - self.menuFile = QtWidgets.QMenu(self.menuBar) + self.menuFile = QtWidgets.QMenu(parent=self.menuBar) self.menuFile.setObjectName("menuFile") - self.menuOpen_Recent = QtWidgets.QMenu(self.menuFile) + self.menuOpen_Recent = QtWidgets.QMenu(parent=self.menuFile) self.menuOpen_Recent.setToolTip("") self.menuOpen_Recent.setAccessibleDescription("") self.menuOpen_Recent.setObjectName("menuOpen_Recent") - self.menuOpen_ApplyRecent = QtWidgets.QMenu(self.menuFile) + self.menuOpen_ApplyRecent = QtWidgets.QMenu(parent=self.menuFile) self.menuOpen_ApplyRecent.setToolTip("") self.menuOpen_ApplyRecent.setAccessibleDescription("") self.menuOpen_ApplyRecent.setObjectName("menuOpen_ApplyRecent") - self.actionQuit = QtGui.QAction(MainWindow) + self.actionQuit = QtGui.QAction(parent=MainWindow) self.actionQuit.setText("Quit") self.actionQuit.setShortcut("Ctrl+Q") self.actionQuit.setObjectName("actionQuit") - self.menuHelp = QtWidgets.QMenu(self.menuBar) + self.menuHelp = QtWidgets.QMenu(parent=self.menuBar) self.menuHelp.setObjectName("menuHelp") - self.menuEdit = QtWidgets.QMenu(self.menuBar) + self.menuEdit = QtWidgets.QMenu(parent=self.menuBar) self.menuEdit.setObjectName("menuEdit") MainWindow.setMenuBar(self.menuBar) - self.actionOpen = QtGui.QAction(MainWindow) + self.actionOpen = QtGui.QAction(parent=MainWindow) self.actionOpen.setText("Open...") self.actionOpen.setShortcut("Ctrl+O") self.actionOpen.setObjectName("actionOpen") - self.actionSave = QtGui.QAction(MainWindow) + self.actionSave = QtGui.QAction(parent=MainWindow) self.actionSave.setText("Save") self.actionSave.setShortcut("Ctrl+S") self.actionSave.setObjectName("actionSave") - self.actionSave_As = QtGui.QAction(MainWindow) + self.actionSave_As = QtGui.QAction(parent=MainWindow) self.actionSave_As.setText("Save As...") self.actionSave_As.setShortcut("Ctrl+Shift+S") self.actionSave_As.setObjectName("actionSave_As") - self.actionHelp = QtGui.QAction(MainWindow) + self.actionHelp = QtGui.QAction(parent=MainWindow) self.actionHelp.setText("Help") self.actionHelp.setShortcut("Ctrl+?") self.actionHelp.setObjectName("actionHelp") - self.actionAbout = QtGui.QAction(MainWindow) + self.actionAbout = QtGui.QAction(parent=MainWindow) self.actionAbout.setText("About") self.actionAbout.setShortcut("") self.actionAbout.setMenuRole(QtGui.QAction.MenuRole.AboutRole) self.actionAbout.setObjectName("actionAbout") - self.actionAboutQt = QtGui.QAction(MainWindow) + self.actionAboutQt = QtGui.QAction(parent=MainWindow) self.actionAboutQt.setText("About Qt") self.actionAboutQt.setShortcut("") self.actionAboutQt.setMenuRole(QtGui.QAction.MenuRole.AboutQtRole) self.actionAboutQt.setObjectName("actionAboutQt") - self.actionSettings = QtGui.QAction(MainWindow) + self.actionSettings = QtGui.QAction(parent=MainWindow) self.actionSettings.setText("Settings") self.actionSettings.setShortcut("") self.actionSettings.setMenuRole(QtGui.QAction.MenuRole.PreferencesRole) self.actionSettings.setObjectName("actionSettings") - self.actionCut = QtGui.QAction(MainWindow) + self.actionCut = QtGui.QAction(parent=MainWindow) self.actionCut.setText("Cut") self.actionCut.setShortcut("Ctrl+X") self.actionCut.setObjectName("actionCut") - self.actionCopy = QtGui.QAction(MainWindow) + self.actionCopy = QtGui.QAction(parent=MainWindow) self.actionCopy.setText("Copy") self.actionCopy.setShortcut("Ctrl+C") self.actionCopy.setObjectName("actionCopy") - self.actionPaste = QtGui.QAction(MainWindow) + self.actionPaste = QtGui.QAction(parent=MainWindow) self.actionPaste.setText("Paste") self.actionPaste.setShortcut("Ctrl+V") self.actionPaste.setObjectName("actionPaste") - self.actionApply = QtGui.QAction(MainWindow) + self.actionApply = QtGui.QAction(parent=MainWindow) self.actionApply.setText("Apply...") self.actionApply.setShortcut("") self.actionApply.setObjectName("actionApply") diff --git a/src/uic/PreCalibDialogUI.py b/src/uic/PreCalibDialogUI.py index f6b1e66..2072676 100644 --- a/src/uic/PreCalibDialogUI.py +++ b/src/uic/PreCalibDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/PreCalibDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -24,7 +24,7 @@ def setupUi(self, Dialog): self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(0, 0, -1, -1) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.logOutput = QtWidgets.QPlainTextEdit(Dialog) + self.logOutput = QtWidgets.QPlainTextEdit(parent=Dialog) self.logOutput.setToolTip("") self.logOutput.setAccessibleDescription("") self.logOutput.setObjectName("logOutput") @@ -32,13 +32,13 @@ def setupUi(self, Dialog): self.verticalLayout_3 = QtWidgets.QVBoxLayout() self.verticalLayout_3.setContentsMargins(0, -1, -1, -1) self.verticalLayout_3.setObjectName("verticalLayout_3") - self.pushButtonClear = QtWidgets.QPushButton(Dialog) + self.pushButtonClear = QtWidgets.QPushButton(parent=Dialog) self.pushButtonClear.setToolTip("") self.pushButtonClear.setAccessibleDescription("") self.pushButtonClear.setText("Clear") self.pushButtonClear.setObjectName("pushButtonClear") self.verticalLayout_3.addWidget(self.pushButtonClear) - self.pushButtonMaster = QtWidgets.QPushButton(Dialog) + self.pushButtonMaster = QtWidgets.QPushButton(parent=Dialog) self.pushButtonMaster.setToolTip("") self.pushButtonMaster.setAccessibleDescription("") self.pushButtonMaster.setText("Master") @@ -46,13 +46,13 @@ def setupUi(self, Dialog): self.verticalLayout_3.addWidget(self.pushButtonMaster) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.verticalLayout_3.addItem(spacerItem) - self.pushButtonScan = QtWidgets.QPushButton(Dialog) + self.pushButtonScan = QtWidgets.QPushButton(parent=Dialog) self.pushButtonScan.setToolTip("") self.pushButtonScan.setAccessibleDescription("") self.pushButtonScan.setText("Scan") self.pushButtonScan.setObjectName("pushButtonScan") self.verticalLayout_3.addWidget(self.pushButtonScan) - self.pushButtonPreCal = QtWidgets.QPushButton(Dialog) + self.pushButtonPreCal = QtWidgets.QPushButton(parent=Dialog) self.pushButtonPreCal.setToolTip("") self.pushButtonPreCal.setAccessibleDescription("") self.pushButtonPreCal.setText("PreCal") @@ -60,13 +60,13 @@ def setupUi(self, Dialog): self.verticalLayout_3.addWidget(self.pushButtonPreCal) spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Expanding) self.verticalLayout_3.addItem(spacerItem1) - self.pushButtonSet = QtWidgets.QPushButton(Dialog) + self.pushButtonSet = QtWidgets.QPushButton(parent=Dialog) self.pushButtonSet.setToolTip("") self.pushButtonSet.setAccessibleDescription("") self.pushButtonSet.setText("Set") self.pushButtonSet.setObjectName("pushButtonSet") self.verticalLayout_3.addWidget(self.pushButtonSet) - self.pushButtonReset = QtWidgets.QPushButton(Dialog) + self.pushButtonReset = QtWidgets.QPushButton(parent=Dialog) self.pushButtonReset.setToolTip("") self.pushButtonReset.setAccessibleDescription("") self.pushButtonReset.setText("Reset") @@ -74,7 +74,7 @@ def setupUi(self, Dialog): self.verticalLayout_3.addWidget(self.pushButtonReset) self.horizontalLayout_2.addLayout(self.verticalLayout_3) self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) self.buttonBox.setToolTip("") self.buttonBox.setAccessibleDescription("") self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) diff --git a/src/uic/PreferencesDialogUI.py b/src/uic/PreferencesDialogUI.py index c2a3d53..764a7c4 100644 --- a/src/uic/PreferencesDialogUI.py +++ b/src/uic/PreferencesDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/PreferencesDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -25,7 +25,7 @@ def setupUi(self, Preferences): Preferences.setModal(True) self.verticalLayout = QtWidgets.QVBoxLayout(Preferences) self.verticalLayout.setObjectName("verticalLayout") - self.groupBoxDefaultScale = QtWidgets.QGroupBox(Preferences) + self.groupBoxDefaultScale = QtWidgets.QGroupBox(parent=Preferences) self.groupBoxDefaultScale.setToolTip("") self.groupBoxDefaultScale.setAccessibleDescription("") self.groupBoxDefaultScale.setTitle("Default Scale") @@ -34,7 +34,7 @@ def setupUi(self, Preferences): self.horizontalLayout_7.setObjectName("horizontalLayout_7") spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_7.addItem(spacerItem) - self.radioButtonTonino = QtWidgets.QRadioButton(self.groupBoxDefaultScale) + self.radioButtonTonino = QtWidgets.QRadioButton(parent=self.groupBoxDefaultScale) self.radioButtonTonino.setToolTip("") self.radioButtonTonino.setAccessibleDescription("") self.radioButtonTonino.setText("Tonino") @@ -43,7 +43,7 @@ def setupUi(self, Preferences): self.horizontalLayout_7.addWidget(self.radioButtonTonino) spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_7.addItem(spacerItem1) - self.radioButtonAgtron = QtWidgets.QRadioButton(self.groupBoxDefaultScale) + self.radioButtonAgtron = QtWidgets.QRadioButton(parent=self.groupBoxDefaultScale) self.radioButtonAgtron.setToolTip("") self.radioButtonAgtron.setAccessibleDescription("") self.radioButtonAgtron.setText("Agtron") @@ -52,12 +52,12 @@ def setupUi(self, Preferences): spacerItem2 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_7.addItem(spacerItem2) self.verticalLayout.addWidget(self.groupBoxDefaultScale) - self.groupBoxToninoDisplay = QtWidgets.QGroupBox(Preferences) + self.groupBoxToninoDisplay = QtWidgets.QGroupBox(parent=Preferences) self.groupBoxToninoDisplay.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) self.groupBoxToninoDisplay.setObjectName("groupBoxToninoDisplay") self.horizontalLayout = QtWidgets.QHBoxLayout(self.groupBoxToninoDisplay) self.horizontalLayout.setObjectName("horizontalLayout") - self.dim_label = QtWidgets.QLabel(self.groupBoxToninoDisplay) + self.dim_label = QtWidgets.QLabel(parent=self.groupBoxToninoDisplay) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -71,7 +71,7 @@ def setupUi(self, Preferences): self.dim_label.setAlignment(QtCore.Qt.AlignmentFlag.AlignRight|QtCore.Qt.AlignmentFlag.AlignTrailing|QtCore.Qt.AlignmentFlag.AlignVCenter) self.dim_label.setObjectName("dim_label") self.horizontalLayout.addWidget(self.dim_label) - self.displaySlider = QtWidgets.QSlider(self.groupBoxToninoDisplay) + self.displaySlider = QtWidgets.QSlider(parent=self.groupBoxToninoDisplay) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -89,7 +89,7 @@ def setupUi(self, Preferences): self.displaySlider.setOrientation(QtCore.Qt.Orientation.Horizontal) self.displaySlider.setObjectName("displaySlider") self.horizontalLayout.addWidget(self.displaySlider) - self.bright_label = QtWidgets.QLabel(self.groupBoxToninoDisplay) + self.bright_label = QtWidgets.QLabel(parent=self.groupBoxToninoDisplay) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Fixed, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -102,7 +102,7 @@ def setupUi(self, Preferences): self.bright_label.setText("bright") self.bright_label.setObjectName("bright_label") self.horizontalLayout.addWidget(self.bright_label) - self.checkBoxFlip = QtWidgets.QCheckBox(self.groupBoxToninoDisplay) + self.checkBoxFlip = QtWidgets.QCheckBox(parent=self.groupBoxToninoDisplay) self.checkBoxFlip.setToolTip("") self.checkBoxFlip.setAccessibleDescription("") self.checkBoxFlip.setText("Flip") @@ -111,7 +111,7 @@ def setupUi(self, Preferences): spacerItem3 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout.addItem(spacerItem3) self.verticalLayout.addWidget(self.groupBoxToninoDisplay) - self.groupBoxToninoTarget = QtWidgets.QGroupBox(Preferences) + self.groupBoxToninoTarget = QtWidgets.QGroupBox(parent=Preferences) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -120,13 +120,13 @@ def setupUi(self, Preferences): self.groupBoxToninoTarget.setMinimumSize(QtCore.QSize(0, 120)) self.groupBoxToninoTarget.setBaseSize(QtCore.QSize(0, 0)) self.groupBoxToninoTarget.setObjectName("groupBoxToninoTarget") - self.horizontalLayoutWidget_2 = QtWidgets.QWidget(self.groupBoxToninoTarget) + self.horizontalLayoutWidget_2 = QtWidgets.QWidget(parent=self.groupBoxToninoTarget) self.horizontalLayoutWidget_2.setGeometry(QtCore.QRect(10, 29, 361, 78)) self.horizontalLayoutWidget_2.setObjectName("horizontalLayoutWidget_2") self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.horizontalLayoutWidget_2) self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0) self.horizontalLayout_3.setObjectName("horizontalLayout_3") - self.groupBoxTargetValue = QtWidgets.QGroupBox(self.horizontalLayoutWidget_2) + self.groupBoxTargetValue = QtWidgets.QGroupBox(parent=self.horizontalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Minimum, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -137,7 +137,7 @@ def setupUi(self, Preferences): self.groupBoxTargetValue.setObjectName("groupBoxTargetValue") self.gridLayout = QtWidgets.QGridLayout(self.groupBoxTargetValue) self.gridLayout.setObjectName("gridLayout") - self.targetValueSpinBox = QtWidgets.QSpinBox(self.groupBoxTargetValue) + self.targetValueSpinBox = QtWidgets.QSpinBox(parent=self.groupBoxTargetValue) self.targetValueSpinBox.setMinimumSize(QtCore.QSize(0, 22)) self.targetValueSpinBox.setToolTip("") self.targetValueSpinBox.setAccessibleDescription("") @@ -149,7 +149,7 @@ def setupUi(self, Preferences): self.targetValueSpinBox.setObjectName("targetValueSpinBox") self.gridLayout.addWidget(self.targetValueSpinBox, 0, 0, 1, 1) self.horizontalLayout_3.addWidget(self.groupBoxTargetValue) - self.groupBoxTargetRange = QtWidgets.QGroupBox(self.horizontalLayoutWidget_2) + self.groupBoxTargetRange = QtWidgets.QGroupBox(parent=self.horizontalLayoutWidget_2) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -162,13 +162,13 @@ def setupUi(self, Preferences): self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.range_min_label = QtWidgets.QLabel(self.groupBoxTargetRange) + self.range_min_label = QtWidgets.QLabel(parent=self.groupBoxTargetRange) self.range_min_label.setToolTip("") self.range_min_label.setAccessibleDescription("") self.range_min_label.setText("0") self.range_min_label.setObjectName("range_min_label") self.horizontalLayout_2.addWidget(self.range_min_label) - self.rangeSlider = QtWidgets.QSlider(self.groupBoxTargetRange) + self.rangeSlider = QtWidgets.QSlider(parent=self.groupBoxTargetRange) self.rangeSlider.setMinimumSize(QtCore.QSize(0, 22)) self.rangeSlider.setToolTip("") self.rangeSlider.setAccessibleDescription("") @@ -181,7 +181,7 @@ def setupUi(self, Preferences): self.rangeSlider.setTickInterval(1) self.rangeSlider.setObjectName("rangeSlider") self.horizontalLayout_2.addWidget(self.rangeSlider) - self.range_max_label = QtWidgets.QLabel(self.groupBoxTargetRange) + self.range_max_label = QtWidgets.QLabel(parent=self.groupBoxTargetRange) self.range_max_label.setToolTip("") self.range_max_label.setAccessibleDescription("") self.range_max_label.setText("5") @@ -190,7 +190,7 @@ def setupUi(self, Preferences): self.horizontalLayout_4.addLayout(self.horizontalLayout_2) self.horizontalLayout_3.addWidget(self.groupBoxTargetRange) self.verticalLayout.addWidget(self.groupBoxToninoTarget) - self.groupBoxToninoName = QtWidgets.QGroupBox(Preferences) + self.groupBoxToninoName = QtWidgets.QGroupBox(parent=Preferences) self.groupBoxToninoName.setMinimumSize(QtCore.QSize(0, 80)) self.groupBoxToninoName.setAlignment(QtCore.Qt.AlignmentFlag.AlignLeading|QtCore.Qt.AlignmentFlag.AlignLeft|QtCore.Qt.AlignmentFlag.AlignVCenter) self.groupBoxToninoName.setFlat(False) @@ -203,7 +203,7 @@ def setupUi(self, Preferences): self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setSizeConstraint(QtWidgets.QLayout.SizeConstraint.SetFixedSize) self.horizontalLayout_5.setObjectName("horizontalLayout_5") - self.lineEditName = QtWidgets.QLineEdit(self.groupBoxToninoName) + self.lineEditName = QtWidgets.QLineEdit(parent=self.groupBoxToninoName) self.lineEditName.setToolTip("") self.lineEditName.setAccessibleDescription("") self.lineEditName.setInputMask("") @@ -216,7 +216,7 @@ def setupUi(self, Preferences): spacerItem5 = QtWidgets.QSpacerItem(74, 20, QtWidgets.QSizePolicy.Policy.Expanding, QtWidgets.QSizePolicy.Policy.Minimum) self.horizontalLayout_6.addItem(spacerItem5) self.verticalLayout.addWidget(self.groupBoxToninoName) - self.buttonBox = QtWidgets.QDialogButtonBox(Preferences) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Preferences) self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonBox.setObjectName("buttonBox") diff --git a/src/uic/TinyCalibDialogUI.py b/src/uic/TinyCalibDialogUI.py index c8321b6..9af75a7 100644 --- a/src/uic/TinyCalibDialogUI.py +++ b/src/uic/TinyCalibDialogUI.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/TinyCalibDialogUI.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -26,7 +26,7 @@ def setupUi(self, Dialog): self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(0, 0, -1, -1) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.calibLowLabel = QtWidgets.QLabel(Dialog) + self.calibLowLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -47,14 +47,14 @@ def setupUi(self, Dialog): self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(-1, -1, 0, -1) self.horizontalLayout.setObjectName("horizontalLayout") - self.pushButtonScan = QtWidgets.QPushButton(Dialog) + self.pushButtonScan = QtWidgets.QPushButton(parent=Dialog) self.pushButtonScan.setAccessibleDescription("") self.pushButtonScan.setText("Scan") self.pushButtonScan.setObjectName("pushButtonScan") self.horizontalLayout.addWidget(self.pushButtonScan) self.verticalLayout_3.addLayout(self.horizontalLayout) self.horizontalLayout_2.addLayout(self.verticalLayout_3) - self.calibHighLabel = QtWidgets.QLabel(Dialog) + self.calibHighLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -68,7 +68,7 @@ def setupUi(self, Dialog): self.calibHighLabel.setObjectName("calibHighLabel") self.horizontalLayout_2.addWidget(self.calibHighLabel) self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonBox.setObjectName("buttonBox") diff --git a/src/uic/TinyCalibDialogUI2.py b/src/uic/TinyCalibDialogUI2.py index 3aeb092..c42302c 100644 --- a/src/uic/TinyCalibDialogUI2.py +++ b/src/uic/TinyCalibDialogUI2.py @@ -1,6 +1,6 @@ # Form implementation generated from reading ui file 'ui/TinyCalibDialogUI2.ui' # -# Created by: PyQt6 UI code generator 6.4.0 +# Created by: PyQt6 UI code generator 6.4.1 # # WARNING: Any manual changes made to this file will be lost when pyuic6 is # run again. Do not edit this file unless you know what you are doing. @@ -26,7 +26,7 @@ def setupUi(self, Dialog): self.horizontalLayout_2 = QtWidgets.QHBoxLayout() self.horizontalLayout_2.setContentsMargins(0, 0, -1, -1) self.horizontalLayout_2.setObjectName("horizontalLayout_2") - self.calibHighLabel = QtWidgets.QLabel(Dialog) + self.calibHighLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -47,7 +47,7 @@ def setupUi(self, Dialog): self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setContentsMargins(-1, -1, 0, -1) self.horizontalLayout.setObjectName("horizontalLayout") - self.pushButtonScan = QtWidgets.QPushButton(Dialog) + self.pushButtonScan = QtWidgets.QPushButton(parent=Dialog) self.pushButtonScan.setToolTip("") self.pushButtonScan.setAccessibleDescription("") self.pushButtonScan.setText("Scan") @@ -55,7 +55,7 @@ def setupUi(self, Dialog): self.horizontalLayout.addWidget(self.pushButtonScan) self.verticalLayout_3.addLayout(self.horizontalLayout) self.horizontalLayout_2.addLayout(self.verticalLayout_3) - self.calibLowLabel = QtWidgets.QLabel(Dialog) + self.calibLowLabel = QtWidgets.QLabel(parent=Dialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Policy.Preferred, QtWidgets.QSizePolicy.Policy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) @@ -69,7 +69,7 @@ def setupUi(self, Dialog): self.calibLowLabel.setObjectName("calibLowLabel") self.horizontalLayout_2.addWidget(self.calibLowLabel) self.verticalLayout_2.addLayout(self.horizontalLayout_2) - self.buttonBox = QtWidgets.QDialogButtonBox(Dialog) + self.buttonBox = QtWidgets.QDialogButtonBox(parent=Dialog) self.buttonBox.setOrientation(QtCore.Qt.Orientation.Horizontal) self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.StandardButton.Cancel|QtWidgets.QDialogButtonBox.StandardButton.Ok) self.buttonBox.setObjectName("buttonBox") diff --git a/src/uic/__init__.py b/src/uic/__init__.py index cf0f1e6..4064dea 100755 --- a/src/uic/__init__.py +++ b/src/uic/__init__.py @@ -22,11 +22,11 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from uic.MainWindowUI import * -from uic.AboutDialogUI import * # type: ignore -from uic.icons_rc import * -from uic.calib_high_rc import * -from uic.calib_low_rc import * -from uic.calib_low_tiny_rc import * -from uic.mplwidget import * -from uic.resources import * \ No newline at end of file +from . import MainWindowUI +from . import AboutDialogUI # type: ignore +from . import icons_rc +from . import calib_high_rc +from . import calib_low_rc +from . import calib_low_tiny_rc +from . import mplwidget +from . import resources \ No newline at end of file diff --git a/src/uic/mplwidget.py b/src/uic/mplwidget.py index a5d3aa8..ec773aa 100755 --- a/src/uic/mplwidget.py +++ b/src/uic/mplwidget.py @@ -201,10 +201,8 @@ def toninoColor(self, color) -> list[float]: c = self.toninoColors[color] if self.app.darkmode: return c[1] - else: - return c[0] - else: - return self.makeColort(50,50,50) + return c[0] + return self.makeColort(50,50,50) def updatePolyfit(self) -> None: # updates the polyfit line data and calls redraw