Commit 62cc90f2 authored by Aaron Bray's avatar Aaron Bray
Browse files

Renames and Update to ownership hierarchy

parent 13841790
......@@ -80,12 +80,12 @@ set(moc_sources
controls/ScalarWidget.h
controls/VitalsMonitorWidget.h
controls/DataRequestWidget.h
controls/DataRequestsWidget.h
controls/DataRequestViewWidget.h
controls/DynamicControlsWidget.h
controls/PatientEditorWidget.h
controls/ConditionsEditorWidget.h
controls/ScenarioEditorWidget.h
controls/GraphModal.h
controls/PlotSetWidget.h
conditions/ConditionWidget.h
conditions/ChronicAnemiaWidget.h
......@@ -108,7 +108,7 @@ set(UI_FILES
ui/PatientEditor.ui
ui/VitalsMonitor.ui
ui/DataRequest.ui
ui/DataRequests.ui
ui/DataRequestView.ui
ui/DynamicControls.ui
......@@ -120,7 +120,7 @@ set(UI_FILES
ui/AnaphylaxisShowcase.ui
ui/MultiTraumaShowcase.ui
ui/GraphModal.ui
ui/PlotSet.ui
)
source_group("UI" FILES ${UI_FILES})
QT5_WRAP_CPP(MOC_BUILT_SOURCES ${moc_sources})
......@@ -140,6 +140,8 @@ set(CONTROLS_FILES
controls/QPulse.h
controls/QPulsePlot.cxx
controls/QPulsePlot.h
controls/PlotSetWidget.cxx
controls/PlotSetWidget.h
controls/ScalarWidget.cxx
controls/ScalarWidget.h
controls/ScalarQuantityWidget.inl
......@@ -156,12 +158,10 @@ set(CONTROLS_FILES
controls/ScenarioEditorWidget.cxx
controls/DataRequestWidget.cxx
controls/DataRequestWidget.h
controls/DataRequestsWidget.cxx
controls/DataRequestsWidget.h
controls/DataRequestViewWidget.cxx
controls/DataRequestViewWidget.h
controls/VitalsMonitorWidget.cxx
controls/VitalsMonitorWidget.h
controls/GraphModal.cxx
controls/GraphModal.h
)
source_group("Controls" FILES ${CONTROLS_FILES})
list(APPEND SOURCE ${CONTROLS_FILES})
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include <QPropertyAnimation>
#include "CollapsableWidget.h"
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "DataRequestsWidget.h"
#include "ui_DataRequests.h"
#include "DataRequestViewWidget.h"
#include "ui_DataRequestView.h"
#include <QLayout>
#include <QMdiSubWindow>
#include "QPulsePlot.h"
#include "cdm/CommonDataModel.h"
......@@ -20,59 +20,37 @@ See accompanying NOTICE file for details.*/
#include "cdm/properties/SEScalarTime.h"
#include "cdm/properties/SEScalarVolume.h"
#include "cdm/properties/SEScalarVolumePerTime.h"
#include <QMdiSubWindow>
#include "GraphModal.h"
#include "controls/PlotSetWidget.h"
class QDataRequestsWidget::Controls : public Ui::DataRequestsWidget
class QDataRequestViewWidget::Controls : public Ui::DataRequestViewWidget
{
public:
Controls(QTextEdit& log) : LogBox(log) {}
QTextEdit& LogBox;
size_t CurrentPlot=-1;
std::vector<QPulsePlot*> Plots;
std::vector<double> Values; // New value for the plot
std::vector<std::string> Titles;
std::vector<GraphModal*> Modals;
std::map<std::string, GraphModal*> Map;
//Physiology Properties
std::vector<std::string> BloodChemistry{"RedBloodCellCount","BloodPH","VenousOxygenPressure","ShuntFraction","VolumeFractionNeutralPhospholipidInPlasma","BloodUreaNitrogenConcentration","PulseOximetry","CarbonMonoxideSaturation","PulmonaryArterialCarbonDioxidePressure","StrongIonDifference","TotalProteinConcentration","VolumeFractionNeutralLipidInPlasma","VenousCarbonDioxidePressure","PulmonaryVenousOxygenPressure","ArterialCarbonDioxidePressure","BloodDensity","HemoglobinContent","PulmonaryVenousCarbonDioxidePressure","CarbonDioxideSaturation","Phosphate","WhiteBloodCellCount","Hematocrit","OxygenSaturation","PulmonaryArterialOxygenPressure","PlasmaVolume","ArterialOxygenPressure","BloodSpecificHeat"};
std::vector<std::string> Cardiovascular{"ArterialPressure","PulmonaryMeanShuntFlow","MeanArterialPressure","PulmonarySystolicArterialPressure","PulmonaryVascularResistance","HeartEjectionFraction","CardiacOutput","PulmonaryMeanCapillaryFlow","IntracranialPressure","PulmonaryCapillariesWedgePressure","PulmonaryDiastolicArterialPressure","HeartRhythm","MeanArterialCarbonDioxidePartialPressureDelta","CerebralPerfusionPressure","CardiacIndex","PulmonaryMeanArterialPressure","HeartStrokeVolume","MeanArterialCarbonDioxidePartialPressure","MeanCentralVenousPressure","SystemicVascularResistance","PulmonaryArterialPressure","PulmonaryVascularResistanceIndex","CerebralBloodFlow","MeanSkinFlow","DiastolicArterialPressure","PulsePressure","BloodVolume","SystolicArterialPressure","HeartRate","CentralVenousPressure"};
std::vector<std::string> Drug{"SedationLevel","BronchodilationLevel","NeuromuscularBlockLevel","PulsePressureChange","TubularPermeabilityChange","MeanBloodPressureChange","HeartRateChange","TidalVolumeChange","PupillaryResponse","RespirationRateChange"};
std::vector<std::string> Endocrine{"InsulinSynthesisRate"};
std::vector<std::string> Energy{"CreatinineProductionRate","TotalMetabolicRate","LactateProductionRate","SweatRate","ExerciseMeanArterialPressureDelta","FatigueLevel","KetoneProductionRate","AchievedExerciseLevel","SkinTemperature","TotalWorkRateLevel","CoreTemperature"};
std::vector<std::string> Gastrointestinal{"StomachContents","ChymeAbsorptionRate"};
std::vector<std::string> Nervous{"BaroreceptorHeartElastanceScale","ChemoreceptorHeartRateScale","BaroreceptorHeartRateScale","BaroreceptorResistanceScale","ChemoreceptorHeartElastanceScale","LeftEyePupillaryResponse","RightEyePupillaryResponse","BaroreceptorComplianceScale"};
std::vector<std::string> Renal{"LeftReabsorptionFiltrationCoefficient","LeftPeritubularCapillariesHydrostaticPressure","RenalBloodFlow","RightGlomerularFluidPermeability","LeftGlomerularFiltrationCoefficient","LeftGlomerularFiltrationRate","LeftGlomerularFluidPermeability","LeftTubularHydrostaticPressure","LeftFiltrationFraction","RenalPlasmaFlow","LeftAfferentArterioleResistance","LeftReabsorptionRate","RightFiltrationFraction","RightPeritubularCapillariesHydrostaticPressure","RightAfferentArterioleResistance","UrineOsmolality","GlomerularFiltrationRate","LeftNetReabsorptionPressure","RenalVascularResistance","RightTubularReabsorptionFiltrationSurfaceArea","LeftTubularOsmoticPressure","LeftBowmansCapsulesHydrostaticPressure","RightBowmansCapsulesOsmoticPressure","RightTubularHydrostaticPressure","UrineOsmolarity","LeftGlomerularCapillariesHydrostaticPressure","RightNetReabsorptionPressure","RightGlomerularFiltrationSurfaceArea","LeftTubularReabsorptionFluidPermeability","LeftBowmansCapsulesOsmoticPressure","RightNetFiltrationPressure","FiltrationFraction","RightGlomerularFiltrationCoefficient","RightTubularOsmoticPressure","RightPeritubularCapillariesOsmoticPressure","LeftPeritubularCapillariesOsmoticPressure","LeftTubularReabsorptionFiltrationSurfaceArea","UrinationRate","UrineUreaNitrogenConcentration","RightGlomerularCapillariesOsmoticPressure","RightGlomerularFiltrationRate","RightTubularReabsorptionFluidPermeability","UrineVolume","LeftNetFiltrationPressure","RightReabsorptionRate","UrineProductionRate","LeftGlomerularFiltrationSurfaceArea","RightReabsorptionFiltrationCoefficient","LeftGlomerularCapillariesOsmoticPressure","RightBowmansCapsulesHydrostaticPressure","UrineSpecificGravity","RightGlomerularCapillariesHydrostaticPressure","LeftEfferentArterioleResistance","RightEfferentArterioleResistance"};
std::vector<std::string> Respiratory{"TotalDeadSpaceVentilation","ExpiratoryFlow","EndTidalCarbonDioxideFraction","TidalVolume","EndTidalCarbonDioxidePressure","TotalPulmonaryVentilation","PulmonaryCompliance","InspiratoryFlow","TotalAlveolarVentilation","PulmonaryResistance","SpecificVentilation","RespirationDriverPressure","InspiratoryExpiratoryRatio","TotalLungVolume","AlveolarArterialGradient","RespirationRate","TranspulmonaryPressure","CarricoIndex","RespirationMusclePressure"};
std::vector<std::string> Tissue{"IntracellularFluidPH","RespiratoryExchangeRatio","ExtracellularFluidVolume","IntracellularFluidVolume","ExtravascularFluidVolume","OxygenConsumptionRate","CarbonDioxideProductionRate"};
SEDataRequest* temp;
Controls(QPulse& qp) : Pulse(qp) {}
QPulse& Pulse;
};
QDataRequestsWidget::QDataRequestsWidget(QTextEdit& log, QWidget *parent, Qt::WindowFlags flags) : QDockWidget(parent,flags)
QDataRequestViewWidget::QDataRequestViewWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QDockWidget(parent, flags)
{
m_Controls = new Controls(log);
m_Controls = new Controls(qp);
m_Controls->setupUi(this);
connect(m_Controls->new_view, SIGNAL(clicked()), SLOT(OpenModal()));
//connect(m_Controls->new_table, SIGNAL(clicked()), SLOT());
connect(m_Controls->retab, SIGNAL(clicked()), SLOT(retab()));
connect(m_Controls->NewPlotSetButton, SIGNAL(clicked()), SLOT(NewPlotSet()));
connect(m_Controls->TileButton, SIGNAL(clicked()), SLOT(Tile()));
}
QDataRequestsWidget::~QDataRequestsWidget()
QDataRequestViewWidget::~QDataRequestViewWidget()
{
Reset();
delete m_Controls;
}
void QDataRequestsWidget::Reset()
void QDataRequestViewWidget::Reset()
{
m_Controls->CurrentPlot = -1;
DELETE_VECTOR(m_Controls->Plots);
}
void QDataRequestsWidget::BuildGraphs(PhysiologyEngine& pulse)
/*
void QDataRequestViewWidget::BuildGraphs(PhysiologyEngine& pulse)
{
std::stringstream ss;
SEDataRequestManager& drMgr = pulse.GetEngineTracker()->GetDataRequestManager();
......@@ -83,7 +61,7 @@ void QDataRequestsWidget::BuildGraphs(PhysiologyEngine& pulse)
{
// Let's load up some default requests
drMgr.CreatePhysiologyDataRequest("TidalVolume", VolumeUnit::mL);
m_Controls->temp = &drMgr.CreatePhysiologyDataRequest("CardiacOutput", VolumePerTimeUnit::L_Per_min);
drMgr.CreatePhysiologyDataRequest("CardiacOutput", VolumePerTimeUnit::L_Per_min);
drMgr.CreateGasCompartmentDataRequest(pulse::PulmonaryCompartment::LeftLung, "Volume", VolumeUnit::mL);
drMgr.CreateGasCompartmentDataRequest(pulse::PulmonaryCompartment::RightLung, "Volume", VolumeUnit::mL);
}
......@@ -144,89 +122,71 @@ void QDataRequestsWidget::BuildGraphs(PhysiologyEngine& pulse)
m_Controls->Titles.push_back(dr->GetPropertyName());
}
}
*/
void QDataRequestViewWidget::NewPlotSet()
{
QPlotSetWidget* plotSet = new QPlotSetWidget(m_Controls->Pulse, this);
m_Controls->mdiArea->addSubWindow(plotSet);
m_Controls->mdiArea->tileSubWindows();
plotSet->show();
}
void QDataRequestsWidget::OpenModal(){
GraphModal* modal = new GraphModal(m_Controls->LogBox, this);
m_Controls->Modals.push_back(modal);
m_Controls->mdiArea->addSubWindow(modal);
modal->show();
m_Controls->mdiArea->tileSubWindows();
void QDataRequestViewWidget::Tile()
{
m_Controls->mdiArea->tileSubWindows();
}
void QDataRequestsWidget::AtSteadyState(PhysiologyEngine& pulse)
void QDataRequestViewWidget::AtSteadyState(PhysiologyEngine& pulse)
{
BuildGraphs(pulse);
}
void QDataRequestsWidget::AtSteadyStateUpdateUI()
void QDataRequestViewWidget::AtSteadyStateUpdateUI()
{
Reset();
for (std::string title : m_Controls->Titles)
{
QPulsePlot *p = new QPulsePlot(1000);
p->GetChart().setTitle(title.c_str());
m_Controls->Plots.push_back(p);
}
m_Controls->CurrentPlot = 0;
}
void QDataRequestsWidget::ProcessPhysiology(PhysiologyEngine& pulse)
void QDataRequestViewWidget::ProcessPhysiology(PhysiologyEngine& pulse)
{// This is called from a thread, you should NOT update UI here
// This is where we pull data from pulse, and push any actions to it
size_t i = 0;
QPulsePlot* plot = NULL;
QPulsePlot* plot = nullptr;
pulse.GetEngineTracker()->PullData();
double v;
/*double v;
for (SEDataRequest* dr : pulse.GetEngineTracker()->GetDataRequestManager().GetDataRequests())
{
std::string propertyName = dr->GetPropertyName();
/*if(m_Controls->Map.find(propertyName) != m_Controls->Map.end() && m_Controls->Map[propertyName] != NULL){
plot = m_Controls->Map[propertyName]->getPlot();
}
else{
continue;
}*/
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList()){
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList())
{
GraphModal* modal = qobject_cast<GraphModal*>(subwindow->widget());
std::map<std::string, QPulsePlot*> map = modal->getMap();
if(map.find(propertyName) != map.end() && map[propertyName] != NULL){
if (map.find(propertyName) != map.end() && map[propertyName] != nullptr)
{
plot = map[propertyName];
break;
}
}
if(plot == NULL) continue;
if (plot == nullptr)
continue;
if (dr->HasUnit())
v=pulse.GetEngineTracker()->GetScalar(*dr)->GetValue(*dr->GetUnit());
v = pulse.GetEngineTracker()->GetScalar(*dr)->GetValue(*dr->GetUnit());
else
v=pulse.GetEngineTracker()->GetScalar(*dr)->GetValue();
plot->Append(pulse.GetSimulationTime(TimeUnit::s),v);
}
}
void QDataRequestsWidget::PhysiologyUpdateUI()
{
/*for (GraphModal* modal: m_Controls->Modals){
for (QPulsePlot* plot : modal->getPlots()){
plot->UpdateUI();
}
v = pulse.GetEngineTracker()->GetScalar(*dr)->GetValue();
plot->Append(pulse.GetSimulationTime(TimeUnit::s), v);
}*/
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList()){
GraphModal* modal = qobject_cast<GraphModal*>(subwindow->widget());
for (QPulsePlot* plot : modal->getPlots()){
plot->UpdateUI();
}
}
}
void QDataRequestsWidget::loadComboBox(QComboBox* combobox, std::string items[], int size){
combobox->clear();
for (int i = 0; i < size; i++){
combobox->addItem(QString(items[i].c_str()));
}
void QDataRequestViewWidget::PhysiologyUpdateUI()
{
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList())
subwindow->widget()->update();
//{
// QPlotSetWidget* plotSet = qobject_cast<QPlotSetWidget*>(subwindow->widget());
// for (QPulsePlot* plot : plotSet->getPlots())
// {
// plot->UpdateUI();
// }
//}
}
void QDataRequestsWidget::retab(){
m_Controls->mdiArea->tileSubWindows();
m_Controls->LogBox.append("retab");
}
......@@ -8,15 +8,15 @@ See accompanying NOTICE file for details.*/
namespace Ui {
class DataRequestsWidget;
class DataRequestViewWidget;
}
class QDataRequestsWidget : public QDockWidget, public PulseListener
class QDataRequestViewWidget : public QDockWidget, public PulseListener
{
Q_OBJECT
public:
QDataRequestsWidget(QTextEdit& log, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QDataRequestsWidget();
QDataRequestViewWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QDataRequestViewWidget();
void Reset();
......@@ -24,12 +24,10 @@ public:
void AtSteadyStateUpdateUI();// Main Window will call this to update UI Components
void ProcessPhysiology(PhysiologyEngine& pulse);
void PhysiologyUpdateUI();// Main Window will call this to update UI Components
void loadComboBox(QComboBox* combobox, std::string items[],int size);
signals:
protected slots:
void OpenModal();
void BuildGraphs(PhysiologyEngine& pulse);
void retab();
void Tile();
void NewPlotSet();
private:
class Controls;
Controls* m_Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QDockWidget>
#include "QPulse.h"
namespace Ui {
class DataRequestsWidget;
}
class QDataRequestsWidget : public QDockWidget, public PulseListener
{
Q_OBJECT
public:
QDataRequestsWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QDataRequestsWidget();
void Reset();
void AtSteadyState(PhysiologyEngine& pulse);
void AtSteadyStateUpdateUI();// Main Window will call this to update UI Components
void ProcessPhysiology(PhysiologyEngine& pulse);
void PhysiologyUpdateUI();// Main Window will call this to update UI Components
signals:
protected slots:
void UpdateSelectionBoxes();
void CreateDataRequest();
void OpenModal(std::string title, std::string property);
void BuildGraphs(PhysiologyEngine& pulse);
void ViewGraph();
private:
class Controls;
Controls* m_Controls;
};
This diff is collapsed.
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QDockWidget>
#include "controls/QPulse.h"
class SEDataRequest;
namespace Ui {
class DataRequestWidget;
}
class QDataRequestWidget : public QDockWidget
{
Q_OBJECT
public:
QDataRequestWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QDataRequestWidget();
SEDataRequest* GetDataRequest();
signals:
protected slots:
void UpdateSelectionBoxes();
void ControlsToPulse();
private:
class Controls;
Controls* m_Controls;
};
#include "GraphModal.h"
#include "ui_GraphModal.h"
#include "QPulsePlot.h"
#include "cdm/engine/SEDataRequest.h"
#include "iterator"
class GraphModal::Controls : public Ui::GraphModal
{
public:
Controls(QTextEdit& log) : LogBox(log) {}
QTextEdit& LogBox;
std::map<std::string, QPulsePlot*> Map;
QPulsePlot* currPlot;
int i;
};
GraphModal::GraphModal(QTextEdit& log, QWidget *parent) :QDialog(parent),ui(new Ui::GraphModal)
{
m_Controls = new Controls(log);
m_Controls->setupUi(this);
m_Controls->currPlot = NULL;
connect(m_Controls->graph_title, SIGNAL(currentTextChanged(QString)),SLOT(switchGraphs()));
connect(m_Controls->add, SIGNAL(clicked()),SLOT(addGraph()));
connect(m_Controls->remove, SIGNAL(clicked()),SLOT(removeGraph()));
this->setWindowTitle(QString(""));
}
GraphModal::~GraphModal(){
delete m_Controls;
}
std::vector<QPulsePlot*> GraphModal::getPlots() {
std::vector<QPulsePlot*> plots;
std::map<std::string, QPulsePlot*>::iterator it = m_Controls->Map.begin();
while(it != m_Controls->Map.end()){
plots.push_back(it->second);
it++;
}
return plots;
}
std::map<std::string,QPulsePlot*> GraphModal::getMap(){return m_Controls->Map;}
bool GraphModal::addGraph(){
//Popopen DR here, and get resulting DR propertyName
//std::string property = dr->GetPropertyName();
std::string property = "CardiacOutput";
if (m_Controls->currPlot != NULL) property = "TidalVolume";
//Duplicate graph in modal
if (m_Controls->Map.find(property) != m_Controls->Map.end()) return false;
QPulsePlot* newPlot = new QPulsePlot(1000);
m_Controls->Map[property] = newPlot;
newPlot->GetChart().setTitle(property.c_str());
m_Controls->graph_title->addItem(QString(property.c_str()));
m_Controls->LogBox.append("New graph");
return true;
}
bool GraphModal::removeGraph(){
if (m_Controls->graph_title->count() < 0) return false;
std::string property = m_Controls->graph_title->currentText().toStdString();
m_Controls->DataGraphWidget->layout()->removeWidget(&m_Controls->currPlot->GetView());
m_Controls->currPlot->GetView().hide();
m_Controls->graph_title->removeItem(m_Controls->graph_title->currentIndex());
m_Controls->Map.erase(property);
return true;
}
void GraphModal::switchGraphs(){
if (m_Controls->graph_title->count() <= 0) return;
std::string property = m_Controls->graph_title->currentText().toStdString();
if (m_Controls->currPlot != NULL) {
m_Controls->DataGraphWidget->layout()->removeWidget(&m_Controls->currPlot->GetView());
m_Controls->currPlot->GetView().hide();
}
m_Controls->currPlot = m_Controls->Map[property];
std::string debug = "Switching to " + m_Controls->currPlot->GetChart().title().toStdString();
m_Controls->LogBox.append(debug.c_str());
m_Controls->DataGraphWidget->layout()->addWidget(&m_Controls->currPlot->GetView());
m_Controls->currPlot->GetView().show();
}
#ifndef GRAPHMODAL_H
#define GRAPHMODAL_H
#include <QDialog>
#include "QPulse.h"
#include "QPulsePlot.h"
#include "cdm/engine/SEDataRequest.h"
namespace Ui {
class GraphModal;
}
class GraphModal : public QDialog//, public PulseListener
{
Q_OBJECT
public:
explicit GraphModal(QTextEdit& log,QWidget *parent = nullptr);
virtual ~GraphModal();
std::vector<QPulsePlot*> getPlots();
std::map<std::string,QPulsePlot*> getMap();
private:
Ui::GraphModal *ui;
//void Reset();
signals:
protected slots:
void switchGraphs();
bool addGraph();
bool removeGraph();
private:
class Controls;
Controls* m_Controls;
};
#endif // GRAPHMODAL_H
......@@ -45,7 +45,7 @@ See accompanying NOTICE file for details.*/
#include "MainExplorerWindow.h"
#include "ExplorerIntroWidget.h"
#include "ui_MainExplorerWindow.h"
#include "DataRequestsWidget.h"
#include "DataRequestViewWidget.h"
#include "VitalsMonitorWidget.h"
#include "DynamicControlsWidget.h"
......@@ -68,7 +68,7 @@ public:
#endif
delete ExplorerIntroWidget;
delete VitalsMonitorWidget;
delete DataRequestsWidget;
delete DataRequestViewWidget;
delete DynamicControls;
}
......@@ -80,7 +80,7 @@ public:
QPointer<QThread> Thread;
QExplorerIntroWidget* ExplorerIntroWidget=nullptr;
QVitalsMonitorWidget* VitalsMonitorWidget=nullptr;
QDataRequestsWidget* DataRequestsWidget=nullptr;
QDataRequestViewWidget* DataRequestViewWidget=nullptr;
QDynamicControlsWidget* DynamicControls=nullptr;
std::stringstream Status;
double CurrentSimTime_s;
......@@ -143,9 +143,9 @@ MainExplorerWindow::MainExplorerWindow()
m_Controls->VitalsMonitorWidget = new QVitalsMonitorWidget(*m_Controls->LogBox, this);
m_Controls->TabWidget->widget(tabIdx++)->layout()->addWidget(m_Controls->VitalsMonitorWidget);
m_Controls->TabWidget->setCurrentIndex(tabIdx - 1);
m_Controls->DataRequestsWidget = new QDataRequestsWidget(*m_Controls->Pulse, this);
m_Controls->DataRequestsWidget->setTitleBarWidget(new QWidget());
m_Controls->TabWidget->widget(tabIdx++)->layout()->addWidget(m_Controls->DataRequestsWidget);
m_Controls->DataRequestViewWidget = new QDataRequestViewWidget(*m_Controls->Pulse, this);
m_Controls->DataRequestViewWidget->setTitleBarWidget(new QWidget());
m_Controls->TabWidget->widget(tabIdx++)->layout()->addWidget(m_Controls->DataRequestViewWidget);
m_Controls->StartEngine->setVisible(false);
m_Controls->RunInRealtime->setVisible(false);
......@@ -205,7 +205,7 @@ void MainExplorerWindow::ResetExplorer()
{
m_Controls->Pulse->Reset();
m_Controls->Mode = InputMode::None;
m_Controls->DataRequestsWidget->Reset();
m_Controls->DataRequestViewWidget->Reset();
m_Controls->VitalsMonitorWidget->Reset();
m_Controls->RunInRealtime->setChecked(true);
m_Controls->PlayPause->setText("Pause");
......@@ -230,7 +230,7 @@ void MainExplorerWindow::ResetEngine()
m_Controls->GeometryView->Reset();
#endif
m_Controls->DynamicControls->Reset();
m_Controls->DataRequestsWidget->Reset();
m_Controls->DataRequestViewWidget->Reset();
m_Controls->VitalsMonitorWidget->Reset();
m_Controls->RunInRealtime->setChecked(true);
m_Controls->PlayPause->setText("Pause");
......@@ -368,13 +368,13 @@ void MainExplorerWindow::AtSteadyState(PhysiologyEngine& pulse)
// This is where we pull data from pulse, and push any actions to it
m_Controls->DynamicControls->AtSteadyState(pulse);
m_Controls->VitalsMonitorWidget->AtSteadyState(pulse);
m_Controls->DataRequestsWidget->AtSteadyState(pulse);
m_Controls->DataRequestViewWidget->AtSteadyState(pulse);
}
void MainExplorerWindow::AtSteadyStateUpdateUI()
{// This is called from a slot, you can update UI here
m_Controls->DynamicControls->AtSteadyStateUpdateUI();
m_Controls->VitalsMonitorWidget->AtSteadyStateUpdateUI();
m_Controls->DataRequestsWidget->AtSteadyStateUpdateUI();
m_Controls->DataRequestViewWidget->AtSteadyStateUpdateUI();
m_Controls->PlayPause->setEnabled(true);
m_Controls->ResetEngine->setEnabled(true);
......@@ -386,7 +386,7 @@ void MainExplorerWindow::ProcessPhysiology(PhysiologyEngine& pulse)
// This is where we pull data from pulse, and push any actions to it
m_Controls->DynamicControls->ProcessPhysiology(pulse);
m_Controls->VitalsMonitorWidget->ProcessPhysiology(pulse);
m_Controls->DataRequestsWidget->ProcessPhysiology(pulse);
m_Controls->DataRequestViewWidget->ProcessPhysiology(pulse);
m_Controls->CurrentSimTime_s = pulse.GetSimulationTime(TimeUnit::s);
}
......@@ -394,7 +394,7 @@ void MainExplorerWindow::PhysiologyUpdateUI()
{// This is called from a slot, you can update UI here
m_Controls->DynamicControls->PhysiologyUpdateUI();
m_Controls->VitalsMonitorWidget->PhysiologyUpdateUI();
m_Controls->DataRequestsWidget->PhysiologyUpdateUI();