basic openmodelica model emitting

This commit is contained in:
2026-07-20 17:34:18 +02:00
parent 42bf09610b
commit d368b36b8c
26 changed files with 1608 additions and 594 deletions

View File

@@ -365,81 +365,112 @@
</item>
<item>
<widget class="QSplitter" name="workspaceVerticalSplitter">
<property name="orientation"><enum>Qt::Orientation::Vertical</enum></property>
<property name="childrenCollapsible"><bool>false</bool></property>
<widget class="QStackedWidget" name="workspaceStack">
<property name="currentIndex">
<number>0</number>
<property name="orientation">
<enum>Qt::Orientation::Vertical</enum>
</property>
<widget class="QWidget" name="graphPage">
<layout class="QVBoxLayout" name="graphPageLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="GraphWorkspaceView" name="graphView"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="textPage">
<layout class="QVBoxLayout" name="textPageLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="TextDefinitionEditor" name="textDefinitionEditor" native="true"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="emptyPage">
<property name="styleSheet">
<string notr="true">background-color: #9a9a9a;</string>
<property name="childrenCollapsible">
<bool>false</bool>
</property>
<widget class="QStackedWidget" name="workspaceStack">
<property name="currentIndex">
<number>0</number>
</property>
<layout class="QVBoxLayout" name="emptyPageLayout">
<item>
<widget class="QLabel" name="emptyWorkspaceLabel">
<property name="styleSheet">
<string notr="true">background: transparent; color: #202020;</string>
</property>
<property name="text">
<string>No document open</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="graphPage">
<layout class="QVBoxLayout" name="graphPageLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="GraphWorkspaceView" name="graphView"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="textPage">
<layout class="QVBoxLayout" name="textPageLayout">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="TextDefinitionEditor" name="textDefinitionEditor" native="true"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="emptyPage">
<property name="styleSheet">
<string notr="true">background-color: #9a9a9a;</string>
</property>
<layout class="QVBoxLayout" name="emptyPageLayout">
<item>
<widget class="QLabel" name="emptyWorkspaceLabel">
<property name="styleSheet">
<string notr="true">background: transparent; color: #202020;</string>
</property>
<property name="text">
<string>No document open</string>
</property>
<property name="alignment">
<set>Qt::AlignmentFlag::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
<widget class="QTabWidget" name="outputTabs">
<property name="minimumSize"><size><width>0</width><height>100</height></size></property>
<property name="minimumSize">
<size>
<width>0</width>
<height>100</height>
</size>
</property>
<widget class="QWidget" name="logTab">
<attribute name="title"><string>Log</string></attribute>
<attribute name="title">
<string>Log</string>
</attribute>
<layout class="QVBoxLayout" name="logTabLayout">
<property name="leftMargin"><number>0</number></property>
<property name="topMargin"><number>0</number></property>
<property name="rightMargin"><number>0</number></property>
<property name="bottomMargin"><number>0</number></property>
<item><widget class="QPlainTextEdit" name="logOutput"><property name="readOnly"><bool>true</bool></property><property name="maximumBlockCount"><number>5000</number></property><property name="placeholderText"><string>Application messages appear here.</string></property></widget></item>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPlainTextEdit" name="logOutput">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="maximumBlockCount">
<number>5000</number>
</property>
<property name="placeholderText">
<string>Application messages appear here.</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
@@ -467,6 +498,7 @@
<addaction name="actionNew"/>
<addaction name="actionOpen"/>
<addaction name="actionReloadLibraries"/>
<addaction name="actionReloadSimulation"/>
<addaction name="separator"/>
<addaction name="actionSave"/>
<addaction name="actionSaveAs"/>
@@ -626,6 +658,9 @@
<property name="statusTip">
<string>Compile the active graph for simulation</string>
</property>
<property name="shortcut">
<string>F5</string>
</property>
</action>
<action name="actionNew">
<property name="icon">
@@ -716,7 +751,18 @@
<string>Reload configured library files from disk</string>
</property>
<property name="shortcut">
<string>F5</string>
<string>Shift+F5</string>
</property>
</action>
<action name="actionReloadSimulation">
<property name="text">
<string>Reload &amp;Simulation Code</string>
</property>
<property name="statusTip">
<string>Reload the simulation package while preserving runtime state</string>
</property>
<property name="shortcut">
<string>Ctrl+F5</string>
</property>
</action>
<action name="actionSave">

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>ParameterOptionsDialog</class>
<widget class="QDialog" name="ParameterOptionsDialog">
<property name="geometry"><rect><x>0</x><y>0</y><width>620</width><height>380</height></rect></property>
<property name="windowTitle"><string>Parameter Options</string></property>
<layout class="QVBoxLayout" name="dialogLayout">
<item><widget class="QSplitter" name="parameterSplitter"><property name="orientation"><enum>Qt::Orientation::Horizontal</enum></property><widget class="QWidget" name="parameterListPanel"><layout class="QVBoxLayout" name="parameterListLayout"><item><widget class="QListWidget" name="parameterList"/></item><item><layout class="QHBoxLayout" name="parameterButtonsLayout"><item><widget class="QPushButton" name="addParameterButton"><property name="text"><string>Add Parameter</string></property></widget></item><item><widget class="QPushButton" name="removeParameterButton"><property name="text"><string>Remove Parameter</string></property></widget></item></layout></item></layout></widget><widget class="QWidget" name="parameterDetailsPanel"><layout class="QFormLayout" name="parameterDetailsForm"><item row="0" column="0"><widget class="QLabel" name="nameLabel"><property name="text"><string>Name:</string></property></widget></item><item row="0" column="1"><widget class="QLineEdit" name="nameEdit"/></item><item row="1" column="0"><widget class="QLabel" name="typeLabel"><property name="text"><string>Type:</string></property></widget></item><item row="1" column="1"><widget class="QLineEdit" name="typeEdit"/></item><item row="2" column="0"><widget class="QLabel" name="valueLabel"><property name="text"><string>Value:</string></property></widget></item><item row="2" column="1"><widget class="QLineEdit" name="valueEdit"/></item></layout></widget></widget></item>
<item><widget class="QDialogButtonBox" name="buttonBox"><property name="standardButtons"><set>QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok</set></property></widget></item>
</layout>
</widget>
<resources/>
<connections><connection><sender>buttonBox</sender><signal>accepted()</signal><receiver>ParameterOptionsDialog</receiver><slot>accept()</slot><hints/></connection><connection><sender>buttonBox</sender><signal>rejected()</signal><receiver>ParameterOptionsDialog</receiver><slot>reject()</slot><hints/></connection></connections>
</ui>

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>480</width>
<height>420</height>
<height>520</height>
</rect>
</property>
<property name="windowTitle">
@@ -86,6 +86,13 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="syntaxTab">
<attribute name="title"><string>Text highlighting</string></attribute>
<layout class="QVBoxLayout" name="syntaxTabLayout">
<item><widget class="QLabel" name="syntaxHintLabel"><property name="text"><string>Double-click a colour cell to choose a colour. Word lists remain editable in data/syntax/openmodelica.json.</string></property><property name="wordWrap"><bool>true</bool></property></widget></item>
<item><widget class="QTableWidget" name="syntaxStylesTable"><property name="selectionBehavior"><enum>QAbstractItemView::SelectionBehavior::SelectRows</enum></property><property name="columnCount"><number>4</number></property><column><property name="text"><string>Expression type</string></property></column><column><property name="text"><string>Colour</string></property></column><column><property name="text"><string>Bold</string></property></column><column><property name="text"><string>Italic</string></property></column></widget></item>
</layout>
</widget>
<widget class="QWidget" name="librariesTab">
<attribute name="title">
<string>Libraries</string>

View File

@@ -15,7 +15,7 @@
<widget class="QGroupBox" name="equationsGroup">
<property name="title"><string>Equations</string></property>
<layout class="QVBoxLayout" name="equationsLayout">
<item><widget class="QPlainTextEdit" name="equationsEdit"><property name="lineWrapMode"><enum>QPlainTextEdit::LineWrapMode::NoWrap</enum></property><property name="placeholderText"><string>Enter equations here…</string></property></widget></item>
<item><widget class="OpenModelicaEditor" name="equationsEdit"/></item>
</layout>
</widget>
<widget class="QSplitter" name="definitionSplitter">
@@ -40,6 +40,13 @@
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>OpenModelicaEditor</class>
<extends>QPlainTextEdit</extends>
<header>bedit.gui.editors.openmodelica</header>
</customwidget>
</customwidgets>
<resources/>
<connections/>
</ui>