Commit 93abbb3a authored by Aaron Bray's avatar Aaron Bray
Browse files

Merge 3 branchs ['unc/enviornment', 'unc/DataRequests',...

Merge 3 branchs ['unc/enviornment', 'unc/DataRequests', 'unc/idata_request_selection'] into unc/comp_523
parents fcfa3023 720a2f2a
......@@ -87,6 +87,8 @@ set(moc_sources
controls/ScenarioEditorWidget.h
controls/PlotSetWidget.h
controls/EnviornmentWidget.h
conditions/ConditionWidget.h
conditions/ChronicAnemiaWidget.h
conditions/ChronicObstructivePulmonaryDiseaseWidget.h
......@@ -111,6 +113,7 @@ set(UI_FILES
ui/DataRequestView.ui
ui/DynamicControls.ui
ui/Enviornment.ui
ui/ConditionsEditor.ui
ui/Condition.ui
......@@ -162,6 +165,9 @@ set(CONTROLS_FILES
controls/DataRequestViewWidget.h
controls/VitalsMonitorWidget.cxx
controls/VitalsMonitorWidget.h
controls/EnviornmentWidget.cxx
controls/EnviornmentWidget.h
)
source_group("Controls" FILES ${CONTROLS_FILES})
list(APPEND SOURCE ${CONTROLS_FILES})
......@@ -371,11 +377,35 @@ set(CPACK_PACKAGE_VERSION "${EXPLORER_VERSION}")
#set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/pulse_logo.png")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/AirDensity.jpeg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/AirPressure.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Blanket.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Clothing.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Emissivity.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Fan.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Heater.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Humidity.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/RadiantTemp.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Submerged.jpeg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Temp.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Wind.jpg")
#set(CPACK_DMG_DS_STORE "${CMAKE_CURRENT_SOURCE_DIR}/packaging/DS_Store")
if(APPLE)
set(CPACK_BUNDLE_STARTUP_COMMAND PulseExplorer)
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/pulse_logo.png")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/AirDensity.jpeg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/AirPressure.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Blanket.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Clothing.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Emissivity.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Fan.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Heater.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Humidity.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/RadiantTemp.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Submerged.jpeg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Temp.jpg")
set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resource/Wind.jpg")
set(CPACK_BUNDLE_ICON pulse.icns)
set(MACOSX_BUNDLE_ICON_FILE pulse.icns)
set(MACOSX_BUNDLE_BUNDLE_VERSION "${EXPLORER_VERSION}")
......
......@@ -18,7 +18,7 @@ public:
QChronicAnemiaWidget::QChronicAnemiaWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent, flags)
{
m_Controls = new Controls();
m_Controls->ReductionFactor = new QScalarWidget("Reduction Factor", 0, 1, 0.1, false, this);
m_Controls->ReductionFactor = new QScalarWidget("Reduction Factor", 0, 1, 0.1, ScalarOptionWidget::None, this);
layout()->addWidget(m_Controls->ReductionFactor);
reset();
}
......
......@@ -19,8 +19,8 @@ public:
QChronicObstructivePulmonaryDiseaseWidget::QChronicObstructivePulmonaryDiseaseWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->BronchitisSeverity = new QScalarWidget("Bronchitis Severity", 0, 1, 0.1, false, this);
m_Controls->EmphysemaSeverity = new QScalarWidget("Emphysema Severity", 0, 1, 0.1, false, this);
m_Controls->BronchitisSeverity = new QScalarWidget("Bronchitis Severity", 0, 1, 0.1, ScalarOptionWidget::None, this);
m_Controls->EmphysemaSeverity = new QScalarWidget("Emphysema Severity", 0, 1, 0.1, ScalarOptionWidget::None, this);
layout()->addWidget(m_Controls->BronchitisSeverity);
layout()->addWidget(m_Controls->EmphysemaSeverity);
reset();
......
......@@ -22,7 +22,7 @@ public:
QChronicPericardialEffusionWidget::QChronicPericardialEffusionWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->AccumulatedVolume = new QScalarQuantityWidget<VolumeUnit>("Accumulated Volume", 0, 1000, 1, VolumeUnit::mL, false, this);
m_Controls->AccumulatedVolume = new QScalarQuantityWidget<VolumeUnit>("Accumulated Volume", 0, 1000, 1, VolumeUnit::mL, ScalarOptionWidget::None, this);
m_Controls->AccumulatedVolume->addUnit(VolumeUnit::L);
layout()->addWidget(m_Controls->AccumulatedVolume);
reset();
......
......@@ -19,8 +19,8 @@ public:
QChronicRenalStenosisWidget::QChronicRenalStenosisWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->LeftKidneySeverity = new QScalarWidget("Left Kidney Severity", 0, 1, 0.1, false, this);
m_Controls->RightKidneySeverity = new QScalarWidget("Right Kidney Severity", 0, 1, 0.1, false, this);
m_Controls->LeftKidneySeverity = new QScalarWidget("Left Kidney Severity", 0, 1, 0.1, ScalarOptionWidget::None, this);
m_Controls->RightKidneySeverity = new QScalarWidget("Right Kidney Severity", 0, 1, 0.1, ScalarOptionWidget::None, this);
layout()->addWidget(m_Controls->LeftKidneySeverity);
layout()->addWidget(m_Controls->RightKidneySeverity);
reset();
......
......@@ -21,9 +21,9 @@ public:
QImpairedAlveolarExchangeWidget::QImpairedAlveolarExchangeWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->ImpairedFraction = new QScalarWidget("Impaired Fraction", 0, 1, 0.1, false, this);
m_Controls->ImpairedFraction = new QScalarWidget("Impaired Fraction", 0, 1, 0.1, ScalarOptionWidget::None, this);
layout()->addWidget(m_Controls->ImpairedFraction);
m_Controls->ImpairedSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Impaired Surface Area", 0, 100, 1, AreaUnit::m2, false, this);
m_Controls->ImpairedSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Impaired Surface Area", 0, 100, 1, AreaUnit::m2, ScalarOptionWidget::None, this);
m_Controls->ImpairedSurfaceArea->addUnit(AreaUnit::cm2);
layout()->addWidget(m_Controls->ImpairedSurfaceArea);
reset();
......
......@@ -20,9 +20,9 @@ public:
QLobarPneumoniaWidget::QLobarPneumoniaWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this);
m_Controls->LeftLungAffected = new QScalarWidget("Left Lung Affected", 0, 1, 0.1, false, this);
m_Controls->RightLungAffected = new QScalarWidget("Right Lung Affected", 0, 1, 0.1, false, this);
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, ScalarOptionWidget::None, this);
m_Controls->LeftLungAffected = new QScalarWidget("Left Lung Affected", 0, 1, 0.1, ScalarOptionWidget::None, this);
m_Controls->RightLungAffected = new QScalarWidget("Right Lung Affected", 0, 1, 0.1, ScalarOptionWidget::None, this);
layout()->addWidget(m_Controls->Severity);
layout()->addWidget(m_Controls->LeftLungAffected);
layout()->addWidget(m_Controls->RightLungAffected);
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include <QApplication>
#include <QDockWidget>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QLayout>
#include <QMainWindow>
#include <QWidget>
#include <QPlainTextEdit>
#include <QFile>
#include <QDoubleSpinBox>
#include <QGroupBox>
#include <QScrollBar>
#include <QTimer>
#include <QThread>
#include <QPointer>
#include <QtCharts/QChart>
#include <QtCharts/QChartView>
#include <QtCharts/QLineSeries>
#include <QtCharts/QValueAxis>
#include <QCloseEvent>
#include <QMessageBox>
#include "cdm/CommonDataModel.h"
#include "cdm/utils/FileUtils.h"
#ifdef PARAVIEW
#include <pqActiveObjects.h>
#include <pqAlwaysConnectedBehavior.h>
#include <pqApplicationCore.h>
#include <pqObjectBuilder.h>
#include <pqPersistentMainWindowStateBehavior.h>
#include <pqContextView.h>
#include <pqXYChartView.h>
#include <pqRenderView.h>
#include <vtkSMProxy.h>
#include <vtkSMPropertyHelper.h>
#include <vtkSMReaderFactory.h>
#include "GeometryView.h"
#endif
#include "AddPopup.h"
#include "ui_AddPopup.h"
#include "ExplorerIntroWidget.h"
#include "ui_AddPopup.h"
#include "DataRequestsWidget.h"
#include "VitalsMonitorWidget.h"
#include "DynamicControlsWidget.h"
#include "EnviornmentWidget.h"
#include "cdm/CommonDataModel.h"
#include "PulsePhysiologyEngine.h"
#include "cdm/engine/SEDataRequestManager.h"
#include "cdm/engine/SEEngineTracker.h"
#include "cdm/properties/SEScalarTime.h"
class AddPopup::Controls : public Ui::AddPopup
{
public:
virtual ~Controls()
{
}
#ifdef PARAVIEW
QPointer<GeometryView> GeometryView;
pqRenderView* ParaViewRenderView;
#endif
QPulse* Pulse = nullptr;
QPointer<QThread> Thread;
std::stringstream Status;
double CurrentSimTime_s;
InputMode Mode = InputMode::None;
QEnviornmentWidget* envir;
};
AddPopup::AddPopup(std::string name,QWidget *parent):QDialog(parent),Ui(new Ui::AddPopup)
{
QEnviornmentWidget* envir = dynamic_cast<QEnviornmentWidget*> (parent);
m_Controls = new Controls();
m_Controls->setupUi(this);
setWindowIcon(QIcon("resource/pulse.ico"));
QFont f("Arial", 18);
m_Controls->label->setFont(f);
m_Controls->label->setText(QString::fromUtf8(name.c_str()));
if (name == "Add Gases") {
m_Controls->Substance->addItem(QString("Oxygen"));
m_Controls->Substance->addItem(QString("Nitrogen"));
m_Controls->Substance->addItem(QString("Hydrogen"));
m_Controls->Substance->addItem(QString("Argon"));
m_Controls->Substance->addItem(QString("Carbon Dioxide"));
}
else {
m_Controls->Substance->addItem(QString("Dust"));
m_Controls->Substance->addItem(QString("Forest Exudates"));
m_Controls->Substance->addItem(QString("Geyesr Steam"));
m_Controls->Substance->addItem(QString("Smoke"));
m_Controls->Substance->addItem(QString("Particulates"));
}
connect(m_Controls->Add, SIGNAL(clicked()), this, SLOT(add()));
}
AddPopup::~AddPopup()
{
delete m_Controls;
}
void AddPopup::add() {
if (m_Controls->label->text() == "Add Gases") {
emit insertG(m_Controls->Substance->currentText(), m_Controls->Amount->value());
hide();
}
else {
emit insertA(m_Controls->Substance->currentText(), m_Controls->Amount->value());
hide();
}
}
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#ifndef AddPopup_H
#define AddPopup_H
#include <qdialog.h>
#include <QMainWindow>
#include <QObject>
#include "QPulse.h"
namespace Ui {
class AddPopup;
}
class AddPopup : public QDialog
{
Q_OBJECT
public:
explicit AddPopup(std::string name,QWidget * parent = nullptr);
virtual ~AddPopup();
Ui::AddPopup *Ui;
//protected:
signals:
void insertG(QString substance, double amount);
signals:
void insertA(QString substance, double amount);
protected slots:
void add();
private:
class Controls;
Controls* m_Controls;
};
#endif // AddPopup_H
......@@ -42,12 +42,15 @@ QDataRequestViewWidget::~QDataRequestViewWidget()
void QDataRequestViewWidget::Reset()
{
QMdiSubWindow* item;
if (m_Controls->mdiArea->subWindowList().size() > 0)
{
while ((item = m_Controls->mdiArea->subWindowList().takeAt(0)) != nullptr)
{
QPlotSetWidget* plotSet = (QPlotSetWidget*)item->widget();
plotSet->Reset();
m_Controls->mdiArea->subWindowList().removeAt(0);
}
}
m_Controls->TileButton->setEnabled(false);
m_Controls->NewPlotSetButton->setEnabled(false);
}
......
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 "QPulse.h"
class SEEnvironmentalConditions;
namespace Ui {
class EnviornmentWidget;
}
class QEnviornmentWidget : public QDockWidget, public PulseListener
{
Q_OBJECT
public:
QEnviornmentWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QEnviornmentWidget();
void Reset();
//SECondition& GetInitialEnvironmentConditions();
void EnableControls(bool conditions, bool actions);
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 EnableCooling();
void EnableCoolingSurfaceArea();
void EnableCoolingSurfaceAreaFraction();
void EnableHeating();
void EnableHeatingSurfaceArea();
void EnableHeatingSurfaceAreaFraction();
void EnableAppliedTemp();
void EnableAppliedTempSurfaceArea();
void EnableAppliedSurfaceAreaFraction();
void LoadEnvironmentFile();
void LoadEnvironmentFile(const std::string& fileName);
void SaveEnvironmentFile();
void SaveEnviornmentFile(const std::string& fileName);
void ControlsToEnvironment();
void EnvironmentToControls();
private:
class Controls;
Controls* m_Controls;
};
\ No newline at end of file
......@@ -48,7 +48,7 @@ See accompanying NOTICE file for details.*/
#include "DataRequestViewWidget.h"
#include "VitalsMonitorWidget.h"
#include "DynamicControlsWidget.h"
#include "EnviornmentWidget.h"
#include "cdm/CommonDataModel.h"
#include "PulsePhysiologyEngine.h"
#include "cdm/engine/SEDataRequestManager.h"
......@@ -69,6 +69,7 @@ public:
delete ExplorerIntroWidget;
delete VitalsMonitorWidget;
delete DataRequestViewWidget;
delete EnviornmentWidget;
delete DynamicControls;
}
......@@ -81,6 +82,7 @@ public:
QExplorerIntroWidget* ExplorerIntroWidget=nullptr;
QVitalsMonitorWidget* VitalsMonitorWidget=nullptr;
QDataRequestViewWidget* DataRequestViewWidget=nullptr;
QEnviornmentWidget* EnviornmentWidget = nullptr;
QDynamicControlsWidget* DynamicControls=nullptr;
std::stringstream Status;
double CurrentSimTime_s;
......@@ -146,6 +148,9 @@ MainExplorerWindow::MainExplorerWindow()
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->EnviornmentWidget = new QEnviornmentWidget(*m_Controls->Pulse, this);
m_Controls->EnviornmentWidget->setTitleBarWidget(new QWidget());
m_Controls->TabWidget->widget(tabIdx++)->layout()->addWidget(m_Controls->EnviornmentWidget);
m_Controls->StartEngine->setVisible(false);
m_Controls->RunInRealtime->setVisible(false);
......@@ -206,6 +211,7 @@ void MainExplorerWindow::ResetExplorer()
m_Controls->Pulse->Reset();
m_Controls->Mode = InputMode::None;
m_Controls->DataRequestViewWidget->Reset();
m_Controls->EnviornmentWidget->Reset();
m_Controls->VitalsMonitorWidget->Reset();
m_Controls->RunInRealtime->setChecked(true);
m_Controls->PlayPause->setText("Pause");
......@@ -231,6 +237,7 @@ void MainExplorerWindow::ResetEngine()
#endif
m_Controls->DynamicControls->Reset();
m_Controls->DataRequestViewWidget->Reset();
m_Controls->EnviornmentWidget->Reset();
m_Controls->VitalsMonitorWidget->Reset();
m_Controls->RunInRealtime->setChecked(true);
m_Controls->PlayPause->setText("Pause");
......@@ -263,6 +270,7 @@ void MainExplorerWindow::StartShowcase()
m_Controls->RunInRealtime->setVisible(true);
m_Controls->ResetExplorer->setVisible(true);
m_Controls->ResetEngine->setVisible(true);
m_Controls->EnviornmentWidget->EnableControls(false, false);
if (!m_Controls->DynamicControls->SetupShowcase(m_Controls->ExplorerIntroWidget->GetSelectedShowcase()))
{
......@@ -290,6 +298,7 @@ void MainExplorerWindow::SetupScenarioEditor()
m_Controls->RunInRealtime->setVisible(false);
m_Controls->ResetExplorer->setVisible(true);
m_Controls->ResetEngine->setVisible(false);
m_Controls->EnviornmentWidget->EnableControls(true, false);
m_Controls->Mode = InputMode::Scenario;
}
......@@ -310,6 +319,7 @@ void MainExplorerWindow::SetupEngineState()
m_Controls->RunInRealtime->setVisible(false);
m_Controls->ResetExplorer->setVisible(true);
m_Controls->ResetEngine->setVisible(false);
m_Controls->EnviornmentWidget->EnableControls(false, false);
m_Controls->Mode = InputMode::State;
}
......@@ -329,6 +339,7 @@ void MainExplorerWindow::SetupPatientEditor()
m_Controls->RunInRealtime->setVisible(false);
m_Controls->ResetExplorer->setVisible(true);
m_Controls->ResetEngine->setVisible(false);
m_Controls->EnviornmentWidget->EnableControls(true, false);
m_Controls->DynamicControls->SetupPatientEditor();
m_Controls->Mode = InputMode::Patient;
......@@ -369,12 +380,14 @@ void MainExplorerWindow::AtSteadyState(PhysiologyEngine& pulse)
m_Controls->DynamicControls->AtSteadyState(pulse);
m_Controls->VitalsMonitorWidget->AtSteadyState(pulse);
m_Controls->DataRequestViewWidget->AtSteadyState(pulse);
m_Controls->EnviornmentWidget->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->DataRequestViewWidget->AtSteadyStateUpdateUI();
m_Controls->EnviornmentWidget->AtSteadyStateUpdateUI();
m_Controls->PlayPause->setEnabled(true);
m_Controls->ResetEngine->setEnabled(true);
......@@ -387,7 +400,7 @@ void MainExplorerWindow::ProcessPhysiology(PhysiologyEngine& pulse)
m_Controls->DynamicControls->ProcessPhysiology(pulse);
m_Controls->VitalsMonitorWidget->ProcessPhysiology(pulse);
m_Controls->DataRequestViewWidget->ProcessPhysiology(pulse);
m_Controls->EnviornmentWidget->ProcessPhysiology(pulse);
m_Controls->CurrentSimTime_s = pulse.GetSimulationTime(TimeUnit::s);
}
void MainExplorerWindow::PhysiologyUpdateUI()
......@@ -395,6 +408,7 @@ void MainExplorerWindow::PhysiologyUpdateUI()
m_Controls->DynamicControls->PhysiologyUpdateUI();
m_Controls->VitalsMonitorWidget->PhysiologyUpdateUI();
m_Controls->DataRequestViewWidget->PhysiologyUpdateUI();
m_Controls->EnviornmentWidget->PhysiologyUpdateUI();
m_Controls->Status.str("");
m_Controls->Status << "Current Simulation Time : " << m_Controls->CurrentSimTime_s << "s";
......
......@@ -124,64 +124,64 @@ QPatientEditorWidget::QPatientEditorWidget(QPulse& qp, QWidget *parent, Qt::Wind
m_Controls->Sex->setLayout(m_Controls->SexLayout);
m_Controls->Properties->layout()->addWidget(m_Controls->Sex);
m_Controls->Age = new QScalarQuantityWidget<TimeUnit>("Age", 18, 65, 1, TimeUnit::yr, true, this);
m_Controls->Age = new QScalarQuantityWidget<TimeUnit>("Age", 18, 65, 1, TimeUnit::yr, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->Age);
m_Controls->Weight = new QScalarQuantityWidget<MassUnit>("Weight", 90, 300, 1, MassUnit::lb, true, this);
m_Controls->Weight = new QScalarQuantityWidget<MassUnit>("Weight", 90, 300, 1, MassUnit::lb, ScalarOptionWidget::Check, this);
m_Controls->Weight->addUnit(MassUnit::kg);
m_Controls->Properties->layout()->addWidget(m_Controls->Weight);
m_Controls->Height = new QScalarQuantityWidget<LengthUnit>("Height", 48, 96, 0.1, LengthUnit::in, true, this);
m_Controls->Height = new QScalarQuantityWidget<LengthUnit>("Height", 48, 96, 0.1, LengthUnit::in, ScalarOptionWidget::Check, this);
m_Controls->Height->addUnit(LengthUnit::ft);
m_Controls->Height->addUnit(LengthUnit::m);
m_Controls->Properties->layout()->addWidget(m_Controls->Height);
m_Controls->BodyDensity = new QScalarQuantityWidget<MassPerVolumeUnit>("Body Density", 0, 1000, 1, MassPerVolumeUnit::kg_Per_L, true, this);
m_Controls->BodyDensity = new QScalarQuantityWidget<MassPerVolumeUnit>("Body Density", 0, 1000, 1, MassPerVolumeUnit::kg_Per_L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->BodyDensity);
m_Controls->BodyFatFraction = new QScalarWidget("Body Fat Fraction", 0, 1, 0.1, true, this);
m_Controls->BodyFatFraction = new QScalarWidget("Body Fat Fraction", 0, 1, 0.1, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->BodyFatFraction);
m_Controls->LeanBodyMass = new QScalarQuantityWidget<MassUnit>("Lean Body Mass", 0, 1000, 1, MassUnit::lb, true, this);
m_Controls->LeanBodyMass = new QScalarQuantityWidget<MassUnit>("Lean Body Mass", 0, 1000, 1, MassUnit::lb, ScalarOptionWidget::Check, this);
m_Controls->LeanBodyMass->addUnit(MassUnit::kg);
m_Controls->Properties->layout()->addWidget(m_Controls->LeanBodyMass);
m_Controls->SkinSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Skin Surface Area", 0, 4, 0.1, AreaUnit::m2, true, this);
m_Controls->SkinSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Skin Surface Area", 0, 4, 0.1, AreaUnit::m2, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->SkinSurfaceArea);
m_Controls->BasalMetabolicRate = new QScalarQuantityWidget<PowerUnit>("Basal Metabolic Rate", 0, 3000, 1, PowerUnit::kcal_Per_day, true, this);
m_Controls->BasalMetabolicRate = new QScalarQuantityWidget<PowerUnit>("Basal Metabolic Rate", 0, 3000, 1, PowerUnit::kcal_Per_day, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->BasalMetabolicRate);
m_Controls->AlveoliSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Alveoli Surface Area", 0, 100, 0.1, AreaUnit::m2, true, this);
m_Controls->AlveoliSurfaceArea = new QScalarQuantityWidget<AreaUnit>("Alveoli Surface Area", 0, 100, 0.1, AreaUnit::m2, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->AlveoliSurfaceArea);
m_Controls->RightLungRatio = new QScalarWidget("Right Lung Ratio", 0, 1, 0.1, true, this);
m_Controls->RightLungRatio = new QScalarWidget("Right Lung Ratio", 0, 1, 0.1, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->RightLungRatio);
m_Controls->RespirationRateBaseline = new QScalarQuantityWidget<FrequencyUnit>("Respiration Rate Baseline", 0, 30, 1, FrequencyUnit::Per_min, true, this);
m_Controls->RespirationRateBaseline = new QScalarQuantityWidget<FrequencyUnit>("Respiration Rate Baseline", 0, 30, 1, FrequencyUnit::Per_min, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->RespirationRateBaseline);
m_Controls->FunctionalResidualCapacity = new QScalarQuantityWidget<VolumeUnit>("Functional Residual Capacity", 0, 4, 0.1, VolumeUnit::L, true, this);
m_Controls->FunctionalResidualCapacity = new QScalarQuantityWidget<VolumeUnit>("Functional Residual Capacity", 0, 4, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->FunctionalResidualCapacity);
m_Controls->TotalLungCapacity = new QScalarQuantityWidget<VolumeUnit>("Total Lung Capacity", 0, 10, 0.1, VolumeUnit::L, true, this);
m_Controls->TotalLungCapacity = new QScalarQuantityWidget<VolumeUnit>("Total Lung Capacity", 0, 10, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->TotalLungCapacity);
m_Controls->TidalVolumeBaseline = new QScalarQuantityWidget<VolumeUnit>("Tidal Volume Baseline", 0, 1, 0.1, VolumeUnit::L, true, this);
m_Controls->TidalVolumeBaseline = new QScalarQuantityWidget<VolumeUnit>("Tidal Volume Baseline", 0, 1, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->TidalVolumeBaseline);
m_Controls->ExpiratoryReserveVolume = new QScalarQuantityWidget<VolumeUnit>("Expiratory Reserve Volume", 0, 2, 0.1, VolumeUnit::L, true, this);
m_Controls->ExpiratoryReserveVolume = new QScalarQuantityWidget<VolumeUnit>("Expiratory Reserve Volume", 0, 2, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->ExpiratoryReserveVolume);
m_Controls->InspiratoryCapacity = new QScalarQuantityWidget<VolumeUnit>("Inspiratory Capacity", 0, 8, 0.1, VolumeUnit::L, true, this);
m_Controls->InspiratoryCapacity = new QScalarQuantityWidget<VolumeUnit>("Inspiratory Capacity", 0, 8, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->InspiratoryCapacity);
m_Controls->InspiratoryReserveVolume = new QScalarQuantityWidget<VolumeUnit>("Inspiratory Reserve Volume", 0, 8, 0.1, VolumeUnit::L, true, this);
m_Controls->InspiratoryReserveVolume = new QScalarQuantityWidget<VolumeUnit>("Inspiratory Reserve Volume", 0, 8, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->InspiratoryReserveVolume);
m_Controls->VitalCapacity = new QScalarQuantityWidget<VolumeUnit>("Vital Capacity", 0, 10, 0.1, VolumeUnit::L, true, this);
m_Controls->VitalCapacity = new QScalarQuantityWidget<VolumeUnit>("Vital Capacity", 0, 10, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->VitalCapacity);
m_Controls->ResidualVolume = new QScalarQuantityWidget<VolumeUnit>("Residual Volume", 0, 3, 0.1, VolumeUnit::L, true, this);
m_Controls->ResidualVolume = new QScalarQuantityWidget<VolumeUnit>("Residual Volume", 0, 3, 0.1, VolumeUnit::L, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->ResidualVolume);
m_Controls->HeartRateBaseline = new QScalarQuantityWidget<FrequencyUnit>("Heart Rate Baseline", 0, 250, 1, FrequencyUnit::Per_min, true, this);
m_Controls->HeartRateBaseline = new QScalarQuantityWidget<FrequencyUnit>("Heart Rate Baseline", 0, 250, 1, FrequencyUnit::Per_min, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->HeartRateBaseline);
m_Controls->BloodVolumeBaseline = new QScalarQuantityWidget<VolumeUnit>("Blood Volume Baseline", 0, 8000, 1, VolumeUnit::mL, true, this);
m_Controls->BloodVolumeBaseline = new QScalarQuantityWidget<VolumeUnit>("Blood Volume Baseline", 0, 8000, 1, VolumeUnit::mL, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->BloodVolumeBaseline);
m_Controls->SystolicArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Systolic Pressure Baseline", 0, 200, 1, PressureUnit::mmHg, true, this);
m_Controls->SystolicArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Systolic Pressure Baseline", 0, 200, 1, PressureUnit::mmHg, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->SystolicArterialPressureBaseline);
m_Controls->DiastolicArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Diastolic Pressure Baseline", 0, 120, 1, PressureUnit::mmHg, true, this);
m_Controls->DiastolicArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Diastolic Pressure Baseline", 0, 120, 1, PressureUnit::mmHg, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->DiastolicArterialPressureBaseline);
m_Controls->MeanArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Mean Arterial Pressure Baseline", 0, 160, 1, PressureUnit::mmHg, true, this);
m_Controls->MeanArterialPressureBaseline = new QScalarQuantityWidget<PressureUnit>("Mean Arterial Pressure Baseline", 0, 160, 1, PressureUnit::mmHg, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->MeanArterialPressureBaseline);
m_Controls->HeartRateMaximum = new QScalarQuantityWidget<FrequencyUnit>("Heart Rate Maximum", 0, 250, 1, FrequencyUnit::Per_min, true, this);
m_Controls->HeartRateMaximum = new QScalarQuantityWidget<FrequencyUnit>("Heart Rate Maximum", 0, 250, 1, FrequencyUnit::Per_min, ScalarOptionWidget::Check, this);
m_Controls->Properties->layout()->addWidget(m_Controls->HeartRateMaximum);
m_Controls->HeartRateMinimum = new QScalarQuantityWidget<FrequencyUnit>("Heart Rate Minimum", 0, 100, 1, FrequencyUnit::Per_min, true, this);