Skip to content

Commit

Permalink
Added user interface option for tsv unconnected variable output flag (c…
Browse files Browse the repository at this point in the history
…loses #48)
  • Loading branch information
ghorwin committed Jan 7, 2025
1 parent 8826831 commit 81ca3c1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
16 changes: 14 additions & 2 deletions MasterSimulatorUI/src/MSIMViewSimulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ MSIMViewSimulation::MSIMViewSimulation(QWidget *parent) :
{
m_ui->setupUi(this);

connect(&MSIMProjectHandler::instance(), SIGNAL(modified(unsigned int,void*)),
this, SLOT(onModified(unsigned int,void*)));
connect(&MSIMProjectHandler::instance(), &MSIMProjectHandler::modified,
this, &MSIMViewSimulation::onModified);

blockMySignals(this, true);

Expand Down Expand Up @@ -117,6 +117,7 @@ void MSIMViewSimulation::onModified(unsigned int modificationType, void * /*data
m_ui->checkBoxAdjustStepSize->setChecked( project().m_adjustStepSize);

m_ui->checkBoxWriteInternalVariables->setChecked( project().m_writeInternalVariables);
m_ui->checkBoxWriteUnconnectedVariables->setChecked( project().m_writeUnconnectedFileReaderVars);
m_ui->checkBoxPreventOversteppingOfEndTime->setChecked( project().m_preventOversteppingOfEndTime);

blockMySignals(this, false);
Expand Down Expand Up @@ -536,6 +537,15 @@ void MSIMViewSimulation::on_checkBoxWriteInternalVariables_toggled(bool checked)
}


void MSIMViewSimulation::on_checkBoxWriteUnconnectedVariables_toggled(bool checked) {
MASTER_SIM::Project p = project(); // create copy of project
p.m_writeUnconnectedFileReaderVars = checked;

MSIMUndoSimulationSettings * cmd = new MSIMUndoSimulationSettings(tr("Simulation setting changed"), p);
cmd->push();
}


void MSIMViewSimulation::on_checkBoxPreventOversteppingOfEndTime_toggled(bool checked) {
MASTER_SIM::Project p = project(); // create copy of project
p.m_preventOversteppingOfEndTime = checked;
Expand All @@ -553,3 +563,5 @@ void MSIMViewSimulation::on_checkBoxSkipUnzip_toggled(bool) {
updateCommandLine();
}



2 changes: 2 additions & 0 deletions MasterSimulatorUI/src/MSIMViewSimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,15 @@ private slots:
void on_pushButtonShowLogfile_clicked();

void on_checkBoxWriteInternalVariables_toggled(bool checked);
void on_checkBoxWriteUnconnectedVariables_toggled(bool checked);

void on_checkBoxPreventOversteppingOfEndTime_toggled(bool checked);

void on_comboBoxTermEmulator_currentIndexChanged(int index);

void on_checkBoxSkipUnzip_toggled(bool checked);


private:
void updateCommandLine();

Expand Down
17 changes: 12 additions & 5 deletions MasterSimulatorUI/src/MSIMViewSimulation.ui
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,23 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditDtOutput"/>
<item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="checkBoxWriteInternalVariables">
<property name="text">
<string>Write internal variables as outputs</string>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QComboBox" name="comboBoxDtOutputUnit"/>
</item>
<item row="1" column="0" colspan="3">
<widget class="QCheckBox" name="checkBoxWriteInternalVariables">
<item row="0" column="1">
<widget class="QLineEdit" name="lineEditDtOutput"/>
</item>
<item row="2" column="0" colspan="3">
<widget class="QCheckBox" name="checkBoxWriteUnconnectedVariables">
<property name="text">
<string>Write internal variables as outputs</string>
<string>Write not connected variables from file reader slaves</string>
</property>
</widget>
</item>
Expand Down

0 comments on commit 81ca3c1

Please sign in to comment.