Start of simulation settings window

This commit is contained in:
Joppe Blondel
2026-07-30 21:12:36 +02:00
parent 748bb08531
commit a03c6d624e
4 changed files with 384 additions and 12 deletions
+74
View File
@@ -74,9 +74,20 @@
</property>
<addaction name="actionAbout_QT"/>
</widget>
<widget class="QMenu" name="menuSimulation">
<property name="title">
<string>Simulation</string>
</property>
<addaction name="actionSimulation_Settings"/>
<addaction name="actionEdit_Parameters"/>
<addaction name="separator"/>
<addaction name="actionCompile_Model"/>
<addaction name="actionOpen_Simulation_Window"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
<addaction name="menuView"/>
<addaction name="menuSimulation"/>
<addaction name="menuHelp"/>
</widget>
<widget class="QStatusBar" name="statusbar"/>
@@ -153,6 +164,21 @@
</layout>
</widget>
</widget>
<widget class="QToolBar" name="simToolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionSimulation_Settings"/>
<addaction name="actionEdit_Parameters"/>
<addaction name="actionCompile_Model"/>
<addaction name="actionOpen_Simulation_Window"/>
</widget>
<action name="actionOpen_File">
<property name="icon">
<iconset resource="../../resources/resources.qrc">
@@ -386,6 +412,54 @@
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
<action name="actionSimulation_Settings">
<property name="icon">
<iconset resource="../../resources/resources.qrc">
<normaloff>:/icons/icons/configure.png</normaloff>:/icons/icons/configure.png</iconset>
</property>
<property name="text">
<string>Simulation Settings</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
<action name="actionEdit_Parameters">
<property name="icon">
<iconset resource="../../resources/resources.qrc">
<normaloff>:/icons/icons/view-form-table.png</normaloff>:/icons/icons/view-form-table.png</iconset>
</property>
<property name="text">
<string>Edit Parameters</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
<action name="actionCompile_Model">
<property name="icon">
<iconset resource="../../resources/resources.qrc">
<normaloff>:/icons/icons/run-build.png</normaloff>:/icons/icons/run-build.png</iconset>
</property>
<property name="text">
<string>Compile Model</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
<action name="actionOpen_Simulation_Window">
<property name="icon">
<iconset resource="../../resources/resources.qrc">
<normaloff>:/icons/icons/office-chart-line.png</normaloff>:/icons/icons/office-chart-line.png</iconset>
</property>
<property name="text">
<string>Open Simulation Window</string>
</property>
<property name="menuRole">
<enum>QAction::MenuRole::NoRole</enum>
</property>
</action>
</widget>
<resources>
<include location="../../resources/resources.qrc"/>
@@ -0,0 +1,236 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>562</width>
<height>451</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QListWidget" name="simulationList"/>
</item>
<item>
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::Shape::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Shadow::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<layout class="QFormLayout" name="basicForm">
<item row="0" column="0">
<widget class="QLabel" name="nameLabel">
<property name="text">
<string>Name:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="componentLabel">
<property name="text">
<string>Component:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="nameEdit"/>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="componentCompoBox"/>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="timeForm">
<item row="0" column="0">
<widget class="QLabel" name="startTimeLabel">
<property name="text">
<string>Start time:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="simLengthLabel">
<property name="text">
<string>Simulation length:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="startTimeSpinBox">
<property name="suffix">
<string> s</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="simLengthSpinBox">
<property name="suffix">
<string> s</string>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QRadioButton" name="stepSizeButton">
<property name="text">
<string>Step size</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="nrOfStepsButton">
<property name="text">
<string>Number of steps</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QLabel" name="stepSizeLabel">
<property name="text">
<string>Step size:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="stepLabel">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="stepSizeSpinBox">
<property name="suffix">
<string> s</string>
</property>
<property name="decimals">
<number>4</number>
</property>
<property name="value">
<double>0.001000000000000</double>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="nrOfStepsSpinBox"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="nrOfStepsLabel">
<property name="text">
<string>Number of steps:</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="simulationMethodComboBox"/>
</item>
<item row="5" column="0">
<widget class="QLabel" name="simMethodLabel">
<property name="text">
<string>Simulation method:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
</widget>
</item>
<item>
<layout class="QFormLayout" name="dasslForm">
<item row="0" column="1">
<widget class="QLineEdit" name="toleranceEdit">
<property name="text">
<string>1e-06</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="toleranceLabel">
<property name="text">
<string>Tolerance:</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<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>Dialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>Dialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>