From 72fd047d9c6ffaa03b380bc1e412efc1556c8f54 Mon Sep 17 00:00:00 2001 From: foefl Date: Wed, 27 May 2026 14:21:55 +0200 Subject: [PATCH] add GUI file to lib --- run_gui.ps1 | 1 + prototypes/t_qt_2.py => src/wce_crm/gui.py | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 run_gui.ps1 rename prototypes/t_qt_2.py => src/wce_crm/gui.py (99%) diff --git a/run_gui.ps1 b/run_gui.ps1 new file mode 100644 index 0000000..1d7cf22 --- /dev/null +++ b/run_gui.ps1 @@ -0,0 +1 @@ +pdm run python -m wce_crm.gui \ No newline at end of file diff --git a/prototypes/t_qt_2.py b/src/wce_crm/gui.py similarity index 99% rename from prototypes/t_qt_2.py rename to src/wce_crm/gui.py index d806d35..55bda69 100644 --- a/prototypes/t_qt_2.py +++ b/src/wce_crm/gui.py @@ -1629,14 +1629,20 @@ class AutoForm(QWidget): separator1.setFrameShadow(QFrame.Shadow.Sunken) self.main_layout.addWidget(separator1) + self.registry_button = QPushButton("Ausgabe Widget Registry") + self.registry_button.clicked.connect(self._print_registry) + self.registry_button.setFixedHeight(35) + self.main_layout.addWidget(self.registry_button) + self.test_button = QPushButton("Initialisiere Laden") self.test_button.clicked.connect(self.load_data) - self.test_button.setFixedHeight(50) + self.test_button.setFixedHeight(35) self.test_button.setSizePolicy( QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed ) self.main_layout.addWidget(self.test_button) button = QPushButton("GET DATA") + button.setFixedHeight(35) button.clicked.connect(self.get_form_data) self.main_layout.addWidget(button) @@ -1649,6 +1655,7 @@ class AutoForm(QWidget): id_field_layout.addWidget(self.id_field_input) self.main_layout.addLayout(id_field_layout) button_db_index = QPushButton("Setze DB Index") + button_db_index.setFixedHeight(35) button_db_index.clicked.connect(self._set_db_index) self.main_layout.addWidget(button_db_index) @@ -1699,6 +1706,9 @@ class AutoForm(QWidget): self.current_id: int = -1 + def _print_registry(self) -> None: + pprint_registry(self.widget_registry) + def _set_db_index(self) -> None: try: index = int(self.id_field_input.text())