diff --git a/config/label_designs/E-DAILY - ZT231/MB1.nlbl b/config/label_designs/E-DAILY - ZT231/MB1.nlbl new file mode 100644 index 0000000..9097ad9 Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/MB1.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/MB2.nlbl b/config/label_designs/E-DAILY - ZT231/MB2.nlbl new file mode 100644 index 0000000..7e538d6 Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/MB2.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/MI1.nlbl b/config/label_designs/E-DAILY - ZT231/MI1.nlbl new file mode 100644 index 0000000..95d2648 Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/MI1.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/MI2.nlbl b/config/label_designs/E-DAILY - ZT231/MI2.nlbl new file mode 100644 index 0000000..721aa6c Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/MI2.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/RB1.nlbl b/config/label_designs/E-DAILY - ZT231/RB1.nlbl new file mode 100644 index 0000000..584660c Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/RB1.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/RB2.nlbl b/config/label_designs/E-DAILY - ZT231/RB2.nlbl new file mode 100644 index 0000000..fbb7525 Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/RB2.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/RM1.nlbl b/config/label_designs/E-DAILY - ZT231/RM1.nlbl new file mode 100644 index 0000000..75de31b Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/RM1.nlbl differ diff --git a/config/label_designs/E-DAILY - ZT231/RM2.nlbl b/config/label_designs/E-DAILY - ZT231/RM2.nlbl new file mode 100644 index 0000000..61cdd52 Binary files /dev/null and b/config/label_designs/E-DAILY - ZT231/RM2.nlbl differ diff --git a/config/label_templates/st-ten-7/MB1.prn b/config/label_templates/st-ten-7/MB1.prn new file mode 100644 index 0000000..5322894 --- /dev/null +++ b/config/label_templates/st-ten-7/MB1.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT137,147^A0B,42,41^FH\^CI28^FDMB 1^FS^CI27 +^FO148,86^GB8,61,4^FS +^FT394,147^A0B,42,41^FH\^CI28^FDMB 1^FS^CI27 +^FO405,86^GB8,61,4^FS +^FT239,34^A0R,42,41^FH\^CI28^FDMB 1^FS^CI27 +^FO220,33^GB8,61,4^FS +^FT504,34^A0R,42,41^FH\^CI28^FDMB 1^FS^CI27 +^FO485,33^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO100,33^GB56,0,53^FS^LRN +^LRY^FO357,33^GB56,0,53^FS^LRN +^LRY^FO220,94^GB56,0,53^FS^LRN +^LRY^FO485,94^GB56,0,53^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/MB2.prn b/config/label_templates/st-ten-7/MB2.prn new file mode 100644 index 0000000..7807670 --- /dev/null +++ b/config/label_templates/st-ten-7/MB2.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT137,147^A0B,42,41^FH\^CI28^FDMB 2^FS^CI27 +^FO148,86^GB8,61,4^FS +^FT394,147^A0B,42,41^FH\^CI28^FDMB 2^FS^CI27 +^FO405,86^GB8,61,4^FS +^FT239,34^A0R,42,41^FH\^CI28^FDMB 2^FS^CI27 +^FO220,33^GB8,61,4^FS +^FT504,34^A0R,42,41^FH\^CI28^FDMB 2^FS^CI27 +^FO485,33^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO100,33^GB56,0,53^FS^LRN +^LRY^FO357,33^GB56,0,53^FS^LRN +^LRY^FO220,94^GB56,0,53^FS^LRN +^LRY^FO485,94^GB56,0,53^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/MI1.prn b/config/label_templates/st-ten-7/MI1.prn new file mode 100644 index 0000000..b902b4f --- /dev/null +++ b/config/label_templates/st-ten-7/MI1.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT137,137^A0B,42,41^FH\^CI28^FDMI 1^FS^CI27 +^FO148,86^GB8,61,4^FS +^FT394,137^A0B,42,41^FH\^CI28^FDMI 1^FS^CI27 +^FO405,86^GB8,61,4^FS +^FT239,40^A0R,42,41^FH\^CI28^FDMI 1^FS^CI27 +^FO220,33^GB8,61,4^FS +^FT506,44^A0R,42,41^FH\^CI28^FDMI 1^FS^CI27 +^FO487,35^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO100,33^GB56,0,53^FS^LRN +^LRY^FO357,33^GB56,0,53^FS^LRN +^LRY^FO220,94^GB56,0,53^FS^LRN +^LRY^FO487,97^GB56,0,53^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/MI2.prn b/config/label_templates/st-ten-7/MI2.prn new file mode 100644 index 0000000..277a080 --- /dev/null +++ b/config/label_templates/st-ten-7/MI2.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT137,137^A0B,42,41^FH\^CI28^FDMI 2^FS^CI27 +^FO148,86^GB8,61,4^FS +^FT394,137^A0B,42,41^FH\^CI28^FDMI 2^FS^CI27 +^FO405,86^GB8,61,4^FS +^FT239,40^A0R,42,41^FH\^CI28^FDMI 2^FS^CI27 +^FO220,33^GB8,61,4^FS +^FT506,44^A0R,42,41^FH\^CI28^FDMI 2^FS^CI27 +^FO487,35^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO100,33^GB56,0,53^FS^LRN +^LRY^FO357,33^GB56,0,53^FS^LRN +^LRY^FO220,94^GB56,0,53^FS^LRN +^LRY^FO487,97^GB56,0,53^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/RB1.prn b/config/label_templates/st-ten-7/RB1.prn new file mode 100644 index 0000000..4fc9930 --- /dev/null +++ b/config/label_templates/st-ten-7/RB1.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT393,150^A0B,42,43^FH\^CI28^FDRB 1^FS^CI27 +^FO404,89^GB8,61,4^FS +^FT138,150^A0B,42,43^FH\^CI28^FDRB 1^FS^CI27 +^FO149,89^GB8,61,4^FS +^FT245,35^A0R,42,43^FH\^CI28^FDRB 1^FS^CI27 +^FO226,32^GB8,61,4^FS +^FT501,35^A0R,42,43^FH\^CI28^FDRB 1^FS^CI27 +^FO484,32^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO356,32^GB56,0,56^FS^LRN +^LRY^FO101,32^GB56,0,56^FS^LRN +^LRY^FO226,94^GB56,0,56^FS^LRN +^LRY^FO484,94^GB56,0,56^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/RB2.prn b/config/label_templates/st-ten-7/RB2.prn new file mode 100644 index 0000000..051a31b --- /dev/null +++ b/config/label_templates/st-ten-7/RB2.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT393,150^A0B,42,43^FH\^CI28^FDRB 2^FS^CI27 +^FO404,89^GB8,61,4^FS +^FT138,150^A0B,42,43^FH\^CI28^FDRB 2^FS^CI27 +^FO149,89^GB8,61,4^FS +^FT245,35^A0R,42,43^FH\^CI28^FDRB 2^FS^CI27 +^FO226,32^GB8,61,4^FS +^FT501,35^A0R,42,43^FH\^CI28^FDRB 2^FS^CI27 +^FO484,32^GB8,61,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO356,32^GB56,0,56^FS^LRN +^LRY^FO101,32^GB56,0,56^FS^LRN +^LRY^FO226,94^GB56,0,56^FS^LRN +^LRY^FO484,94^GB56,0,56^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/RM1.prn b/config/label_templates/st-ten-7/RM1.prn new file mode 100644 index 0000000..a1c1e06 --- /dev/null +++ b/config/label_templates/st-ten-7/RM1.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT139,151^A0B,42,43^FH\^CI28^FDRM 1^FS^CI27 +^FO149,85^GB8,66,4^FS +^FT245,26^A0R,42,43^FH\^CI28^FDRM 1^FS^CI27 +^FO226,29^GB8,66,4^FS +^FT397,151^A0B,42,43^FH\^CI28^FDRM 1^FS^CI27 +^FO407,85^GB8,66,4^FS +^FT503,26^A0R,42,43^FH\^CI28^FDRM 1^FS^CI27 +^FO484,29^GB8,66,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO101,29^GB56,0,56^FS^LRN +^LRY^FO226,95^GB56,0,56^FS^LRN +^LRY^FO359,29^GB56,0,56^FS^LRN +^LRY^FO484,95^GB56,0,56^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/config/label_templates/st-ten-7/RM2.prn b/config/label_templates/st-ten-7/RM2.prn new file mode 100644 index 0000000..12c54ca --- /dev/null +++ b/config/label_templates/st-ten-7/RM2.prn @@ -0,0 +1,38 @@ +CT~~CD,~CC^~CT~ +^XA +~TA000 +~JSN +^LT0 +^MNW +^MTT +^PON +^PMN +^LH0,0 +^JMA +^PR2,2 +~SD15 +^JUS +^LRN +^CI27 +^PA0,1,1,0 +^XZ +^XA +^MMT +^PW679 +^LL200 +^LS0 +^FT139,151^A0B,42,43^FH\^CI28^FDRM 2^FS^CI27 +^FO149,85^GB8,66,4^FS +^FT245,26^A0R,42,43^FH\^CI28^FDRM 2^FS^CI27 +^FO226,29^GB8,66,4^FS +^FT397,151^A0B,42,43^FH\^CI28^FDRM 2^FS^CI27 +^FO407,85^GB8,66,4^FS +^FT503,26^A0R,42,43^FH\^CI28^FDRM 2^FS^CI27 +^FO484,29^GB8,66,4^FS +^LRY^FO2,1^GB676,0,198^FS^LRN +^LRY^FO101,29^GB56,0,56^FS^LRN +^LRY^FO226,95^GB56,0,56^FS^LRN +^LRY^FO359,29^GB56,0,56^FS^LRN +^LRY^FO484,95^GB56,0,56^FS^LRN +^PQ1,0,1,Y +^XZ diff --git a/designer.sh b/designer.sh index 9a38387..1fdd748 100755 --- a/designer.sh +++ b/designer.sh @@ -1,7 +1 @@ -#!/bin/bash -x -cd "$(dirname "$0")" -source "./venv/bin/activate" || source "./venv/Scripts/activate" || : -#python3 -m pip install --upgrade qt5-tools -#"$(python3 -c "import sys; print(sys.path[-1])")/qt5_applications/Qt/bin/designer" $* -$(pwd)/venv/lib/python3.9/site-packages/qt5_applications/Qt/bin/designer $* -#$(pwd)/venv/lib/python3.8/site-packages/qt5_applications/Qt/bin/designer $* +pyqt5-tools designer diff --git a/src/components/os_label_printer.py b/src/components/os_label_printer.py index ccab0a4..4855f9f 100644 --- a/src/components/os_label_printer.py +++ b/src/components/os_label_printer.py @@ -34,8 +34,15 @@ class Os_Label_Printer(Component): def print_label(self, template, context=None): if context is None: context = {} + custom_label_folder=f"config/label_templates/{str(self.config.machine_id)}/" + standard_label_folder=f"config/label_templates/" + if os.path.exists(custom_label_folder): + label_folder = custom_label_folder + else: + label_folder = standard_label_folder + label_path = label_folder+str(template) # LOAD LABEL TEMPLATE - with open(f"config/label_templates/{str(template)}", "r", errors="surrogateescape", encoding='iso-8859-1') as f: + with open(label_path, "r", errors="surrogateescape", encoding='iso-8859-1') as f: label_file_contents = f.read() # LABEL PRINT #label = label.format(**context) @@ -64,16 +71,14 @@ class Os_Label_Printer(Component): label_file = "tmp/label.prn" with open(label_file, "w", errors="surrogateescape") as f: f.write(label_file_contents) - if self.platform == "windows": + if platform.system().lower() == "windows": cmd = f'print /d:"{self.printer}" "{label_file}"' - elif self.platform == "cups": - cmd = f'lp -d "{self.printer}" "{label_file}"' else: - raise NotImplementedError(f"platform {self.platform!r} is not supported") + cmd = f'lp -d "{self.printer}" "{label_file}"' if not self.simulate: p = subprocess.run(cmd, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, shell=True) # unsafe if p.returncode != 0: - self.log.exception(f"failed to print: returncode: {p.returncode}\noutput:\n{p.stdout}") + self.log.exception(f"failed to print: return code: {p.returncode}\noutput:\n{p.stdout}") QMessageBox.critical( None, "Errore Stampante", diff --git a/src/ui/rfid_recipe_selection/__init__.py b/src/ui/rfid_recipe_selection/__init__.py deleted file mode 100644 index b3a3f30..0000000 --- a/src/ui/rfid_recipe_selection/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .rfid_recipe_selection import RFID_Recipe_Selection diff --git a/src/ui/rfid_recipe_selection/rfid_recipe_selection.py b/src/ui/rfid_recipe_selection/rfid_recipe_selection.py deleted file mode 100644 index b4145fc..0000000 --- a/src/ui/rfid_recipe_selection/rfid_recipe_selection.py +++ /dev/null @@ -1,85 +0,0 @@ -import sys - -import peewee -from PyQt5 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 ui.widget import Widget -from lib import db -from lib.db.models import Recipes - -class RFID(Widget): - def __init__(self, parent): - super().__init__() - self.parent=parent - self.recipe_db_model=Recipes - self.status_palettes = { - True: QPalette(), - "": QPalette(), - "warning": QPalette(), - 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.delay_timer = QTimer() - self.delay_timer.setSingleShot(True) - self.delay_timer.timeout.connect(self.reset_display) - - self.ok_timer = QTimer() - self.ok_timer.setSingleShot(True) - self.ok_timer.timeout.connect(self.set_recipe) - - def start(self, recipe=None, step=None, pieces=None): - - self.rfid_input_l.setPalette(self.status_palettes[None]) - self.rfid_input_l.setPlainText("") - - def get(self, data=None, override=False): - if not len(data): - data = None - if data is None: - return - else: - lines = data - if lines[0]=="ERRECINQUE RFID": - # RECIPE CODE FOUND - self.recipe=lines[1] - self.rfid_input_l.setPalette(self.status_palettes[True]) - self.ok_timer.start(2000) - - else: - # RECIPE CODE NOT FOUND - self.rfid_input_l.setPalette(self.status_palettes[False]) - self.instruction_text("FORMATO RFID DIMA NON VALIDO", "red") - self.delay_timer.start(3000) - - # LOOKUP RECIPE - - def set_recipe(self): - try: - recipe = self.recipe_db_model.get_by_id(self.recipe) - self.parent.set_recipe(recipe) - except peewee.DoesNotExist: - self.rfid_input_l.setPalette(self.status_palettes[False]) - self.instruction_text("RICETTA NON TROVATA","red") - self.delay_timer.start(3000) - - - def reset_display(self): - self.rfid_input_l.setFocus() - self.rfid_input_l.setPlainText("") - self.rfid_input_l.setPalette(self.status_palettes[""]) - self.instruction_text("INSERIRE IL CONNETTORE DI COLLEGAMENTO DIMA PER SELEZIONARE AUTOMATICAMENTE LA RICETTA DI COLLAUDO") - - def instruction_text(self,text,color=None): - if getattr(self.parent.centralWidget, "set_text"): - self.parent.centralWidget.set_text(text, color=color) - - diff --git a/src/ui/rfid_recipe_selection/rfid_recipe_selection.ui b/src/ui/rfid_recipe_selection/rfid_recipe_selection.ui deleted file mode 100644 index 2805d48..0000000 --- a/src/ui/rfid_recipe_selection/rfid_recipe_selection.ui +++ /dev/null @@ -1,95 +0,0 @@ - - - Test_Connector - - - - 0 - 0 - 1445 - 793 - - - - Test Connector - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 200 - 200 - - - - - 12 - - - - - - - - - - - - 600 - 0 - - - - - 600 - 200 - - - - - 20 - - - - 123 -456 -abc - - - - - - - - 20 - - - - TORNA ALLA TABELLA RICETTE - - - - - - - - diff --git a/src/ui/test/test.py b/src/ui/test/test.py index d806710..b76a47b 100755 --- a/src/ui/test/test.py +++ b/src/ui/test/test.py @@ -128,6 +128,7 @@ class Test(Widget): # CONNECT CYCLE CONTROLS self.cancel_b.clicked.connect(self.fail_cycle) self.change_recipe_b.clicked.connect(self.change_recipe) + self.reset_count_b.clicked.connect(self.reset_count) for step_name, w in self.cycle_available_steps.items(): if hasattr(w, "ok"): # custom ok handlers should call next again @@ -316,15 +317,24 @@ class Test(Widget): self.next_timer.start(0) if self.step.type == "done": self.archived = self.done() - self.next_timer.start(2000) + self.next_timer.start(1000) elif self.step.type == "print": compiled_label = self.print(self.archived, self.step.spec.get("template", "EtichettaR5")) self.archived.label = compiled_label self.archived.save() - self.next_timer.start(2000) + self.next_timer.start(1000) elif self.step.type == "wait": - self.next_timer.start(2000) - # UPDATE PIECES DISPLAY + self.next_timer.start(1000) + # UPDATE COUNT DISPLAY + self.updaate_count_display() + + def count_reset(self): + # COUNT RESET + self.pieces["ok"] = 0 + self.pieces["ko"] = 0 + self.updaate_count_display() + + def updaate_count_display(self): self.pieces_count_l.setText(f"{self.pieces['ok']} OK / {self.pieces['ko']} NOK / {sum(self.pieces.values())} TOT") def set_recipe(self, recipe=None): diff --git a/src/ui/test/test.ui b/src/ui/test/test.ui index f6de7e9..6120adb 100755 --- a/src/ui/test/test.ui +++ b/src/ui/test/test.ui @@ -7,7 +7,7 @@ 0 0 1252 - 146 + 125 @@ -19,7 +19,6 @@ 12 - 75 true @@ -52,40 +51,7 @@ 3 - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - N. DISEGNO: - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + Qt::Horizontal @@ -101,174 +67,48 @@ - - + + 12 - 75 true - PROSSIMO AUTOTEST: - - - Qt::AlignCenter + OPERATORE: - - + + 12 - 75 - true - - - - PEZZI FATTI - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 200 - 40 - - - - - 12 - 75 - true - - - - ANNULLA TEST - - - - - - - - 16 - 75 true - - - Qt::AlignCenter - - - - - - - - 12 - 75 - true - - - - 12345 -567 - - - Qt::AlignCenter - - + 0 0 - - - 150 - 0 - - - - - 20 - 16777215 - - 12 - 75 true - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 12 - 75 - true - - - - 12345 - - - Qt::AlignCenter - - - - - - - - 12 - 75 - true - - - - OPERATORE: + N. DISEGNO: @@ -295,7 +135,6 @@ 12 - 75 true @@ -304,17 +143,133 @@ - - + + 12 - 75 true - ULTIMO AUTOTEST: + PROSSIMO AUTOTEST: + + + Qt::AlignCenter + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + 200 + 40 + + + + + 12 + true + + + + ANNULLA TEST + + + + + + + + 0 + 0 + + + + + 150 + 0 + + + + + 20 + 16777215 + + + + + 12 + true + + + + - + + + + + + + + 12 + true + + + + 12345 + + + Qt::AlignCenter + + + + + + + + 16 + true + + + + - + + + Qt::AlignCenter + + + + + + + + 12 + true + + + + - Qt::AlignCenter @@ -334,31 +289,62 @@ - - + + 12 - 75 true - - + 12345 +567 + + + Qt::AlignCenter - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + 12 - 75 true - - + PEZZI FATTI + + + Qt::AlignCenter + + + + + + + + 12 + true + + + + ULTIMO AUTOTEST: Qt::AlignCenter @@ -370,7 +356,6 @@ 12 - 75 true @@ -382,6 +367,21 @@ + + + + + DejaVu Sans + 11 + true + + + + AZZERA +CONTATORE + + + diff --git a/src/ui/test_leak/test_leak.py b/src/ui/test_leak/test_leak.py index 2b6cc78..f6324cd 100644 --- a/src/ui/test_leak/test_leak.py +++ b/src/ui/test_leak/test_leak.py @@ -30,6 +30,10 @@ class Test_Leak(Test_Test): dialog.setCentralWidget(Test_Instructions_Reminder(recipe=self.parent.recipe,bench_name=self.parent.config.machine_id)) dialog.show() + def reset(self): + self.components["tecna_t3"].stop_test() + super.reset() + def stop_test(self): self.components["tecna_t3"].stop_test() self.display_text(text="PROVA INTERROTTA", bg_color="yellow") diff --git a/src/ui/test_leak/test_leak.ui b/src/ui/test_leak/test_leak.ui index f796fd9..1142b44 100644 --- a/src/ui/test_leak/test_leak.ui +++ b/src/ui/test_leak/test_leak.ui @@ -491,7 +491,6 @@ 20 - 75 true @@ -962,7 +961,6 @@ 20 - 75 true @@ -974,60 +972,6 @@ - - - - - 0 - 0 - - - - - 12 - 75 - true - - - - Risultato - - - - - - - 0 - 0 - - - - %v / %m - - - - - - - - 0 - 0 - - - - - 32 - 32 - - - - - - - - - - - @@ -1493,7 +1437,6 @@ 20 - 75 true @@ -1525,7 +1468,6 @@ 12 - 75 true @@ -1534,12 +1476,64 @@ + + + + + 0 + 0 + + + + + 12 + true + + + + Risultato + + + + + + + 0 + 0 + + + + %v / %m + + + + + + + + 0 + 0 + + + + + 32 + 32 + + + + - + + + + + + 12 - 75 true @@ -1547,90 +1541,6 @@ PROVA TENUTA - - - - - 16 - 50 - false - - - - Caduta massima ammessa - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16 - 50 - false - - - - background-color: rgb(255, 255, 255); -border: 1px solid black; - - - - - - - - - - - - - 16 - 50 - false - - - - Indice di sequenza del test - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16 - 50 - false - - - - Pressione regolatore - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16 - 50 - false - - - - mbar - - - @@ -1642,7 +1552,6 @@ border: 1px solid black; 20 - 50 false @@ -1656,25 +1565,21 @@ border: 1px solid black; - - + + 16 - 50 false - Tipo di test - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + mbar - - + + 130 @@ -1684,7 +1589,6 @@ border: 1px solid black; 20 - 50 false @@ -1698,7 +1602,246 @@ border: 1px solid black; - + + + + + 130 + 16777215 + + + + + 20 + false + + + + background-color: rgb(255, 255, 255); +border: 1px solid black; + + + + - + + + + + + + + 16 + false + + + + s + + + + + + + + 16 + false + + + + Tempo di assestamento + + + + + + + + 130 + 16777215 + + + + + 20 + false + + + + background-color: rgb(255, 255, 255); +border: 1px solid black; + + + + - + + + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 40 + 20 + + + + + + + + + 130 + 16777215 + + + + + 20 + false + + + + background-color: rgb(255, 255, 255); +border: 1px solid black; + + + + - + + + + + + + + 16 + false + + + + background-color: rgb(255, 255, 255); +border: 1px solid black; + + + + - + + + + + + + + 16 + false + + + + mbar + + + + + + + + 16 + false + + + + 0 + + + NUMERO TEST + + + Qt::AlignCenter + + + + + + + + 16 + false + + + + mbar + + + + + + + + 0 + 0 + + + + + 400 + 400 + + + + - + + + Qt::AlignCenter + + + + + + + + 16 + false + + + + Caduta minima ammessa + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 130 + 16777215 + + + + + 20 + false + + + + background-color: rgb(255, 255, 255); +border: 1px solid black; + + + + - + + + + @@ -1721,7 +1864,6 @@ border: 1px solid black; 48 - 50 false @@ -1738,52 +1880,64 @@ border: 1px solid black; - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 40 - 20 - - - - - - + + 16 - 50 false - mbar + Pressione di test da ricetta + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + 16 - 50 false - - background-color: rgb(255, 255, 255); -border: 1px solid black; - + + Fase di test + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16 + false + - - + s + + + + + + + + 16 + false + + + + Tempo di riempimento + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter @@ -1792,7 +1946,6 @@ border: 1px solid black; 16 - 50 false @@ -1804,8 +1957,53 @@ border: 1px solid black; - - + + + + + 16 + false + + + + s + + + + + + + + 16 + false + + + + Tempo di prova + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16 + false + + + + Caduta di pressione misurata + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + 130 @@ -1815,7 +2013,6 @@ border: 1px solid black; 20 - 50 false @@ -1829,12 +2026,11 @@ border: 1px solid black; - - + + 16 - 50 false @@ -1843,57 +2039,33 @@ border: 1px solid black; - - + + 16 - 50 false - mbar - - - - - - - - 16 - 50 - false - - - - mbar - - - - - - - - 16 - 50 - false - - - - Fase del test + Caduta massima ammessa Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - + + + + + 130 + 16777215 + + - 16 - 50 + 20 false @@ -1918,7 +2090,6 @@ border: 1px solid black; 20 - 50 false @@ -1932,88 +2103,11 @@ border: 1px solid black; - - + + 16 - 50 - false - - - - Caduta di pressione misurata - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 130 - 16777215 - - - - - 20 - 50 - false - - - - background-color: rgb(255, 255, 255); -border: 1px solid black; - - - - - - - - - - - - - 16 - 50 - false - - - - Pressione di test da ricetta - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16 - 50 - false - - - - Caduta minima ammessa - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - - 16 - 50 false @@ -2022,18 +2116,24 @@ border: 1px solid black; - - - - - 130 - 16777215 - - + + - 20 - 50 + 16 + false + + + + mbar + + + + + + + + 16 false @@ -2047,45 +2147,69 @@ border: 1px solid black; - - + + 16 - 50 false - - 0 - - - NUMERO TEST - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - 400 - 400 - + + background-color: rgb(255, 255, 255); +border: 1px solid black; + - + + + + + + + 16 + false + + + + Pressione regolatore + - Qt::AlignCenter + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16 + false + + + + Tipo di test + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + + 16 + false + + + + Indice di sequenza del test + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter