Start of a sim window
This commit is contained in:
@@ -114,10 +114,17 @@ Keep the root of `src/bedit` minimal. New UI modules should go into the relevant
|
||||
- OpenModelica integration belongs in `core/simulation/openmodelica.py`. Its
|
||||
persistent worker and OMC session start lazily on the first queued request.
|
||||
Never perform OMPython work directly on the Qt GUI thread. Result and error
|
||||
callbacks run on the worker thread and must use a Qt signal before touching UI.
|
||||
callbacks run on background threads and must use a Qt signal before touching UI.
|
||||
One lazy temporary working directory is shared by all requests in the session.
|
||||
Explicit application shutdown closes OMC and removes that directory plus the
|
||||
current session's OMPython log and port files; `__del__` is only a fallback.
|
||||
- Simulation runs start an ephemeral localhost TCP listener before launching the
|
||||
generated model through OMC's `system()` function. OpenModelica's newline-delimited
|
||||
`xmltcp` status and message records are parsed in the core and forwarded through
|
||||
callbacks; the simulation service retains the latest progress for polling.
|
||||
- The application owns one reusable `SimulationWindow`. Starting a run clears its
|
||||
progress, log, and future result views. Extend graph presentation through its
|
||||
Designer-owned `resultsLayout` and the `clear_results()`/`load_results()` hooks.
|
||||
- The optional OpenModelica executable is persisted as
|
||||
`simulation/openModelicaPath`. The GUI passes it into `Simulation`; core must
|
||||
not read `QSettings`. An empty path uses OMPython/PATH discovery, while an
|
||||
@@ -162,6 +169,9 @@ pyside6-uic --from-imports ui/text_definition_editor.ui \
|
||||
pyside6-uic --from-imports ui/simulation_settings_dialog.ui \
|
||||
-o src/bedit/gui/generated/ui_simulation_settings_dialog.py
|
||||
|
||||
pyside6-uic --from-imports ui/simulation_window.ui \
|
||||
-o src/bedit/gui/generated/ui_simulation_window.py
|
||||
|
||||
pyside6-uic --from-imports ui/graph_parameters_dialog.ui \
|
||||
-o src/bedit/gui/generated/ui_graph_parameters_dialog.py
|
||||
|
||||
|
||||
Reference in New Issue
Block a user