From e5650b53786286fa02f600323755da9018128888 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Tue, 19 Mar 2024 17:21:27 +0100 Subject: [PATCH] MainWindow: Checkers: Add checker tab template. --- src/Solver/Mage.py | 1 - src/View/MainWindow.py | 14 ++++ src/View/Translate.py | 3 + src/View/ui/Widgets/MainWindowTabCheckers.ui | 78 ++++++++++++++++++++ 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 src/View/ui/Widgets/MainWindowTabCheckers.ui diff --git a/src/Solver/Mage.py b/src/Solver/Mage.py index cc18fb2c..e4754ccb 100644 --- a/src/Solver/Mage.py +++ b/src/Solver/Mage.py @@ -101,7 +101,6 @@ class Mage(CommandLineSolver): MageNetworkGraphChecker(connectivity=True), MageNetworkGraphChecker(connectivity=False), MageGeometryGuideLineChecker(), - ] return lst diff --git a/src/View/MainWindow.py b/src/View/MainWindow.py index 0fcccd51..f98811d2 100644 --- a/src/View/MainWindow.py +++ b/src/View/MainWindow.py @@ -47,6 +47,7 @@ from View.DummyWindow import DummyWindow from View.Translate import MainTranslate from View.MainWindowTabInfo import WidgetInfo +from View.MainWindowTabChecker import WidgetChecker from View.Configure.Window import ConfigureWindow from View.Study.Window import NewStudyWindow @@ -174,6 +175,7 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): def setup_tab(self): self.setup_tab_info() + self.setup_tab_checker() def setup_tab_info(self): tab_widget = self.findChild(QTabWidget, "tabWidget") @@ -187,6 +189,18 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit): self._trad["tab_info_name"] ) + def setup_tab_checker(self): + tab_widget = self.findChild(QTabWidget, "tabWidget") + + self._tab_widget_checker = WidgetChecker( + study=self._study, parent=self + ) + + tab_widget.addTab( + self._tab_widget_checker, + self._trad["tab_checker_name"] + ) + def enable_actions(self, action: str, enable: bool): """Enable of disable an action componant diff --git a/src/View/Translate.py b/src/View/Translate.py index 8ca10513..f3041567 100644 --- a/src/View/Translate.py +++ b/src/View/Translate.py @@ -78,6 +78,9 @@ class MainTranslate(UnitTranslate): self._dict["tab_info_name"] = _translate( "MainWindow", "Summary" ) + self._dict["tab_checker_name"] = _translate( + "MainWindow", "Checks" + ) self._dict["open_debug"] = _translate( "MainWindow", "Open debug window" diff --git a/src/View/ui/Widgets/MainWindowTabCheckers.ui b/src/View/ui/Widgets/MainWindowTabCheckers.ui new file mode 100644 index 00000000..5a0a3023 --- /dev/null +++ b/src/View/ui/Widgets/MainWindowTabCheckers.ui @@ -0,0 +1,78 @@ + + + Form + + + + 0 + 0 + 640 + 480 + + + + Form + + + + + + + + Restart + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + + + Qt::Vertical + + + + Checkers list + + + + + + + + + + Errors summary + + + + + + + + + + + + + + +