Commit 6eb2de02 authored by Aaron Bray's avatar Aaron Bray

Created generic scalar widgets and moved the pateint and conditions to use them

parent 12a2c941
......@@ -70,6 +70,7 @@ set(moc_sources
controls/ExplorerIntroWidget.h
controls/QPulse.h
controls/CollapsableWidget.h
controls/ScalarWidget.h
controls/VitalsMonitorWidget.h
controls/DataRequestsWidget.h
controls/DynamicControlsWidget.h
......@@ -77,6 +78,7 @@ set(moc_sources
controls/ConditionsEditorWidget.h
controls/ScenarioEditorWidget.h
conditions/ConditionWidget.h
conditions/ChronicAnemiaWidget.h
conditions/ChronicObstructivePulmonaryDiseaseWidget.h
conditions/ChronicPericardialEffusionWidget.h
......@@ -101,13 +103,7 @@ set(UI_FILES
ui/ConditionsEditor.ui
ui/ChronicAnemia.ui
ui/ChronicObstructivePulmonaryDisease.ui
ui/ChronicPericardialEffusion.ui
ui/ChronicRenalStenosis.ui
ui/ChronicVentricularSystolicDysfunction.ui
ui/ImpairedAlveolarExchange.ui
ui/LobarPneumonia.ui
ui/Condition.ui
ui/ScenarioEditor.ui
......@@ -131,6 +127,10 @@ set(CONTROLS_FILES
controls/QPulse.h
controls/QPulsePlot.cxx
controls/QPulsePlot.h
controls/ScalarWidget.cxx
controls/ScalarWidget.h
controls/ScalarQuantityWidget.inl
controls/ScalarQuantityWidget.h
controls/CollapsableWidget.h
controls/CollapsableWidget.cxx
controls/DynamicControlsWidget.cxx
......@@ -171,6 +171,8 @@ source_group("Showcase" FILES ${SHOWCASE_FILES})
list(APPEND SOURCE ${SHOWCASE_FILES})
set(CONDITIONS_FILES
conditions/ConditionWidget.h
conditions/ConditionWidget.cxx
conditions/ChronicAnemiaWidget.cxx
conditions/ChronicAnemiaWidget.h
conditions/ChronicObstructivePulmonaryDiseaseWidget.cxx
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ChronicAnemiaWidget.h"
#include "ui_ChronicAnemia.h"
#include <QMessageBox>
#include "controls/ScalarWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/conditions/SEChronicAnemia.h"
#include "cdm/properties/SEScalar0To1.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QChronicAnemiaWidget::Controls : public Ui::ChronicAnemiaWidget
class QChronicAnemiaWidget::Controls
{
public:
Controls() {}
SEChronicAnemia Condition;
QScalarWidget* ReductionFactor;
};
QChronicAnemiaWidget::QChronicAnemiaWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QChronicAnemiaWidget::QChronicAnemiaWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent, flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
m_Controls->ReductionFactor = new QScalarWidget("Reduction Factor", 0, 1, 0.1, false, this);
layout()->addWidget(m_Controls->ReductionFactor);
reset();
}
QChronicAnemiaWidget::~QChronicAnemiaWidget()
......@@ -24,13 +31,32 @@ QChronicAnemiaWidget::~QChronicAnemiaWidget()
delete m_Controls;
}
void QChronicAnemiaWidget::reset()
{
m_Controls->Condition.Clear();
m_Controls->ReductionFactor->reset();
enableProperties(false);
}
void QChronicAnemiaWidget::UpdateUI()
void QChronicAnemiaWidget::enableProperties(bool b)
{
m_Controls->ReductionFactor->enableInput(b);
}
void QChronicAnemiaWidget::enableConverter(bool b)
{
}
const SECondition& QChronicAnemiaWidget::getCondition()
{
m_Controls->Condition.Clear();
m_Controls->ReductionFactor->getValue(m_Controls->Condition.GetReductionFactor());
return m_Controls->Condition;
}
void QChronicAnemiaWidget::Reset()
void QChronicAnemiaWidget::setCondition(const SECondition& c)
{
CDM_COPY(SEChronicAnemia, (SEChronicAnemia*)(&c), &m_Controls->Condition);
m_Controls->ReductionFactor->setValue(m_Controls->Condition.GetReductionFactor());
QConditionWidget::enableCondition(c.IsActive());
}
......@@ -4,24 +4,20 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QWidget>
#include "conditions/ConditionWidget.h"
namespace Ui {
class ChronicAnemiaWidget;
}
class QChronicAnemiaWidget : public QWidget
class QChronicAnemiaWidget : public QConditionWidget
{
Q_OBJECT
public:
QChronicAnemiaWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QChronicAnemiaWidget();
void Reset();
protected:
protected slots:
void UpdateUI();
virtual void reset();
virtual void enableProperties(bool b);
virtual void enableConverter(bool b);
virtual const SECondition& getCondition();
virtual void setCondition(const SECondition& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ChronicObstructivePulmonaryDiseaseWidget.h"
#include "ui_ChronicObstructivePulmonaryDisease.h"
#include <QMessageBox>
#include "controls/ScalarWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/conditions/SEChronicObstructivePulmonaryDisease.h"
#include "cdm/properties/SEScalar0To1.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QChronicObstructivePulmonaryDiseaseWidget::Controls : public Ui::ChronicObstructivePulmonaryDiseaseWidget
class QChronicObstructivePulmonaryDiseaseWidget::Controls
{
public:
Controls() {}
SEChronicObstructivePulmonaryDisease Condition;
QScalarWidget* BronchitisSeverity;
QScalarWidget* EmphysemaSeverity;
};
QChronicObstructivePulmonaryDiseaseWidget::QChronicObstructivePulmonaryDiseaseWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QChronicObstructivePulmonaryDiseaseWidget::QChronicObstructivePulmonaryDiseaseWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
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);
layout()->addWidget(m_Controls->BronchitisSeverity);
layout()->addWidget(m_Controls->EmphysemaSeverity);
reset();
}
QChronicObstructivePulmonaryDiseaseWidget::~QChronicObstructivePulmonaryDiseaseWidget()
......@@ -24,13 +34,36 @@ QChronicObstructivePulmonaryDiseaseWidget::~QChronicObstructivePulmonaryDiseaseW
delete m_Controls;
}
void QChronicObstructivePulmonaryDiseaseWidget::reset()
{
m_Controls->Condition.Clear();
m_Controls->BronchitisSeverity->reset();
m_Controls->EmphysemaSeverity->reset();
enableProperties(false);
}
void QChronicObstructivePulmonaryDiseaseWidget::UpdateUI()
void QChronicObstructivePulmonaryDiseaseWidget::enableProperties(bool b)
{
m_Controls->BronchitisSeverity->enableInput(b);
m_Controls->EmphysemaSeverity->enableInput(b);
}
void QChronicObstructivePulmonaryDiseaseWidget::enableConverter(bool b)
{
}
const SECondition& QChronicObstructivePulmonaryDiseaseWidget::getCondition()
{
m_Controls->Condition.Clear();
m_Controls->BronchitisSeverity->getValue(m_Controls->Condition.GetBronchitisSeverity());
m_Controls->EmphysemaSeverity->getValue(m_Controls->Condition.GetEmphysemaSeverity());
return m_Controls->Condition;
}
void QChronicObstructivePulmonaryDiseaseWidget::Reset()
void QChronicObstructivePulmonaryDiseaseWidget::setCondition(const SECondition& c)
{
CDM_COPY(SEChronicObstructivePulmonaryDisease, (SEChronicObstructivePulmonaryDisease*)(&c), &m_Controls->Condition);
m_Controls->BronchitisSeverity->setValue(m_Controls->Condition.GetBronchitisSeverity());
m_Controls->EmphysemaSeverity->setValue(m_Controls->Condition.GetEmphysemaSeverity());
QConditionWidget::enableCondition(c.IsActive());
}
......@@ -4,27 +4,22 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QWidget>
#include "conditions/ConditionWidget.h"
namespace Ui {
class ChronicObstructivePulmonaryDiseaseWidget;
}
class QChronicObstructivePulmonaryDiseaseWidget : public QWidget
class QChronicObstructivePulmonaryDiseaseWidget : public QConditionWidget
{
Q_OBJECT
public:
QChronicObstructivePulmonaryDiseaseWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QChronicObstructivePulmonaryDiseaseWidget();
void Reset();
protected:
protected slots:
void UpdateUI();
virtual void reset();
virtual void enableProperties(bool b);
virtual void enableConverter(bool b);
virtual const SECondition& getCondition();
virtual void setCondition(const SECondition& c);
private:
class Controls;
Controls* m_Controls;
};
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ChronicPericardialEffusionWidget.h"
#include "ui_ChronicPericardialEffusion.h"
#include <QMessageBox>
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/properties/SEScalar0To1.h"
#include "cdm/patient/conditions/SEChronicPericardialEffusion.h"
#include "cdm/properties/SEScalarVolume.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QChronicPericardialEffusionWidget::Controls : public Ui::ChronicPericardialEffusionWidget
class QChronicPericardialEffusionWidget::Controls
{
public:
Controls() {}
~Controls()
{
//delete AccumulatedVolume;
}
QScalarQuantityWidget<VolumeUnit>* AccumulatedVolume;
SEChronicPericardialEffusion Condition;
};
QChronicPericardialEffusionWidget::QChronicPericardialEffusionWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QChronicPericardialEffusionWidget::QChronicPericardialEffusionWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
m_Controls->AccumulatedVolume = new QScalarQuantityWidget<VolumeUnit>("Accumulated Volume", 0, 1000, 1, VolumeUnit::mL, false, this);
m_Controls->AccumulatedVolume->addUnit(VolumeUnit::L);
layout()->addWidget(m_Controls->AccumulatedVolume);
reset();
}
QChronicPericardialEffusionWidget::~QChronicPericardialEffusionWidget()
......@@ -25,12 +38,34 @@ QChronicPericardialEffusionWidget::~QChronicPericardialEffusionWidget()
}
void QChronicPericardialEffusionWidget::UpdateUI()
void QChronicPericardialEffusionWidget::reset()
{
m_Controls->Condition.Clear();
m_Controls->AccumulatedVolume->reset();
enableProperties(false);
}
void QChronicPericardialEffusionWidget::enableProperties(bool b)
{
m_Controls->AccumulatedVolume->enableInput(b);
m_Controls->AccumulatedVolume->enableConverter(!b);
}
void QChronicPericardialEffusionWidget::enableConverter(bool b)
{
m_Controls->AccumulatedVolume->enableConverter(b);
}
const SECondition& QChronicPericardialEffusionWidget::getCondition()
{
m_Controls->Condition.Clear();
m_Controls->AccumulatedVolume->getValue(m_Controls->Condition.GetAccumulatedVolume());
return m_Controls->Condition;
}
void QChronicPericardialEffusionWidget::Reset()
void QChronicPericardialEffusionWidget::setCondition(const SECondition& c)
{
CDM_COPY(SEChronicPericardialEffusion, (SEChronicPericardialEffusion*)(&c), &m_Controls->Condition);
m_Controls->AccumulatedVolume->setValue(m_Controls->Condition.GetAccumulatedVolume());
QConditionWidget::enableCondition(c.IsActive());
}
......@@ -4,24 +4,20 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QWidget>
#include "conditions/ConditionWidget.h"
namespace Ui {
class ChronicPericardialEffusionWidget;
}
class QChronicPericardialEffusionWidget : public QWidget
class QChronicPericardialEffusionWidget : public QConditionWidget
{
Q_OBJECT
public:
QChronicPericardialEffusionWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QChronicPericardialEffusionWidget();
void Reset();
protected:
protected slots:
void UpdateUI();
virtual void reset();
virtual void enableProperties(bool b);
virtual void enableConverter(bool b);
virtual const SECondition& getCondition();
virtual void setCondition(const SECondition& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ChronicRenalStenosisWidget.h"
#include "ui_ChronicRenalStenosis.h"
#include <QMessageBox>
#include "controls/ScalarWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/conditions/SEChronicRenalStenosis.h"
#include "cdm/properties/SEScalar0To1.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QChronicRenalStenosisWidget::Controls : public Ui::ChronicRenalStenosisWidget
class QChronicRenalStenosisWidget::Controls
{
public:
Controls() {}
SEChronicRenalStenosis Condition;
QScalarWidget* LeftKidneySeverity;
QScalarWidget* RightKidneySeverity;
};
QChronicRenalStenosisWidget::QChronicRenalStenosisWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QChronicRenalStenosisWidget::QChronicRenalStenosisWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
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);
layout()->addWidget(m_Controls->LeftKidneySeverity);
layout()->addWidget(m_Controls->RightKidneySeverity);
reset();
}
QChronicRenalStenosisWidget::~QChronicRenalStenosisWidget()
......@@ -24,13 +34,36 @@ QChronicRenalStenosisWidget::~QChronicRenalStenosisWidget()
delete m_Controls;
}
void QChronicRenalStenosisWidget::reset()
{
m_Controls->Condition.Clear();
m_Controls->LeftKidneySeverity->reset();
m_Controls->RightKidneySeverity->reset();
enableProperties(false);
}
void QChronicRenalStenosisWidget::UpdateUI()
void QChronicRenalStenosisWidget::enableProperties(bool b)
{
m_Controls->LeftKidneySeverity->enableInput(b);
m_Controls->RightKidneySeverity->enableInput(b);
}
void QChronicRenalStenosisWidget::enableConverter(bool b)
{
}
const SECondition& QChronicRenalStenosisWidget::getCondition()
{
m_Controls->Condition.Clear();
m_Controls->LeftKidneySeverity->getValue(m_Controls->Condition.GetLeftKidneySeverity());
m_Controls->RightKidneySeverity->getValue(m_Controls->Condition.GetRightKidneySeverity());
return m_Controls->Condition;
}
void QChronicRenalStenosisWidget::Reset()
void QChronicRenalStenosisWidget::setCondition(const SECondition& c)
{
CDM_COPY(SEChronicRenalStenosis, (SEChronicRenalStenosis*)(&c), &m_Controls->Condition);
m_Controls->LeftKidneySeverity->setValue(m_Controls->Condition.GetLeftKidneySeverity());
m_Controls->RightKidneySeverity->setValue(m_Controls->Condition.GetRightKidneySeverity());
QConditionWidget::enableCondition(c.IsActive());
}
......@@ -4,24 +4,20 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QWidget>
#include "conditions/ConditionWidget.h"
namespace Ui {
class ChronicRenalStenosisWidget;
}
class QChronicRenalStenosisWidget : public QWidget
class QChronicRenalStenosisWidget : public QConditionWidget
{
Q_OBJECT
public:
QChronicRenalStenosisWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QChronicRenalStenosisWidget();
void Reset();
protected:
protected slots:
void UpdateUI();
virtual void reset();
virtual void enableProperties(bool b);
virtual void enableConverter(bool b);
virtual const SECondition& getCondition();
virtual void setCondition(const SECondition& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ChronicVentricularSystolicDysfunctionWidget.h"
#include "ui_ChronicVentricularSystolicDysfunction.h"
#include <QMessageBox>
#include "cdm/CommonDataModel.h"
#include "cdm/properties/SEScalar0To1.h"
#include "cdm/patient/conditions/SEChronicVentricularSystolicDysfunction.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QChronicVentricularSystolicDysfunctionWidget::Controls : public Ui::ChronicVentricularSystolicDysfunctionWidget
class QChronicVentricularSystolicDysfunctionWidget::Controls
{
public:
Controls() {}
SEChronicVentricularSystolicDysfunction Condition;
};
QChronicVentricularSystolicDysfunctionWidget::QChronicVentricularSystolicDysfunctionWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QChronicVentricularSystolicDysfunctionWidget::QChronicVentricularSystolicDysfunctionWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
reset();
}
QChronicVentricularSystolicDysfunctionWidget::~QChronicVentricularSystolicDysfunctionWidget()
......@@ -24,13 +27,27 @@ QChronicVentricularSystolicDysfunctionWidget::~QChronicVentricularSystolicDysfun
delete m_Controls;
}
void QChronicVentricularSystolicDysfunctionWidget::reset()
{
m_Controls->Condition.Clear();
enableProperties(false);
}
void QChronicVentricularSystolicDysfunctionWidget::UpdateUI()
void QChronicVentricularSystolicDysfunctionWidget::enableProperties(bool b)
{
}
void QChronicVentricularSystolicDysfunctionWidget::enableConverter(bool b)
{
}
const SECondition& QChronicVentricularSystolicDysfunctionWidget::getCondition()
{
m_Controls->Condition.Clear();
return m_Controls->Condition;
}
void QChronicVentricularSystolicDysfunctionWidget::Reset()
void QChronicVentricularSystolicDysfunctionWidget::setCondition(const SECondition& c)
{
QConditionWidget::enableCondition(c.IsActive());
}
......@@ -4,24 +4,20 @@ See accompanying NOTICE file for details.*/
#include <QObject>
#include <QWidget>
#include "conditions/ConditionWidget.h"
namespace Ui {
class ChronicVentricularSystolicDysfunctionWidget;
}
class QChronicVentricularSystolicDysfunctionWidget : public QWidget
class QChronicVentricularSystolicDysfunctionWidget : public QConditionWidget
{
Q_OBJECT
public:
QChronicVentricularSystolicDysfunctionWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QChronicVentricularSystolicDysfunctionWidget();
void Reset();
protected:
protected slots:
void UpdateUI();
virtual void reset();
virtual void enableProperties(bool b);
virtual void enableConverter(bool b);
virtual const SECondition& getCondition();
virtual void setCondition(const SECondition& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ConditionWidget.h"
#include "ui_Condition.h"
#include <QMessageBox>
#include "controls/ScalarWidget.h"
class QConditionWidget::Controls : public Ui::ConditionWidget
{
public:
Controls() {}
};
QConditionWidget::QConditionWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
connect(m_Controls->Enabled, SIGNAL(toggled(bool)), this, SLOT(enableConditionInput(bool)));
}
QConditionWidget::~QConditionWidget()
{
delete m_Controls;
}
bool QConditionWidget::isSelected()
{
return m_Controls->Enabled->isChecked();
}
void QConditionWidget::setEnabled(bool b)
{
QWidget::setEnabled(b);
m_Controls->Enabled->setEnabled(b);
enableProperties(b?m_Controls->Enabled->isChecked():false);
}
void QConditionWidget::enableCondition(bool b)
{
m_Controls->Enabled->setChecked(b);
}
void QConditionWidget::enableConditionInput(bool b)
{
enableProperties(b);
}
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QWidget>
class SECondition;
namespace Ui {
class ConditionWidget;
}
class QConditionWidget : public QWidget
{
Q_OBJECT
public:
QConditionWidget(QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QConditionWidget();
virtual void reset()=0;
virtual bool isSelected();
virtual void setEnabled(bool b);// Turn on/off check box
virtual void enableCondition(bool b);// Sets Check to on/off
virtual void enableConverter(bool b) = 0;
virtual const SECondition& getCondition()=0;
virtual void setCondition(const SECondition& c)=0;
protected slots:
virtual void enableConditionInput(bool b);// Tells condition properties to be all on/off
virtual void enableProperties(bool b) = 0;// Turn on/off properties
private:
class Controls;
Controls* m_Controls;
};
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ImpairedAlveolarExchangeWidget.h"
#include "ui_ImpairedAlveolarExchange.h"
#include <QMessageBox>
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/conditions/SEImpairedAlveolarExchange.h"
#include "cdm/properties/SEScalar0To1.h"
#include "cdm/properties/SEScalarArea.h"
PROTO_PUSH
#include "bind/cdm/PatientConditions.pb.h"
PROTO_POP
class QImpairedAlveolarExchangeWidget::Controls : public Ui::ImpairedAlveolarExchangeWidget
class QImpairedAlveolarExchangeWidget::Controls
{
public:
Controls() {}
SEImpairedAlveolarExchange Condition;
QScalarWidget* ImpairedFraction;
QScalarQuantityWidget<AreaUnit>* ImpairedSurfaceArea;
};
QImpairedAlveolarExchangeWidget::QImpairedAlveolarExchangeWidget(QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
QImpairedAlveolarExchangeWidget::QImpairedAlveolarExchangeWidget(QWidget *parent, Qt::WindowFlags flags) : QConditionWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
m_Controls->ImpairedFraction = new QScalarWidget("Impaired Fraction", 0, 1, 0.1, false, 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->addUnit(AreaUnit::cm2);
layout()->addWidget(m_Controls->ImpairedSurfaceArea);
reset();
}