Commit 7a159ea5 authored by Aaron Bray's avatar Aaron Bray

Fix build issues

parent 743dda0b
......@@ -77,8 +77,9 @@ set(moc_sources
controls/DynamicControlsWidget.h
controls/PatientEditorWidget.h
controls/ConditionsEditorWidget.h
controls/ScenarioEditorWidget.h
controls/ActionsEditorWidget.h
controls/ScenarioEditorWidget.h
conditions/ConditionWidget.h
conditions/ChronicAnemiaWidget.h
conditions/ChronicObstructivePulmonaryDiseaseWidget.h
......@@ -88,6 +89,25 @@ set(moc_sources
conditions/ImpairedAlveolarExchangeWidget.h
conditions/LobarPneumoniaWidget.h
actions/ActionWidget.h
actions/AcuteStressWidget.h
actions/AirwayObstructionWidget.h
actions/ApneaWidget.h
actions/AsthmaAttackWidget.h
actions/BronchoconstrictionWidget.h
actions/CardiacArrestWidget.h
actions/ChestCompressionForceScaleWidget.h
actions/ChestOcclusiveDressingWidget.h
actions/ExerciseWidget.h
actions/HemorrhageWidget.h
actions/IntubationWidget.h
actions/NeedleDecompressionWidget.h
actions/PericardialEffusionWidget.h
actions/SubstanceBolusWidget.h
actions/SubstanceCompoundInfusionWidget.h
actions/SubstanceInfusionWidget.h
actions/TensionPneumothoraxWidget.h
showcases/AnaphylaxisShowcaseWidget.h
showcases/MultiTraumaShowcaseWidget.h
)
......@@ -101,13 +121,12 @@ set(UI_FILES
ui/VitalsMonitor.ui
ui/DataRequests.ui
ui/DynamicControls.ui
ui/ActionsEditor.ui
ui/ConditionsEditor.ui
ui/Condition.ui
ui/ActionsEditor.ui
ui/Actions.ui
ui/Action.ui
ui/ScenarioEditor.ui
......@@ -151,8 +170,6 @@ set(CONTROLS_FILES
controls/DataRequestsWidget.h
controls/VitalsMonitorWidget.cxx
controls/VitalsMonitorWidget.h
controls/ActionsEditorWidget.cxx
controls/ActionsEditorWidget.h
)
source_group("Controls" FILES ${CONTROLS_FILES})
list(APPEND SOURCE ${CONTROLS_FILES})
......
......@@ -15,8 +15,6 @@ QActionWidget::QActionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
connect(m_Controls->Enabled, SIGNAL(toggled(bool)), this, SLOT(enableActionInput(bool)));
}
QActionWidget::~QActionWidget()
......@@ -26,22 +24,6 @@ QActionWidget::~QActionWidget()
void QActionWidget::reset()
{
m_Controls->Enabled->setChecked(false);
setEnabled(true);
}
bool QActionWidget::isSelected()
{
return m_Controls->Enabled->isChecked();
}
void QActionWidget::enableAction(bool b)
{
m_Controls->Enabled->setChecked(b);
}
void QActionWidget::enableActionInput(bool b)
{
enableProperties(b);
}
......@@ -20,14 +20,8 @@ public:
virtual ~QActionWidget();
virtual void reset();
virtual bool isSelected();
virtual void enableAction(bool b);// Sets Check to on/off
virtual const SEAction& getAction()=0;
virtual void setAction(const SEAction& c)=0;
protected slots:
virtual void enableActionInput(bool b);// Tells condition properties to be all on/off
private:
class Controls;
......
......@@ -16,7 +16,7 @@ public:
QScalarWidget* Severity;
};
QAcuteStressWidget::QAcuteStressWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QAcuteStressWidget::QAcuteStressWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this); //check this
......@@ -47,5 +47,4 @@ void QAcuteStressWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEAcuteStress&)(c));
m_Controls->Severity->setValue(m_Controls->Action.GetSeverity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
QScalarWidget* Severity;
};
QAirwayObstructionWidget::QAirwayObstructionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QAirwayObstructionWidget::QAirwayObstructionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this);
......@@ -47,5 +47,4 @@ void QAirwayObstructionWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEAirwayObstruction&)(c));
m_Controls->Severity->setValue(m_Controls->Action.GetSeverity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
QScalarWidget* Severity;
};
QApneaWidget::QApneaWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QApneaWidget::QApneaWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this);
......@@ -47,5 +47,4 @@ void QApneaWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEApnea&)(c));
m_Controls->Severity->setValue(m_Controls->Action.GetSeverity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
QScalarWidget* Severity;
};
QAsthmaAttackWidget::QAsthmaAttackWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QAsthmaAttackWidget::QAsthmaAttackWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this);
......@@ -47,5 +47,4 @@ void QAsthmaAttackWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEAsthmaAttack&)(c));
m_Controls->Severity->setValue(m_Controls->Action.GetSeverity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
QScalarWidget* Severity;
};
QBronchoconstrictionWidget::QBronchoconstrictionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QBronchoconstrictionWidget::QBronchoconstrictionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Severity = new QScalarWidget("Severity", 0, 1, 0.1, false, this);
......@@ -47,5 +47,4 @@ void QBronchoconstrictionWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEBronchoconstriction&)(c));
m_Controls->Severity->setValue(m_Controls->Action.GetSeverity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -22,7 +22,7 @@ public:
};
QCardiacArrestWidget::QCardiacArrestWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QCardiacArrestWidget::QCardiacArrestWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
......@@ -61,20 +61,15 @@ void QCardiacArrestWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
m_Controls->State->reset();
}
const SEAction& QCardiacArrestWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->State->getValue(m_Controls->Action.GetState());
return m_Controls->Action;
}
void QCardiacArrestWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SECardiacArrest&)(c));
m_Controls->State->setValue(m_Controls->Action.GetState());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -18,13 +18,12 @@ public:
QScalarQuantityWidget<TimeUnit>* ForcePeriod;
};
QChestCompressionForceScaleWidget::QChestCompressionForceScaleWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QChestCompressionForceScaleWidget::QChestCompressionForceScaleWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->ForceScale = new QScalarWidget("ForceScale", 0, 1, 0.1, false, this);
m_Controls->ForcePeriod = new QScalarQuantityWidget<TimeUnit>("ForcePeriod", 0, 10, .25, TimeUnit::s)
m_Controls->ForcePeriod = new QScalarQuantityWidget<TimeUnit>("ForcePeriod", 0, 10, .25, TimeUnit::s);
layout()->addWidget(m_Controls->ForceScale);
reset();
}
......@@ -51,7 +50,7 @@ const SEAction& QChestCompressionForceScaleWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->ForceScale->getValue(m_Controls->Action.GetForceScale());
m_Controls->ForcePeriod->getValue(m_Contros->Action.GetForcePeriod())
m_Controls->ForcePeriod->getValue(m_Controls->Action.GetForcePeriod());
return m_Controls->Action;
}
......@@ -60,5 +59,4 @@ void QChestCompressionForceScaleWidget::setAction(const SEAction& c)
m_Controls->Action.Copy((SEChestCompressionForceScale&)(c));
m_Controls->ForceScale->setValue(m_Controls->Action.GetForceScale());
m_Controls->ForcePeriod->setValue(m_Controls->Action.GetForcePeriod());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -27,7 +27,7 @@ public:
QHBoxLayout* StateLayout;
};
QChestOcclusiveDressingWidget::QChestOcclusiveDressingWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QChestOcclusiveDressingWidget::QChestOcclusiveDressingWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
......@@ -55,7 +55,7 @@ QChestOcclusiveDressingWidget::QChestOcclusiveDressingWidget(QPulse& qp, QWidget
m_Controls->StateLayout = new QHBoxLayout();
m_Controls->StateLayout->setSpacing(6);
m_Controls->StateLayout->setContentsMargins(-1, 3, -1, 3);
QSizePolicy SsizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
SsizePolicy.setHorizontalStretch(0);
SsizePolicy.setVerticalStretch(0);
m_Controls->StateLabel = new QLabel("State", this);
......@@ -88,16 +88,12 @@ void QChestOcclusiveDressingWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
m_Controls->Side->reset();
m_Controls->State->reset();
}
const SEAction& QChestOcclusiveDressingWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->Side->getValue(m_Controls->Action.GetSide());
m_Controls->State->getValue(m_Controls->Action.GetState());
return m_Controls->Action;
}
......@@ -105,8 +101,4 @@ const SEAction& QChestOcclusiveDressingWidget::getAction()
void QChestOcclusiveDressingWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEChestOcclusiveDressing&)(c));
m_Controls->Side->setValue(m_Controls->Action.GetSide());
m_Controls->State->setValue(m_Controls->Action.GetState());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
......@@ -16,7 +16,7 @@ public:
};
QExerciseWidget::QExerciseWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QExerciseWidget::QExerciseWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Intensity = new QScalarWidget("Intensity", 0, 1, 0.1, false, this); //check this
......@@ -49,6 +49,4 @@ void QExerciseWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEExercise&)(c));
m_Controls->Intensity->setValue(m_Controls->Action.GetIntensity());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "actions/HemorrhageWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/actions/SEHemorrhage.h"
......@@ -28,7 +28,7 @@ public:
QHBoxLayout* TypeLayout;
};
QHemorrhageWidget::QHemorrhageWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QHemorrhageWidget::QHemorrhageWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Rate = new QScalarQuantityWidget<VolumePerTimeUnit>("Rate", 0, 1000, 1, VolumePerTimeUnit::mL_Per_s, false, this);
......@@ -36,7 +36,7 @@ QHemorrhageWidget::QHemorrhageWidget(QPulse& qp, QWidget *parent, Qt::WindowFlag
m_Controls->Rate->addUnit(VolumePerTimeUnit::L_Per_s);
m_Controls->Rate->addUnit(VolumePerTimeUnit::L_Per_min);
m_Controls->CompartmentLayout = new QHBoxLayout();
/*m_Controls->CompartmentLayout = new QHBoxLayout();
m_Controls->CompartmentLayout->setSpacing(6);
m_Controls->CompartmentLayout->setContentsMargins(-1, 3, -1, 3);
QSizePolicy NsizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
......@@ -81,7 +81,7 @@ QHemorrhageWidget::QHemorrhageWidget(QPulse& qp, QWidget *parent, Qt::WindowFlag
layout()->addWidget(m_Controls->Side);
layout()->addWidget(m_Controls->Type);
reset();
reset();*/
}
QHemorrhageWidget::~QHemorrhageWidget()
......@@ -92,11 +92,11 @@ QHemorrhageWidget::~QHemorrhageWidget()
void QHemorrhageWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
m_Controls->Rate->reset(); // check this
m_Controls->CompartmentValue->setText("");
m_Controls->CompartmentValue->setEnabled(true);
m_Controls->Type->reset();
//m_Controls->Action.Clear();
//m_Controls->Rate->reset(); // check this
//m_Controls->CompartmentValue->setText("");
//m_Controls->CompartmentValue->setEnabled(true);
//m_Controls->Type->reset();
}
void QHemorrhageWidget::enableConverter(bool b)
......@@ -106,19 +106,17 @@ void QHemorrhageWidget::enableConverter(bool b)
const SEAction& QHemorrhageWidget::getAction()
{
m_Controls->Action.Clear();
/* m_Controls->Action.Clear();
m_Controls->Rate->getValue(m_Controls->Action.GetRate());
m_Controls->Compartment->getValue(m_Controls->Action.GetCompartment());
m_Controls->Type->getValue(m_Controls->Action.GetType());
m_Controls->Type->getValue(m_Controls->Action.GetType());*/
return m_Controls->Action;
}
void QHemorrhageWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEHemorrhage&)(c));
/* m_Controls->Action.Copy((SEHemorrhage&)(c));
m_Controls->Rate->setValue(m_Controls->Action.GetRate());
m_Controls->Compartment->setValue(m_Controls->Action.GetCompartment());
m_Controls->Type->setValue(m_Controls->Action.GetType());
QActionWidget::enableAction(c.IsActive());
m_Controls->Type->setValue(m_Controls->Action.GetType());*/
}
\ No newline at end of file
......@@ -19,7 +19,7 @@ public:
QHBoxLayout* TypeLayout;
};
QIntubationWidget::QIntubationWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QIntubationWidget::QIntubationWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
......@@ -61,20 +61,17 @@ void QIntubationWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
m_Controls->Type->reset();
}
const SEAction& QIntubationWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->Type->getValue(m_Controls->Action.GetType());
// m_Controls->Type->getValue(m_Controls->Action.GetType());
return m_Controls->Action;
}
void QIntubationWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEIntubation&)(c));
m_Controls->Type->setValue(m_Controls->Action.GetType());
QActionWidget::enableAction(c.IsActive());
// m_Controls->Type->setValue(m_Controls->Action.GetType());
}
\ No newline at end of file
......@@ -20,7 +20,7 @@ public:
};
QNeedleDecompressionWidget::QNeedleDecompressionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QNeedleDecompressionWidget::QNeedleDecompressionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
......@@ -59,20 +59,19 @@ void QNeedleDecompressionWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
m_Controls->Side->reset();
//m_Controls->Side->reset();
}
const SEAction& QNeedleDecompressionWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->Side->getValue(m_Controls->Action.GetSide());
//m_Controls->Side->getValue(m_Controls->Action.GetSide());
return m_Controls->Action;
}
void QNeedleDecompressionWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SENeedleDecompression&)(c));
m_Controls->Side->setValue(m_Controls->Action.GetSide());
QActionWidget::enableAction(c.IsActive());
//m_Controls->Side->setValue(m_Controls->Action.GetSide());
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "actions/PericardialEffusionWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/actions/SEPericardialEffusion.h"
......@@ -16,7 +16,7 @@ public:
};
QPericardialEffusionWidget::QPericardialEffusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QPericardialEffusionWidget::QPericardialEffusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->EffusionRate = new QScalarQuantityWidget<VolumePerTimeUnit>("Effusion Rate", 0, 1000, 1, VolumePerTimeUnit::mL_Per_s, false, this);
......@@ -24,8 +24,6 @@ QPericardialEffusionWidget::QPericardialEffusionWidget(QPulse& qp, QWidget *pare
m_Controls->EffusionRate->addUnit(VolumePerTimeUnit::L_Per_s);
m_Controls->EffusionRate->addUnit(VolumePerTimeUnit::L_Per_min);
layout()->addWidget(m_Controls->Severity);
reset();
}
......@@ -43,7 +41,7 @@ void QPericardialEffusionWidget::reset()
void QPericardialEffusionWidget::enableConverter(bool b)
{
m_Controls->Rate->enableConverter(b);
//m_Controls->Rate->enableConverter(b);
}
const SEAction& QPericardialEffusionWidget::getAction()
......@@ -57,6 +55,4 @@ void QPericardialEffusionWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SEPericardialEffusion&)(c));
m_Controls->EffusionRate->setValue(m_Controls->Action.GetEffusionRate());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "actions/SubstanceBolusWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/actions/SESubstanceBolus.h"
......@@ -12,7 +12,7 @@ class QSubstanceBolusWidget::Controls // based off of chronic anemia widget
{
public:
Controls() {}
SESubstanceBolus Action;
//SESubstanceBolus Action;
QScalarQuantityWidget<VolumeUnit>* Dose;
QScalarQuantityWidget<MassPerVolumeUnit>* Concentration;
......@@ -23,7 +23,7 @@ public:
QHBoxLayout* AdministrationRouteLayout;
};
QSubstanceBolusWidget::QSubstanceBolusWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QSubstanceBolusWidget::QSubstanceBolusWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Dose = new QScalarQuantityWidget<VolumeUnit>("Dose", 0, 1000, 1, VolumeUnit::mL, false, this);
......@@ -77,32 +77,29 @@ QSubstanceBolusWidget::~QSubstanceBolusWidget()
void QSubstanceBolusWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
//m_Controls->Action.Clear();
m_Controls->Dose->reset(); // check this
m_Controls->AdministrationRoute->reset();
m_Controls->Concentration->reset();
}
void QSubstanceBolusWidget::enableConverter(bool b)
{
m_Controls->Concentration->enableConverter(b);
}
//void QSubstanceBolusWidget::enableConverter(bool b)
//{
// m_Controls->Concentration->enableConverter(b);
//}
const SEAction& QSubstanceBolusWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->Dose->getValue(m_Controls->Action.GetDose());
m_Controls->AdministrationRoute->getValue(m_Controls->Action.GetAdminRoute());
m_Controls->Concentration->getValue(m_Controls->Action.GetConcentration());
return m_Controls->Action;
}
//const SEAction& QSubstanceBolusWidget::getAction()
//{
// //m_Controls->Action.Clear();
// m_Controls->Dose->getValue(m_Controls->Action.GetDose());
// //m_Controls->AdministrationRoute->getValue(m_Controls->Action.GetAdminRoute());
// m_Controls->Concentration->getValue(m_Controls->Action.GetConcentration());
// return m_Controls->Action;
//}
void QSubstanceBolusWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SESubstanceBolus&)(c));
m_Controls->Dose->setValue(m_Controls->Action.GetDose());
m_Controls->AdministrationRoute->setValue(m_Controls->Action.GetAdminRoute());
m_Controls->Concentration->setValue(m_Controls->Action.GetConcentration());
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
//void QSubstanceBolusWidget::setAction(const SEAction& c)
//{
// m_Controls->Action.Copy((SESubstanceBolus&)(c));
// m_Controls->Dose->setValue(m_Controls->Action.GetDose());
// //m_Controls->AdministrationRoute->setValue(m_Controls->Action.GetAdminRoute());
// m_Controls->Concentration->setValue(m_Controls->Action.GetConcentration());
//}
\ No newline at end of file
......@@ -14,9 +14,9 @@ public:
virtual ~QSubstanceBolusWidget();
virtual void reset();
virtual void enableConverter(bool b);
virtual const SEAction& getAction();
virtual void setAction(const SEAction& c);
//virtual void enableConverter(bool b);
//virtual const SEAction& getAction();
//virtual void setAction(const SEAction& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "actions/SubstanceCompoundInfusionWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/actions/SESubstanceCompoundInfusion.h"
......@@ -12,13 +12,13 @@ class QSubstanceCompoundInfusionWidget::Controls
{
public:
Controls() {}
SESubstanceCompoundInfusion Action;
//SESubstanceCompoundInfusion Action;
QScalarQuantityWidget<VolumeUnit>* BagVolume;
QScalarQuantityWidget<VolumePerTimeUnit>* Rate;
};
QSubstanceCompoundInfusionWidget::QSubstanceCompoundInfusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QSubstanceCompoundInfusionWidget::QSubstanceCompoundInfusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->BagVolume = new QScalarQuantityWidget<VolumeUnit>("Bag Volume", 0, 1000, 1, VolumeUnit::mL, false, this); //check this
......@@ -27,9 +27,8 @@ QSubstanceCompoundInfusionWidget::QSubstanceCompoundInfusionWidget(QPulse& qp, Q
m_Controls->Rate = new QScalarQuantityWidget<VolumePerTimeUnit>("Rate", 0, 1000, 1, VolumePerTimeUnit::mL_Per_s, false, this);
m_Controls->Rate->addUnit(VolumePerTimeUnit::L_Per_min);
m_Controls->Rate->addUnit(VolumePerTimeUnit::mL_Per_min);
m_Controls->Rate->addUnit(VolumePerTimeUnit::L_Per_s;
m_Controls->Rate->addUnit(VolumePerTimeUnit::L_Per_s);
layout()->addWidget(m_Controls->Severity);
reset();
}
......@@ -42,30 +41,28 @@ QSubstanceCompoundInfusionWidget::~QSubstanceCompoundInfusionWidget()
void QSubstanceCompoundInfusionWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
//m_Controls->Action.Clear();
m_Controls->BagVolume->reset();
m_Controls->Rate->reset();
}
void QSubstanceCompoundInfusionWidget::enableConverter(bool b)
{
m_Controls->BagVolume->enableConverter(b);
m_Controls->Rate->enableConverter(b);
}
const SEAction& QSubstanceCompoundInfusionWidget::getAction()
{
m_Controls->Action.Clear();
m_Controls->BagVolume->getValue(m_Controls->Action.GetBagVolume());
m_Controls->Rate->getValue(m_Controls->Action.GetRate());
return m_Controls->Action;
}
//void QSubstanceCompoundInfusionWidget::enableConverter(bool b)
//{
// m_Controls->BagVolume->enableConverter(b);
// m_Controls->Rate->enableConverter(b);
//}
void QSubstanceCompoundInfusionWidget::setAction(const SEAction& c)
{
m_Controls->Action.Copy((SESubstanceCompoundInfusion&)(c));
m_Controls->BagVolume->setValue(m_Controls->Action.GetBagVolume());
m_Controls->BagVolume->setValue(m_Controls->Action.GetRate());
//const SEAction& QSubstanceCompoundInfusionWidget::getAction()
//{
// m_Controls->Action.Clear();
// m_Controls->BagVolume->getValue(m_Controls->Action.GetBagVolume());
// m_Controls->Rate->getValue(m_Controls->Action.GetRate());
// return m_Controls->Action;
//}
QActionWidget::enableAction(c.IsActive());
}
\ No newline at end of file
//void QSubstanceCompoundInfusionWidget::setAction(const SEAction& c)
//{
// m_Controls->Action.Copy((SESubstanceCompoundInfusion&)(c));
// m_Controls->BagVolume->setValue(m_Controls->Action.GetBagVolume());
// m_Controls->Rate->setValue(m_Controls->Action.GetRate());
//}
\ No newline at end of file
......@@ -14,9 +14,9 @@ public:
virtual ~QSubstanceCompoundInfusionWidget();
virtual void reset();
virtual void enableConverter(bool b);
virtual const SEAction& getAction();
virtual void setAction(const SEAction& c);
//virtual void enableConverter(bool b);
//virtual const SEAction& getAction();
//virtual void setAction(const SEAction& c);
private:
class Controls;
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "actions/SubstanceInfusionWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "cdm/patient/actions/SESubstanceInfusion.h"
#include "cdm/properties/SEScalarVolumePerTime.h"
#include "cdm/properties/SEScalarMassPerVolume.h"
class QSubstanceInfusionWidget::Controls // based off of chronic anemia widget
class QSubstanceInfusionWidget::Controls
{
public:
Controls() {}
SESubstanceInfusion Action;
//SESubstanceInfusion Action;
QScalarQuantityWidget<VolumePerTimeUnit>* Rate;
QScalarQuantityWidget<MassPerVolumeUnit>* Concentration;
};
QSubstanceInfusionWidget::QSubstanceInfusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(parent, flags)
QSubstanceInfusionWidget::QSubstanceInfusionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QActionWidget(qp, parent, flags)
{
m_Controls = new Controls();
m_Controls->Rate = new QScalarQuantityWidget<VolumePerTimeUnit>("Rate", 0, 100, 1, VolumePerTime:mL_Per_s, false, this); //check this
m_Controls->Rate = new QScalarQuantityWidget<VolumePerTimeUnit>("Rate", 0, 100, 1, VolumePerTimeUnit::mL_Per_s, false, this); //check this
m_Controls->Concentration = new QScalarQuantityWidget<MassPerVolumeUnit>("Concentration", 0, 1000, 1, MassPerVolumeUnit::mg_Per_mL, false, this);
m_Controls->Concentration->addUnit(MassPerVolumeUnit::mg_Per_L);
m_Controls->Concentration->addUnit(MassPerVolumeUnit::g_Per_mL);
......@@ -41,29 +41,22 @@ QSubstanceInfusionWidget::~QSubstanceInfusionWidget()
void QSubstanceInfusionWidget::reset()
{
QActionWidget::reset();
m_Controls->Action.Clear();
// m_Controls->Action.Clear();
m_Controls->Rate->reset(); // check this
m_Controls->Concentration->reset();
}
void QSubstanceInfusionWidget::enableConverter(bool b)
{