Changeset bb66619 in OpenModelica
- Timestamp:
- 2022-03-07T12:50:28+01:00 (2 years ago)
- Children:
- 5531a60d
- Parents:
- 7f7f27ed
- Location:
- OMEdit/OMEditLIB/OMS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OMEdit/OMEditLIB/OMS/OMSSimulationOutputWidget.cpp
r7f7f27ed rbb66619 63 63 QString OMSInteractiveCommands::_signals = QStringLiteral("signals"); 64 64 QString OMSInteractiveCommands::available = QStringLiteral("available"); 65 QString OMSInteractiveCommands::results = QStringLiteral("results"); 65 66 66 67 /*! … … 399 400 400 401 /*! 402 * \brief OMSSimulationOutputWidget::parseSimulationResults 403 * \param results 404 */ 405 void OMSSimulationOutputWidget::parseSimulationResults(const QVariant results) 406 { 407 qDebug() << results.toMap(); 408 } 409 410 /*! 401 411 * \brief OMSSimulationOutputWidget::simulationProcessStarted 402 412 * Updates the simulation output window when the simulation has started. … … 485 495 if (data.startsWith(OMSInteractiveCommands::status.toStdString().c_str())) { 486 496 jsonData = data.mid(QString(OMSInteractiveCommands::status).length()); 497 } else if (data.startsWith(OMSInteractiveCommands::results.toStdString().c_str())) { 498 jsonData = data.mid(QString(OMSInteractiveCommands::results).length()); 487 499 } else { 488 500 writeSimulationOutput(QString("Unknown simulation data %1.\n").arg(QString(data)), StringHandler::Error); … … 496 508 if (data.startsWith(OMSInteractiveCommands::status.toStdString().c_str())) { 497 509 parseSimulationProgress(jsonDocument.result); 510 } else if (data.startsWith(OMSInteractiveCommands::results.toStdString().c_str())) { 511 parseSimulationResults(jsonDocument.result); 498 512 } 499 513 } … … 509 523 void OMSSimulationOutputWidget::simulationReply(const QByteArray &reply, const QJsonObject &jsonObject) 510 524 { 511 writeSimulationOutput("client: " + reply + "\n", StringHandler::OMEditInfo); 525 if (MainWindow::instance()->isDebug()) { 526 writeSimulationOutput("client: " + reply + "\n", StringHandler::OMEditInfo); 527 } 512 528 JsonDocument jsonDocument; 513 529 if (jsonDocument.parse(reply)) { -
OMEdit/OMEditLIB/OMS/OMSSimulationOutputWidget.h
r58da1139 rbb66619 62 62 static QString _signals; 63 63 static QString available; 64 static QString results; 64 65 }; 65 66 … … 143 144 void parseSimulationProgress(const QVariant progress); 144 145 void parseSimulationVariables(const QVariant variables); 146 void parseSimulationResults(const QVariant results); 145 147 signals: 146 148 void sendRequest(const QJsonObject &jsonObject);
Note: See TracChangeset
for help on using the changeset viewer.