Skip to content

Commit

Permalink
- Added simulate() option cflags = ""
Browse files Browse the repository at this point in the history
  - Also added a field for this in the OMEdit simulation widget


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8586 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 11, 2011
1 parent 9e45c46 commit f115acf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions OMEdit/OMEditGUI/SimulationWidget.cpp
Expand Up @@ -97,6 +97,8 @@ void SimulationWidget::setUpForm()
mpOutputFormatComboBox->addItems(Helper::ModelicaSimulationOutputFormats.toLower().split(","));
mpFileNameLabel = new QLabel(tr("File Name (Optional):"));
mpFileNameTextBox = new QLineEdit(tr(""));
mpCflagsLabel = new QLabel(tr("Compiler flags:"));
mpCflagsTextBox = new QLineEdit(tr(""));

gridIntegrationLayout->addWidget(mpMethodLabel, 0, 0);
gridIntegrationLayout->addWidget(mpMethodComboBox, 0, 1);
Expand All @@ -106,6 +108,8 @@ void SimulationWidget::setUpForm()
gridIntegrationLayout->addWidget(mpOutputFormatComboBox, 2, 1);
gridIntegrationLayout->addWidget(mpFileNameLabel, 3, 0);
gridIntegrationLayout->addWidget(mpFileNameTextBox, 3, 1);
gridIntegrationLayout->addWidget(mpCflagsLabel, 4, 0);
gridIntegrationLayout->addWidget(mpCflagsTextBox, 4, 1);
mpIntegrationGroup->setLayout(gridIntegrationLayout);

// Add the validators
Expand Down Expand Up @@ -180,6 +184,7 @@ void SimulationWidget::initializeFields()
mpMethodComboBox->setCurrentIndex(mpMethodComboBox->findText(StringHandler::removeFirstLastQuotes(
simulationOptionsList.at(4))));
mpFileNameTextBox->setText(tr(""));
mpCflagsTextBox->setText(tr(""));
}

void SimulationWidget::show(bool isInteractive)
Expand Down Expand Up @@ -238,6 +243,9 @@ void SimulationWidget::simulate()
if (!mpFileNameTextBox->text().isEmpty())
simualtionParameters.append(tr(", fileNamePrefix=")).append("\"")
.append(mpFileNameTextBox->text()).append("\"");
if (!mpCflagsTextBox->text().isEmpty())
simualtionParameters.append(tr(", cflags=")).append("\"")
.append(mpCflagsTextBox->text()).append("\"");

ProjectTab *projectTab = mpParentMainWindow->mpProjectTabs->getCurrentTab();

Expand Down
2 changes: 2 additions & 0 deletions OMEdit/OMEditGUI/SimulationWidget.h
Expand Up @@ -73,6 +73,8 @@ class SimulationWidget : public QDialog
QComboBox *mpOutputFormatComboBox;
QLabel *mpFileNameLabel;
QLineEdit *mpFileNameTextBox;
QLabel *mpCflagsLabel;
QLineEdit *mpCflagsTextBox;
QPushButton *mpCancelButton;
QPushButton *mpSimulateButton;
QDialogButtonBox *mpButtonBox;
Expand Down

0 comments on commit f115acf

Please sign in to comment.