From cf446602f24e9a63fc62d35f2a34a725ba4eca4d Mon Sep 17 00:00:00 2001 From: germano Date: Sun, 23 Apr 2023 18:53:05 +0200 Subject: [PATCH] autotest wip --- src/main.py | 26 ++- src/ui/main_window/main_window.ui | 6 +- src/ui/test/test.ui | 318 +++++++++++++++++------------- 3 files changed, 191 insertions(+), 159 deletions(-) diff --git a/src/main.py b/src/main.py index 1030df4..e99af4d 100644 --- a/src/main.py +++ b/src/main.py @@ -166,23 +166,22 @@ try: Archive(hide_cloud_image="vision_saver" not in self().components))) if "--archive" in sys.argv: self.main_window.archive_a.trigger() - self.main_window.about_a.triggered.connect( - lambda checked, self=weakref.ref(self): self().main_window.open_dialog(About())) if "--about" in sys.argv: self.main_window.about_a.trigger() - self.main_window.admin_m.menuAction().setVisible( - False) # admin menu should not be visible before an admin logs in + + # admin menu should not be visible before an admin logs in + self.main_window.admin_m.menuAction().setVisible(False) + + self.main_window.about_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(About())) self.main_window.quit_a.triggered.connect(quit_app) - self.main_window.users_management_a.triggered.connect( - lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Users_Management())) + self.main_window.users_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Users_Management())) + self.main_window.table_selection_a.triggered.connect(self.set_recipe_mode_table) + self.main_window.barcode_selection_a.triggered.connect(self.set_recipe_mode_barcode) + if "--users-management" in sys.argv: self.main_window.users_management_a.trigger() - # self.main_window.recipes_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Recipes_Management())) - # if "--recipes-management" in sys.argv: - # self.main_window.recipes_management_a.trigger() - # self.main_window.steps_management_a.triggered.connect(lambda checked, self=weakref.ref(self): self().main_window.open_dialog(Steps_Management())) - # if "--steps-management" in sys.argv: - # self.main_window.steps_management_a.trigger() + + # CONFIG-SPECIFIC MENU ENTRY ACTIVATION if "tecna_t3" in self.components and ( "--enable-saving-tecna-recipes" in sys.argv or self.config.get("tecna_t3", {}).get("saver", None) == "present"): @@ -192,9 +191,8 @@ try: self.main_window.save_tecna_recipes_a.trigger() else: self.main_window.save_tecna_recipes_a.setVisible(False) + self.main_window.barcode_selection_a.setVisible(self.config["hardware_config"]["barcode_recipe_selection"] == "present") - self.main_window.table_selection_a.triggered.connect(self.set_recipe_mode_table) - self.main_window.barcode_selection_a.triggered.connect(self.set_recipe_mode_barcode) # OPEN LOGIN TAB self.open_login() # SHOW MAIN WINDOW diff --git a/src/ui/main_window/main_window.ui b/src/ui/main_window/main_window.ui index f404bef..0ec3684 100644 --- a/src/ui/main_window/main_window.ui +++ b/src/ui/main_window/main_window.ui @@ -25,7 +25,7 @@ 0 0 843 - 28 + 31 @@ -35,7 +35,7 @@ - About + Informazioni @@ -72,7 +72,7 @@ - Powered by + Contatti diff --git a/src/ui/test/test.ui b/src/ui/test/test.ui index 9bdf1aa..ac9e4b9 100755 --- a/src/ui/test/test.ui +++ b/src/ui/test/test.ui @@ -6,8 +6,8 @@ 0 0 - 842 - 118 + 1252 + 146 @@ -52,52 +52,7 @@ 3 - - - - - 0 - 0 - - - - - 0 - 0 - - - - - 200 - 40 - - - - - 12 - 75 - true - - - - CAMBIA DISEGNO - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + Qt::Horizontal @@ -110,71 +65,6 @@ - - - - - 12 - 75 - true - - - - 12345 - - - Qt::AlignCenter - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - 12 - 75 - true - - - - PEZZI FATTI - - - Qt::AlignCenter - - - - - - - - 12 - 75 - true - - - - 12345 -567 - - - Qt::AlignCenter - - - @@ -201,14 +91,38 @@ - - - - - 0 - 0 - + + + + Qt::Horizontal + + + 40 + 20 + + + + + + + + + 16 + 75 + true + + + + - + + + Qt::AlignCenter + + + + + 12 @@ -217,25 +131,14 @@ - N. DISEGNO: + 12345 + + + Qt::AlignCenter - - - - - 12 - 75 - true - - - - OPERATORE: - - - - + @@ -268,7 +171,7 @@ - + 12 @@ -277,11 +180,66 @@ - - + OPERATORE: - + + + + + 12 + 75 + true + + + + 12345 +567 + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + 12 + 75 + true + + + + N. DISEGNO: + + + + + + + + 12 + 75 + true + + + + PEZZI FATTI + + + Qt::AlignCenter + + + + Qt::Horizontal @@ -297,11 +255,24 @@ - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - 16 + 12 75 true @@ -309,6 +280,69 @@ - + + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 200 + 40 + + + + + 12 + 75 + true + + + + CAMBIA DISEGNO + + + + + + + + 12 + 75 + true + + + + ULTIMO AUTOTEST: + + + Qt::AlignCenter + + + + + + + + 12 + 75 + true + + + + DD/MM/YY HH:MM + Qt::AlignCenter