Skip to content
Snippets Groups Projects
Commit 07676aaa authored by Oscar Gustafsson's avatar Oscar Gustafsson :bicyclist:
Browse files

Move GUI decorators to gui_utils

parent 3f3e52c3
No related branches found
No related tags found
1 merge request!264Move GUI decorators to gui_utils
Pipeline #93244 passed
......@@ -14,7 +14,7 @@ from qtpy.QtWidgets import QAction, QMenu, QPushButton
from b_asic.GUI._preferences import GAP, GRID, MINBUTTONSIZE, PORTHEIGHT, PORTWIDTH
from b_asic.GUI.port_button import PortButton
from b_asic.GUI.properties_window import PropertiesWindow
from b_asic.GUI.utils import decorate_class, handle_error
from b_asic.gui_utils.decorators import decorate_class, handle_error
from b_asic.operation import Operation
from b_asic.port import InputPort
......
......@@ -43,8 +43,8 @@ from b_asic.GUI.show_pc_window import ShowPCWindow
# from b_asic.GUI.simulate_sfg_window import Plot, SimulateSFGWindow
from b_asic.GUI.simulate_sfg_window import SimulateSFGWindow
from b_asic.GUI.util_dialogs import FaqWindow, KeybindingsWindow
from b_asic.GUI.utils import decorate_class, handle_error
from b_asic.gui_utils.about_window import AboutWindow
from b_asic.gui_utils.decorators import decorate_class, handle_error
from b_asic.gui_utils.plot_window import PlotWindow
from b_asic.operation import Operation
from b_asic.port import InputPort, OutputPort
......
......@@ -9,9 +9,7 @@ def handle_error(fn):
return fn(self, *args, **kwargs)
except Exception:
self._window.logger.error(f"Unexpected error: {format_exc()}")
QErrorMessage(self._window).showMessage(
f"Unexpected error: {format_exc()}"
)
QErrorMessage(self._window).showMessage(f"Unexpected error: {format_exc()}")
return wrapper
......
......@@ -103,11 +103,3 @@ GUI.util\_dialogs module
:members:
:undoc-members:
:show-inheritance:
GUI.utils module
----------------
.. automodule:: b_asic.GUI.utils
:members:
:undoc-members:
:show-inheritance:
......@@ -5,6 +5,14 @@ GUI Utilities
:members:
:undoc-members:
gui\_utils.decorators module
----------------------------
.. automodule:: b_asic.gui_utils.decorators
:members:
:undoc-members:
gui\_utils.about\_window module
-------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment