Commit fcfa3023 authored by Aaron Bray's avatar Aaron Bray
Browse files

Data Requests are looking better, still need to add support for all types, but...

Data Requests are looking better, still need to add support for all types, but things are working well
parent 62cc90f2
......@@ -80,7 +80,7 @@ if(NOT Pulse_FOUND)
#GIT_TAG a8e9ac38f121fe9e64a1fff7860e1b19
#GIT_SHALLOW 1
URL https://gitlab.kitware.com/physiology/engine/-/archive/REL_2_1_0/engine-REL_2_1_0.zip
URL_MD5 f56c86e7ae82a41e9a22776774525898
URL_MD5 29d0e8729d45de2d72218d4bcabe33b5ee0af738
BINARY_DIR ${CMAKE_BINARY_DIR}/Pulse-build
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
......
......@@ -3,24 +3,15 @@ See accompanying NOTICE file for details.*/
#include "DataRequestViewWidget.h"
#include "ui_DataRequestView.h"
#include <QList.h>
#include <QLayout>
#include <QMdiArea.h>
#include <QMdiSubWindow>
#include "QPulsePlot.h"
#include "PlotSetWidget.h"
#include "cdm/CommonDataModel.h"
#include "PulsePhysiologyEngine.h"
#include "cdm/engine/SEEngineTracker.h"
#include "cdm/engine/SEDataRequest.h"
#include "cdm/engine/SEDataRequestManager.h"
#include "cdm/substance/SESubstanceManager.h"
#include "cdm/substance/SESubstance.h"
#include "cdm/system/equipment/electrocardiogram/SEElectroCardioGramWaveformInterpolator.h"
#include "cdm/utils/FileUtils.h"
#include "cdm/properties/SEScalarTime.h"
#include "cdm/properties/SEScalarVolume.h"
#include "cdm/properties/SEScalarVolumePerTime.h"
#include "controls/PlotSetWidget.h"
class QDataRequestViewWidget::Controls : public Ui::DataRequestViewWidget
{
......@@ -34,6 +25,10 @@ QDataRequestViewWidget::QDataRequestViewWidget(QPulse& qp, QWidget *parent, Qt::
m_Controls = new Controls(qp);
m_Controls->setupUi(this);
m_Controls->TileButton->setEnabled(false);
m_Controls->NewPlotSetButton->setEnabled(false);
qp.GetEngine().GetEngineTracker()->SetTrackMode(TrackMode::Dynamic);
connect(m_Controls->NewPlotSetButton, SIGNAL(clicked()), SLOT(NewPlotSet()));
connect(m_Controls->TileButton, SIGNAL(clicked()), SLOT(Tile()));
}
......@@ -46,90 +41,23 @@ QDataRequestViewWidget::~QDataRequestViewWidget()
void QDataRequestViewWidget::Reset()
{
}
/*
void QDataRequestViewWidget::BuildGraphs(PhysiologyEngine& pulse)
{
std::stringstream ss;
SEDataRequestManager& drMgr = pulse.GetEngineTracker()->GetDataRequestManager();
std::string title;
std::string unit;
m_Controls->Titles.clear();
if (drMgr.GetDataRequests().empty())
{
// Let's load up some default requests
drMgr.CreatePhysiologyDataRequest("TidalVolume", VolumeUnit::mL);
drMgr.CreatePhysiologyDataRequest("CardiacOutput", VolumePerTimeUnit::L_Per_min);
drMgr.CreateGasCompartmentDataRequest(pulse::PulmonaryCompartment::LeftLung, "Volume", VolumeUnit::mL);
drMgr.CreateGasCompartmentDataRequest(pulse::PulmonaryCompartment::RightLung, "Volume", VolumeUnit::mL);
}
for (SEDataRequest* dr : drMgr.GetDataRequests())
QMdiSubWindow* item;
while ((item = m_Controls->mdiArea->subWindowList().takeAt(0)) != nullptr)
{
m_Controls->Map[dr->GetPropertyName()] = NULL;
m_Controls->LogBox.append(dr->GetPropertyName().c_str());
if (dr->HasUnit())
unit = " (" + dr->GetUnit()->GetString() + ")";
else
unit = "";
switch (dr->GetCategory())
{
case eDataRequest_Category::Patient:
title = "Patient " + dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::Physiology:
title = dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::Environment:
title = dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::GasCompartment:
case eDataRequest_Category::LiquidCompartment:
if (dr->HasSubstanceName())
title = dr->GetCompartmentName() + " " + dr->GetSubstanceName() + " " + dr->GetPropertyName() + unit;
else
title = dr->GetCompartmentName() + " " + dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::ThermalCompartment:
title = dr->GetCompartmentName() + " " + dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::TissueCompartment:
title = dr->GetCompartmentName() + " " + dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::Substance:
if (dr->HasCompartmentName())
title = dr->GetSubstanceName() + " " + dr->GetCompartmentName() + " " + dr->GetPropertyName() + unit;
else
title = dr->GetSubstanceName() + " " + dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::AnesthesiaMachine:
title = dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::ECG:
title = dr->GetPropertyName() + unit;
break;
case eDataRequest_Category::Inhaler:
title = dr->GetPropertyName() + unit;
break;
}
if (!pulse.GetEngineTracker()->TrackRequest(*dr))
{// Could not hook this up, get rid of it
ss << "Unable to find data for " << title;
m_Controls->LogBox.append(ss.str().c_str());
continue;
}
m_Controls->Titles.push_back(dr->GetPropertyName());
QPlotSetWidget* plotSet = (QPlotSetWidget*)item->widget();
plotSet->Reset();
m_Controls->mdiArea->subWindowList().removeAt(0);
}
m_Controls->TileButton->setEnabled(false);
m_Controls->NewPlotSetButton->setEnabled(false);
}
*/
void QDataRequestViewWidget::NewPlotSet()
{
QPlotSetWidget* plotSet = new QPlotSetWidget(m_Controls->Pulse, this);
m_Controls->mdiArea->addSubWindow(plotSet);
m_Controls->mdiArea->tileSubWindows();
plotSet->show();
plotSet->setTitleBarWidget(new QWidget());
m_Controls->mdiArea->addSubWindow(plotSet)->showMaximized();
}
void QDataRequestViewWidget::Tile()
......@@ -139,54 +67,29 @@ void QDataRequestViewWidget::Tile()
void QDataRequestViewWidget::AtSteadyState(PhysiologyEngine& pulse)
{
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList())
((QPlotSetWidget*)subwindow->widget())->AtSteadyState(pulse);
}
void QDataRequestViewWidget::AtSteadyStateUpdateUI()
{
m_Controls->TileButton->setEnabled(true);
m_Controls->NewPlotSetButton->setEnabled(true);
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList())
((QPlotSetWidget*)subwindow->widget())->AtSteadyStateUpdateUI();
}
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 = nullptr;
pulse.GetEngineTracker()->PullData();
/*double v;
for (SEDataRequest* dr : pulse.GetEngineTracker()->GetDataRequestManager().GetDataRequests())
{
std::string propertyName = dr->GetPropertyName();
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] != nullptr)
{
plot = map[propertyName];
break;
}
}
if (plot == nullptr)
continue;
if (dr->HasUnit())
v = pulse.GetEngineTracker()->GetScalar(*dr)->GetValue(*dr->GetUnit());
else
v = pulse.GetEngineTracker()->GetScalar(*dr)->GetValue();
plot->Append(pulse.GetSimulationTime(TimeUnit::s), v);
}*/
pulse.GetEngineTracker()->TrackData();
for (QMdiSubWindow* subwindow : m_Controls->mdiArea->subWindowList())
((QPlotSetWidget*)subwindow->widget())->ProcessPhysiology(pulse);
}
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();
// }
//}
((QPlotSetWidget*)subwindow->widget())->PhysiologyUpdateUI();
}
......@@ -5,6 +5,7 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QDockWidget>
#include "QPulse.h"
#include <set>
namespace Ui {
......@@ -24,10 +25,12 @@ 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
signals:
protected slots:
void Tile();
void NewPlotSet();
private:
class Controls;
Controls* m_Controls;
......
......@@ -4,9 +4,11 @@ See accompanying NOTICE file for details.*/
#include "ui_DataRequest.h"
#include <QLayout>
#include <set>
#include "cdm/CommonDataModel.h"
#include "PulsePhysiologyEngine.h"
#include "cdm/engine/SEEngineTracker.h"
#include "cdm/engine/SEDataRequest.h"
#include "cdm/engine/SEDataRequestManager.h"
#include "cdm/substance/SESubstance.h"
......@@ -19,7 +21,8 @@ See accompanying NOTICE file for details.*/
class QDataRequestWidget::Controls : public Ui::DataRequestWidget
{
public:
Controls() { }
Controls(QPulse& qp) : Pulse(qp) { }
QPulse& Pulse;
QComboBox* SystemsBox;
QComboBox* BloodChemistryBox;
......@@ -56,32 +59,77 @@ public:
QComboBox* EnvironmentBox;
//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"};
std::set<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::set<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::set<std::string> Drug{"SedationLevel","BronchodilationLevel","NeuromuscularBlockLevel","PulsePressureChange","TubularPermeabilityChange","MeanBloodPressureChange","HeartRateChange","TidalVolumeChange","PupillaryResponse","RespirationRateChange"};
std::set<std::string> Endocrine{"InsulinSynthesisRate"};
std::set<std::string> Energy{"CreatinineProductionRate","TotalMetabolicRate","LactateProductionRate","SweatRate","ExerciseMeanArterialPressureDelta","FatigueLevel","KetoneProductionRate","AchievedExerciseLevel","SkinTemperature","TotalWorkRateLevel","CoreTemperature"};
std::set<std::string> Gastrointestinal{"StomachContents","ChymeAbsorptionRate"};
std::set<std::string> Nervous{"BaroreceptorHeartElastanceScale","ChemoreceptorHeartRateScale","BaroreceptorHeartRateScale","BaroreceptorResistanceScale","ChemoreceptorHeartElastanceScale","LeftEyePupillaryResponse","RightEyePupillaryResponse","BaroreceptorComplianceScale"};
std::set<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::set<std::string> Respiratory{"TotalDeadSpaceVentilation","ExpiratoryFlow","EndTidalCarbonDioxideFraction","TidalVolume","EndTidalCarbonDioxidePressure","TotalPulmonaryVentilation","PulmonaryCompliance","InspiratoryFlow","TotalAlveolarVentilation","PulmonaryResistance","SpecificVentilation","RespirationDriverPressure","InspiratoryExpiratoryRatio","TotalLungVolume","AlveolarArterialGradient","RespirationRate","TranspulmonaryPressure","CarricoIndex","RespirationMusclePressure"};
std::set<std::string> Tissue{"IntracellularFluidPH","RespiratoryExchangeRatio","ExtracellularFluidVolume","IntracellularFluidVolume","ExtravascularFluidVolume","OxygenConsumptionRate","CarbonDioxideProductionRate"};
};
void Format(std::set<std::string>& set)
{
std::vector<QString> qStrings;
for (std::string s : set)
qStrings.push_back(QString::fromStdString(s.c_str()));
set.clear();
std::stringstream ss;
for (QString s : qStrings)
{
ss.str("");
QStringList slist = s.split(QRegExp("(?=[A-Z])"), QString::SkipEmptyParts);
for (auto itr=slist.begin(); itr!=slist.end(); ++itr)
{
ss << (*itr).toStdString();
if (itr + 1 != slist.end() && ( (*itr).length() > 1 || (*(itr + 1)).length() > 1 ))
ss << " ";
}
set.insert(ss.str());
}
}
std::string RemoveSpacing(QString str)
{
str = str.simplified();
str.replace(" ", "");
return str.toStdString();
}
QDataRequestWidget::QDataRequestWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QDockWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls = new Controls(qp);
m_Controls->setupUi(this);
QFont font;
font.setPointSize(11);
Format(m_Controls->BloodChemistry);
Format(m_Controls->Cardiovascular);
Format(m_Controls->Drug);
Format(m_Controls->Endocrine);
Format(m_Controls->Energy);
Format(m_Controls->Gastrointestinal);
Format(m_Controls->Nervous);
Format(m_Controls->Renal);
Format(m_Controls->Respiratory);
Format(m_Controls->Tissue);
m_Controls->CategoryBox->addItem("Physiology");
m_Controls->CategoryBox->addItem("Anatomy");
m_Controls->CategoryBox->addItem("Substance");
m_Controls->CategoryBox->addItem("Anatomy Substance");
m_Controls->CategoryBox->addItem("Environment");
//m_Controls->CategoryBox->setMaximumWidth(275);
m_Controls->CategoryBox->setFont(font);
connect(m_Controls->CategoryBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->SystemsBox = new QComboBox(this);
m_Controls->SystemsBox->addItem("BloodChemistry");
m_Controls->SystemsBox->addItem("Blood Chemistry");
m_Controls->SystemsBox->addItem("Cardiovascular");
m_Controls->SystemsBox->addItem("Drug");
m_Controls->SystemsBox->addItem("Endocrine");
......@@ -91,56 +139,67 @@ QDataRequestWidget::QDataRequestWidget(QPulse& qp, QWidget *parent, Qt::WindowFl
m_Controls->SystemsBox->addItem("Renal");
m_Controls->SystemsBox->addItem("Respiratory");
m_Controls->SystemsBox->addItem("Tissue");
m_Controls->SystemsBox->setFont(font);
connect(m_Controls->SystemsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->BloodChemistryBox = new QComboBox(this);
for(std::string& s : m_Controls->BloodChemistry)
for(std::string s : m_Controls->BloodChemistry)
m_Controls->BloodChemistryBox->addItem(s.c_str());
m_Controls->BloodChemistryBox->setFont(font);
connect(m_Controls->BloodChemistryBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->CardiovascularBox = new QComboBox(this);
for (std::string& s : m_Controls->Cardiovascular)
for (std::string s : m_Controls->Cardiovascular)
m_Controls->CardiovascularBox->addItem(s.c_str());
m_Controls->CardiovascularBox->setFont(font);
connect(m_Controls->CardiovascularBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->DrugBox = new QComboBox(this);
for (std::string& s : m_Controls->Drug)
for (std::string s : m_Controls->Drug)
m_Controls->DrugBox->addItem(s.c_str());
m_Controls->DrugBox->setFont(font);
connect(m_Controls->DrugBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->EndocrineBox = new QComboBox(this);
for (std::string& s : m_Controls->Endocrine)
for (std::string s : m_Controls->Endocrine)
m_Controls->EndocrineBox->addItem(s.c_str());
m_Controls->EndocrineBox->setFont(font);
connect(m_Controls->EndocrineBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->EnergyBox = new QComboBox(this);
for (std::string& s : m_Controls->Energy)
for (std::string s : m_Controls->Energy)
m_Controls->EnergyBox->addItem(s.c_str());
m_Controls->EnergyBox->setFont(font);
connect(m_Controls->EnergyBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->GastrointestinalBox = new QComboBox(this);
for (std::string& s : m_Controls->Gastrointestinal)
for (std::string s : m_Controls->Gastrointestinal)
m_Controls->GastrointestinalBox->addItem(s.c_str());
m_Controls->GastrointestinalBox->setFont(font);
connect(m_Controls->GastrointestinalBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->NervousBox = new QComboBox(this);
for (std::string& s : m_Controls->Nervous)
for (std::string s : m_Controls->Nervous)
m_Controls->NervousBox->addItem(s.c_str());
m_Controls->NervousBox->setFont(font);
connect(m_Controls->NervousBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->RenalBox = new QComboBox(this);
for (std::string& s : m_Controls->Renal)
for (std::string s : m_Controls->Renal)
m_Controls->RenalBox->addItem(s.c_str());
m_Controls->RenalBox->setFont(font);
connect(m_Controls->RenalBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->RespiratoryBox = new QComboBox(this);
for (std::string& s : m_Controls->Respiratory)
for (std::string s : m_Controls->Respiratory)
m_Controls->RespiratoryBox->addItem(s.c_str());
m_Controls->RespiratoryBox->setFont(font);
connect(m_Controls->RespiratoryBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->TissueBox = new QComboBox(this);
for (std::string& s : m_Controls->Tissue)
for (std::string s : m_Controls->Tissue)
m_Controls->TissueBox->addItem(s.c_str());
m_Controls->TissueBox->setFont(font);
connect(m_Controls->TissueBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->CompartmentTypesBox = new QComboBox(this);
......@@ -152,6 +211,7 @@ QDataRequestWidget::QDataRequestWidget(QPulse& qp, QWidget *parent, Qt::WindowFl
m_Controls->CompartmentTypesBox->addItem("Tissue");
m_Controls->CompartmentTypesBox->addItem("Urine");
m_Controls->CompartmentTypesBox->addItem("Vascular");
m_Controls->CompartmentTypesBox->setFont(font);
connect(m_Controls->CompartmentTypesBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->CompartmentSubstanceTypesBox = new QComboBox(this);
......@@ -161,108 +221,124 @@ QDataRequestWidget::QDataRequestWidget(QPulse& qp, QWidget *parent, Qt::WindowFl
m_Controls->CompartmentSubstanceTypesBox->addItem("Pulmonary");
m_Controls->CompartmentSubstanceTypesBox->addItem("Urine");
m_Controls->CompartmentSubstanceTypesBox->addItem("Vascular");
m_Controls->CompartmentSubstanceTypesBox->setFont(font);
connect(m_Controls->CompartmentSubstanceTypesBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->ChymeCmptBox = new QComboBox(this);
for (std::string s : pulse::ChymeCompartment::GetValues())
m_Controls->ChymeCmptBox->addItem(s.c_str());
m_Controls->ChymeCmptBox->setFont(font);
connect(m_Controls->ChymeCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->PulmonaryCmptBox = new QComboBox(this);
for (std::string s : pulse::PulmonaryCompartment::GetValues())
m_Controls->PulmonaryCmptBox->addItem(s.c_str());
m_Controls->PulmonaryCmptBox->setFont(font);
connect(m_Controls->PulmonaryCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->TemperatureCmptBox = new QComboBox(this);
for (std::string s : pulse::TemperatureCompartment::GetValues())
m_Controls->TemperatureCmptBox->addItem(s.c_str());
m_Controls->TemperatureCmptBox->setFont(font);
connect(m_Controls->TemperatureCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->TissueCmptBox = new QComboBox(this);
for (std::string s : pulse::TissueCompartment::GetValues())
m_Controls->TissueCmptBox->addItem(s.c_str());
m_Controls->TissueCmptBox->setFont(font);
connect(m_Controls->TissueCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->UrineCmptBox = new QComboBox(this);
for (std::string s : pulse::UrineCompartment::GetValues())
m_Controls->UrineCmptBox->addItem(s.c_str());
m_Controls->UrineCmptBox->setFont(font);
connect(m_Controls->UrineCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->VascularCmptBox = new QComboBox(this);
for (std::string s : pulse::VascularCompartment::GetValues())
m_Controls->VascularCmptBox->addItem(s.c_str());
m_Controls->VascularCmptBox->setFont(font);
connect(m_Controls->VascularCmptBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->LiquidCmptPropsBox = new QComboBox(this);
m_Controls->LiquidCmptPropsBox->addItem("InFlow");
m_Controls->LiquidCmptPropsBox->addItem("OutFlow");
m_Controls->LiquidCmptPropsBox->addItem("In Flow");
m_Controls->LiquidCmptPropsBox->addItem("Out Flow");
m_Controls->LiquidCmptPropsBox->addItem("Pressure");
m_Controls->LiquidCmptPropsBox->addItem("Volume");
m_Controls->LiquidCmptPropsBox->addItem("WaterVolumeFraction");
m_Controls->LiquidCmptPropsBox->addItem("pH");
m_Controls->LiquidCmptPropsBox->addItem("Water Volume Fraction");
m_Controls->LiquidCmptPropsBox->addItem("PH");
m_Controls->LiquidCmptPropsBox->setFont(font);
connect(m_Controls->LiquidCmptPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->LiquidCmptQtyPropsBox = new QComboBox(this);
m_Controls->LiquidCmptQtyPropsBox->addItem("Concentration");
m_Controls->LiquidCmptQtyPropsBox->addItem("Mass");
m_Controls->LiquidCmptQtyPropsBox->addItem("MassCleared");
m_Controls->LiquidCmptQtyPropsBox->addItem("MassDeposited");
m_Controls->LiquidCmptQtyPropsBox->addItem("MassExcreted");
m_Controls->LiquidCmptQtyPropsBox->addItem("Mass Cleared");
m_Controls->LiquidCmptQtyPropsBox->addItem("Mass Deposited");
m_Controls->LiquidCmptQtyPropsBox->addItem("Mass Excreted");
m_Controls->LiquidCmptQtyPropsBox->addItem("Molarity");
m_Controls->LiquidCmptQtyPropsBox->addItem("PartialPressure");
m_Controls->LiquidCmptQtyPropsBox->addItem("Partial Pressure");
m_Controls->LiquidCmptQtyPropsBox->addItem("Saturation");
m_Controls->LiquidCmptQtyPropsBox->setFont(font);
connect(m_Controls->LiquidCmptQtyPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->GasCmptPropsBox = new QComboBox(this);
m_Controls->GasCmptPropsBox->addItem("InFlow");
m_Controls->GasCmptPropsBox->addItem("OutFlow");
m_Controls->GasCmptPropsBox->addItem("In Flow");
m_Controls->GasCmptPropsBox->addItem("Out Flow");
m_Controls->GasCmptPropsBox->addItem("Pressure");
m_Controls->GasCmptPropsBox->addItem("Volume");
m_Controls->GasCmptPropsBox->setFont(font);
connect(m_Controls->GasCmptPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->GasCmptQtyPropsBox = new QComboBox(this);
m_Controls->GasCmptQtyPropsBox->addItem("PartialPressure");
m_Controls->GasCmptQtyPropsBox->addItem("Partial Pressure");
m_Controls->GasCmptQtyPropsBox->addItem("Volume");
m_Controls->GasCmptQtyPropsBox->addItem("VolumeFraction");
m_Controls->GasCmptQtyPropsBox->addItem("Volume Fraction");
m_Controls->GasCmptQtyPropsBox->setFont(font);
connect(m_Controls->GasCmptQtyPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->ThermalCmptPropsBox = new QComboBox(this);
m_Controls->ThermalCmptPropsBox->addItem("HeatTransferRateIn");
m_Controls->ThermalCmptPropsBox->addItem("HeatTransferRateOut");
m_Controls->ThermalCmptPropsBox->addItem("Heat Transfer Rate In");
m_Controls->ThermalCmptPropsBox->addItem("Heat Transfer Rate Out");
m_Controls->ThermalCmptPropsBox->addItem("Heat");
m_Controls->ThermalCmptPropsBox->addItem("Temperature");
m_Controls->ThermalCmptPropsBox->setFont(font);
connect(m_Controls->ThermalCmptPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->TissueCmptPropsBox = new QComboBox(this);
m_Controls->TissueCmptPropsBox->addItem("PhysiAcidicPhospohlipidConcentrationology");
m_Controls->TissueCmptPropsBox->addItem("MatrixVolume");
m_Controls->TissueCmptPropsBox->addItem("NeutralLipidsVolumeFraction");
m_Controls->TissueCmptPropsBox->addItem("NeutralPhospholipidsVolumeFraction");
m_Controls->TissueCmptPropsBox->addItem("TissueToPlasmaAlbuminRatio");
m_Controls->TissueCmptPropsBox->addItem("TissueToPlasmaAlphaAcidGlycoproteinRatio");
m_Controls->TissueCmptPropsBox->addItem("TissueToPlasmaLipoproteinRatio");
m_Controls->TissueCmptPropsBox->addItem("TotalMass");
m_Controls->TissueCmptPropsBox->addItem("Acidic Phospohlipid Concentration");
m_Controls->TissueCmptPropsBox->addItem("Matrix Volume");
m_Controls->TissueCmptPropsBox->addItem("Neutral Lipids Volume Fraction");
m_Controls->TissueCmptPropsBox->addItem("Neutral Phospholipids Volume Fraction");
m_Controls->TissueCmptPropsBox->addItem("Tissue To Plasma Albumin Ratio");
m_Controls->TissueCmptPropsBox->addItem("Tissue To Plasma Alpha Acid Glycoprotein Ratio");
m_Controls->TissueCmptPropsBox->addItem("Tissue To Plasma Lipoprotein Ratio");
m_Controls->TissueCmptPropsBox->addItem("Total Mass");
m_Controls->TissueCmptPropsBox->setFont(font);
connect(m_Controls->TissueCmptPropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->SubstanceBox = new QComboBox(this);
for (SESubstance* s : qp.GetEngine().GetSubstanceManager().GetSubstances())
m_Controls->SubstanceBox->addItem(s->GetName().c_str());
m_Controls->SubstanceBox->setFont(font);
connect(m_Controls->SubstanceBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->SubstancePropsBox = new QComboBox(this);
m_Controls->SubstancePropsBox->addItem("PlasmaConcentration");
m_Controls->SubstancePropsBox->addItem("Plasma Concentration");
// TODO Figure out all the values we want to expose for this
m_Controls->SubstancePropsBox->setFont(font);
connect(m_Controls->SubstancePropsBox, SIGNAL(currentIndexChanged(int)), SLOT(UpdateSelectionBoxes()));
m_Controls->EnvironmentBox = new QComboBox(this);
m_Controls->EnvironmentBox->addItem("ConvectiveHeatLoss");
m_Controls->EnvironmentBox->addItem("ConvectiveHeatTranferCoefficient");
m_Controls->EnvironmentBox->addItem("EvaporativeHeatLoss");
m_Controls->EnvironmentBox->addItem("EvaporativeHeatTranferCoefficient");
m_Controls->EnvironmentBox->addItem("RadiativeHeatLoss");
m_Controls->EnvironmentBox->addItem("RadiativeHeatTranferCoefficient");
m_Controls->EnvironmentBox->addItem("RespirationHeatLoss");
m_Controls->EnvironmentBox->addItem("SkinHeatLoss");
m_Controls->EnvironmentBox->addItem("Convective Heat Loss");
m_Controls->EnvironmentBox->addItem("Convective Heat Tranfer Coefficient");
m_Controls->EnvironmentBox->addItem("Evaporative Heat Loss");