basic openmodelica model emitting
This commit is contained in:
@@ -54,6 +54,8 @@ Keep the root of `src/bedit` minimal. New UI modules should go into the relevant
|
||||
- Components may contain nested graph or text implementations.
|
||||
- Ports retain stable IDs. Display names, types, orientation, positions, and icon
|
||||
anchors may change without changing IDs.
|
||||
- Parameters belong to `Component` rather than a particular implementation kind,
|
||||
so graph and text components share stable-ID name/type/value records.
|
||||
- Port orientation is presented as one unified list in the UI, while the model
|
||||
indexes inputs and outputs separately for connection semantics.
|
||||
- Port types are registered in `core/port_types.py`. Only compatible types may be
|
||||
@@ -92,9 +94,23 @@ Keep the root of `src/bedit` minimal. New UI modules should go into the relevant
|
||||
- Avoid the QSettings group name `general`; Qt treats `General` specially in INI
|
||||
files. Autosave keys live under `autosave/`.
|
||||
- User-visible document edits should participate in undo/redo.
|
||||
- The text-definition editor uses OpenModelica highlighting and completion from
|
||||
`src/bedit/data/syntax/openmodelica.json`. Keep keywords, types, built-ins, and
|
||||
named BEdit `$name$` macro completions editable there; arbitrary `$name$`
|
||||
expressions are highlighted as BEvalues. Highlight colors and bold/italic
|
||||
styles are persisted under `syntax/<category>/` in application settings.
|
||||
- Application-wide messages use `core.application_log.get_logger()`. The main
|
||||
window installs the Qt log-panel handler; core code must only use standard
|
||||
Python logging and must not import the GUI handler.
|
||||
- File → Reload Simulation Code (`Ctrl+F5`) reloads modules under
|
||||
`bedit.core.simulation`, replaces the shared application/controller service,
|
||||
and preserves the previous instance attributes where possible.
|
||||
- Simulation compilation lives in `core/simulation/compiler.py`; the simulation
|
||||
service only owns application state and delegates compilation. Ports with
|
||||
`multipleConnections` are emitted as Modelica arrays. Their size is inferred
|
||||
per component instance from graph connections and exposed while compiling as
|
||||
`$portname_N$`; array connection endpoints receive stable one-based indices in
|
||||
graph connection order.
|
||||
|
||||
## Qt Designer and generated files
|
||||
|
||||
@@ -134,6 +150,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/parameter_options_dialog.ui \
|
||||
-o src/bedit/gui/generated/ui_parameter_options_dialog.py
|
||||
```
|
||||
|
||||
When adding a promoted/custom widget in Designer, its header must use the real
|
||||
|
||||
Reference in New Issue
Block a user