Commit 2f72cd07 authored by Aaron Bray's avatar Aaron Bray

Merge branch '1.x' into 'master'

Release 1.3.0

See merge request !6
parents 72265644 c027a438
File added
include(ExternalProject)
project(ExplorerSuperBuild)
if(MSVC OR XCode)
# For multi configuration IDE environments start with release
set(CMAKE_CONFIGURATION_TYPES Release CACHE TYPE INTERNAL FORCE )
endif()
set(DEPENDENCIES)
set( Qt5_DIR "" CACHE PATH "Path to Qt" )
......@@ -81,11 +76,8 @@ if(NOT Pulse_FOUND)
message(STATUS "Downloading and build Pulse.")
ExternalProject_Add(Pulse
PREFIX Pulse
#GIT_REPOSITORY https://gitlab.kitware.com/physiology/engine.git
#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 https://gitlab.kitware.com/physiology/engine/-/archive/REL_2_2_0/engine-REL_2_2_0.zip
URL_MD5 aabfb4bfae1aa6cde8a86802783c3292
BINARY_DIR ${CMAKE_BINARY_DIR}/Pulse-build
CMAKE_ARGS
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
......@@ -97,6 +89,19 @@ if(NOT Pulse_FOUND)
list(APPEND DEPENDENCIES "Pulse")
endif()
find_package(Qt5 COMPONENTS Core Widgets Charts REQUIRED)
# Let's see if we have everything we need and the Superbuild is not necessary
if(NOT DEPENDENCIES)
set(DOING_SUPERBUILD FALSE)
return()
endif()
set(DOING_SUPERBUILD TRUE)
if(MSVC OR XCode)
# For multi configuration IDE environments start with release
set(CMAKE_CONFIGURATION_TYPES Release CACHE STRING INTERNAL FORCE )
endif()
ExternalProject_Add(PulseExplorer
PREFIX PulseExplorer
DEPENDS ${DEPENDENCIES}
......
......@@ -10,14 +10,19 @@ endif()
# Superbuild stuff
option(DO_SUPERBUILD "Download and build any project dependencies" ON)
option(USE_PARAVIEW "Include the ParaView Model Window" OFF)
if (DO_SUPERBUILD)
include("CMake/Superbuild.cmake")
return()
include("CMake/Superbuild.cmake")
if(DOING_SUPERBUILD)
return()
else()
message(STATUS "All dependencies found, skipping superbuild")
endif()
endif()
# Policy to address @foo@ variable expansion
set(EXPLORER_VERSION_MAJOR 1)
set(EXPLORER_VERSION_MINOR 2)
set(EXPLORER_VERSION_MINOR 3)
set(EXPLORER_VERSION_PATCH 0)
set(EXPLORER_VERSION "${EXPLORER_VERSION_MAJOR}.${EXPLORER_VERSION_MINOR}.${EXPLORER_VERSION_PATCH}")
......@@ -28,7 +33,8 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Set the possible values of build type for cmake-gui
if(MSVC OR XCode)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
set(CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE STRING INTERNAL FORCE )
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "RelWithDebInfo")
endif()
set(project_name PulseExplorer)
......@@ -47,7 +53,7 @@ list(APPEND QT_LIBRARIES
if(ENABLE_PARAVIEW)
find_package(ParaView REQUIRED)
if (NOT PARAVIEW_BUILD_QT_GUI)
status(FATAL_ERROR "${project_name} requires ParaView to be built with Qt")
status(FATAL_ERROR "${project_name} requires ParaView to be built with Qt")
endif()
endif()
......@@ -73,11 +79,17 @@ set(moc_sources
controls/CollapsableWidget.h
controls/ScalarWidget.h
controls/VitalsMonitorWidget.h
controls/DataRequestsWidget.h
controls/DataRequestWidget.h
controls/DataRequestViewWidget.h
controls/DynamicControlsWidget.h
controls/PatientEditorWidget.h
controls/ConditionsEditorWidget.h
controls/ActionsEditorWidget.h
controls/ScenarioEditorWidget.h
controls/PlotSetWidget.h
controls/LabeledComboBox.h
controls/EnviornmentWidget.h
conditions/ConditionWidget.h
conditions/ChronicAnemiaWidget.h
......@@ -88,6 +100,26 @@ 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/SupplementalOxygenWidget.h
actions/TensionPneumothoraxWidget.h
showcases/AnaphylaxisShowcaseWidget.h
showcases/MultiTraumaShowcaseWidget.h
)
......@@ -99,17 +131,25 @@ set(UI_FILES
ui/ExplorerIntro.ui
ui/PatientEditor.ui
ui/VitalsMonitor.ui
ui/DataRequests.ui
ui/DataRequest.ui
ui/DataRequestView.ui
ui/DynamicControls.ui
ui/Enviornment.ui
ui/ConditionsEditor.ui
ui/Condition.ui
ui/ActionsEditor.ui
ui/Action.ui
ui/ScenarioEditor.ui
ui/AnaphylaxisShowcase.ui
ui/MultiTraumaShowcase.ui)
ui/MultiTraumaShowcase.ui
ui/PlotSet.ui
)
source_group("UI" FILES ${UI_FILES})
QT5_WRAP_CPP(MOC_BUILT_SOURCES ${moc_sources})
QT5_WRAP_UI(UI_BUILT_SOURCES ${UI_FILES})
......@@ -128,6 +168,8 @@ set(CONTROLS_FILES
controls/QPulse.h
controls/QPulsePlot.cxx
controls/QPulsePlot.h
controls/PlotSetWidget.cxx
controls/PlotSetWidget.h
controls/ScalarWidget.cxx
controls/ScalarWidget.h
controls/ScalarQuantityWidget.inl
......@@ -140,12 +182,21 @@ set(CONTROLS_FILES
controls/PatientEditorWidget.cxx
controls/ConditionsEditorWidget.h
controls/ConditionsEditorWidget.cxx
controls/ActionsEditorWidget.h
controls/ActionsEditorWidget.cxx
controls/ScenarioEditorWidget.h
controls/ScenarioEditorWidget.cxx
controls/DataRequestsWidget.cxx
controls/DataRequestsWidget.h
controls/DataRequestWidget.cxx
controls/DataRequestWidget.h
controls/DataRequestViewWidget.cxx
controls/DataRequestViewWidget.h
controls/VitalsMonitorWidget.cxx
controls/VitalsMonitorWidget.h
controls/LabeledComboBox.cxx
controls/LabeledComboBox.h
controls/EnviornmentWidget.cxx
controls/EnviornmentWidget.h
)
source_group("Controls" FILES ${CONTROLS_FILES})
list(APPEND SOURCE ${CONTROLS_FILES})
......@@ -193,6 +244,44 @@ source_group("Conditions" FILES ${CONDITIONS_FILES})
list(APPEND SOURCE ${CONDITIONS_FILES})
set(ACTIONS_FILES
actions/ActionWidget.h
actions/ActionWidget.cxx
actions/AcuteStressWidget.h
actions/AcuteStressWidget.cxx
actions/AirwayObstructionWidget.h
actions/AirwayObstructionWidget.cxx
actions/ApneaWidget.h
actions/ApneaWidget.cxx
actions/AsthmaAttackWidget.h
actions/AsthmaAttackWidget.cxx
actions/BronchoconstrictionWidget.h
actions/BronchoconstrictionWidget.cxx
actions/CardiacArrestWidget.h
actions/CardiacArrestWidget.cxx
actions/ChestCompressionForceScaleWidget.h
actions/ChestCompressionForceScaleWidget.cxx
actions/ChestOcclusiveDressingWidget.h
actions/ChestOcclusiveDressingWidget.cxx
actions/ExerciseWidget.h
actions/ExerciseWidget.cxx
actions/HemorrhageWidget.h
actions/HemorrhageWidget.cxx
actions/IntubationWidget.h
actions/IntubationWidget.cxx
actions/NeedleDecompressionWidget.h
actions/NeedleDecompressionWidget.cxx
actions/PericardialEffusionWidget.h
actions/PericardialEffusionWidget.cxx
actions/SubstanceBolusWidget.h
actions/SubstanceBolusWidget.cxx
actions/SubstanceCompoundInfusionWidget.h
actions/SubstanceCompoundInfusionWidget.cxx
actions/SubstanceInfusionWidget.h
actions/SubstanceInfusionWidget.cxx
actions/SupplementalOxygenWidget.h
actions/SupplementalOxygenWidget.cxx
actions/TensionPneumothoraxWidget.h
actions/TensionPneumothoraxWidget.cxx
)
source_group("Actions" FILES ${ACTIONS_FILES})
list(APPEND SOURCE ${ACTIONS_FILES})
......@@ -340,7 +429,8 @@ else()
endif()
if (APPLE)
set(CPACK_GENERATOR DragNDrop)
set(CPACK_GENERATOR ZIP)
#set(CPACK_GENERATOR DragNDrop)
else()
set(CPACK_GENERATOR ZIP)
endif()
......@@ -364,9 +454,9 @@ if(APPLE)
set(MACOSX_BUNDLE_ICON_FILE pulse.icns)
set(MACOSX_BUNDLE_BUNDLE_VERSION "${EXPLORER_VERSION}")
set(MACOSX_BUNDLE_EXECUTABLE_NAME PulseExplorer)
set_target_properties(${project_name}
PROPERTIES
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resource/explorer.plist.in)
#set_target_properties(${project_name}
# PROPERTIES
# MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/resource/explorer.plist.in)
endif()
# NSIS Package options
......
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#include "ActionWidget.h"
#include "ui_Action.h"
#include <QMessageBox>
class QActionWidget::Controls : public Ui::ActionWidget
{
public:
Controls() {}
};
QActionWidget::QActionWidget(QPulse& qp, QWidget *parent, Qt::WindowFlags flags) : QWidget(parent,flags)
{
m_Controls = new Controls();
m_Controls->setupUi(this);
connect(m_Controls->Apply, SIGNAL(clicked()), this, SLOT(ApplyAction()));
}
QActionWidget::~QActionWidget()
{
delete m_Controls;
}
void QActionWidget::Reset()
{
}
void QActionWidget::SetEnabled(bool b)
{
m_Controls->Apply->setEnabled(b);
}
void QActionWidget::ControlsToAction()
{
m_PassAction = true;
}
QWidget* QActionWidget::Properties()
{
return m_Controls->Properties;
}
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QWidget>
#include "controls/QPulse.h"
class SEAction;
namespace Ui {
class ActionWidget;
}
class QActionWidget : public QWidget
{
Q_OBJECT
public:
QActionWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QActionWidget();
virtual void Reset();
virtual void SetEnabled(bool b);
virtual QWidget* Properties();
protected:
bool m_PassAction = false;
virtual void ControlsToAction();
protected slots:
void ApplyAction() { ControlsToAction(); }
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 "actions/AcuteStressWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "PhysiologyEngine.h"
#include "cdm/patient/actions/SEAcuteStress.h"
#include "cdm/properties/SEScalar0To1.h"
class QAcuteStressWidget::Controls
{
public:
Controls() {}
SEAcuteStress Action;
QScalarWidget* Severity;
};
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, ScalarOptionWidget::None , this);
Properties()->layout()->addWidget(m_Controls->Severity);
Reset();
}
QAcuteStressWidget::~QAcuteStressWidget()
{
delete m_Controls;
}
void QAcuteStressWidget::Reset()
{
QActionWidget::Reset();
m_Controls->Action.Clear();
m_Controls->Severity->reset();
}
void QAcuteStressWidget::SetEnabled(bool b)
{
QActionWidget::SetEnabled(b);
m_Controls->Severity->enableInput(b);
}
void QAcuteStressWidget::ControlsToAction()
{
QActionWidget::ControlsToAction();
m_Controls->Severity->getValue(m_Controls->Action.GetSeverity());
}
void QAcuteStressWidget::AtSteadyState(PhysiologyEngine& pulse)
{
// Nothing expected here
}
void QAcuteStressWidget::AtSteadyStateUpdateUI()
{
// Nothing expected here
}
void QAcuteStressWidget::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
if (m_PassAction)
{
if (m_Controls->Action.IsValid())
pulse.ProcessAction(m_Controls->Action);
m_PassAction = false;
}
}
void QAcuteStressWidget::PhysiologyUpdateUI()
{// This is called from a slot, you can update UI here
// Nothing is expected to be in the environment
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QWidget>
#include "actions/ActionWidget.h"
class QAcuteStressWidget : public QActionWidget, public PulseListener
{
Q_OBJECT
public:
QAcuteStressWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QAcuteStressWidget();
virtual void Reset() override;
virtual void SetEnabled(bool b) override;
virtual void AtSteadyState(PhysiologyEngine& pulse) override;
virtual void AtSteadyStateUpdateUI() override;// Main Window will call this to update UI Components
virtual void ProcessPhysiology(PhysiologyEngine& pulse) override;
virtual void PhysiologyUpdateUI() override;// Main Window will call this to update UI Components
virtual void ControlsToAction() override;
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 "actions/AirwayObstructionWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "PhysiologyEngine.h"
#include "cdm/patient/actions/SEAirwayObstruction.h"
#include "cdm/properties/SEScalar0To1.h"
class QAirwayObstructionWidget::Controls
{
public:
Controls() {}
SEAirwayObstruction Action;
QScalarWidget* Severity;
};
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, ScalarOptionWidget::None, this);
Properties()->layout()->addWidget(m_Controls->Severity);
Reset();
}
QAirwayObstructionWidget::~QAirwayObstructionWidget()
{
delete m_Controls;
}
void QAirwayObstructionWidget::Reset()
{
QActionWidget::Reset();
m_Controls->Action.Clear();
m_Controls->Severity->reset();
}
void QAirwayObstructionWidget::SetEnabled(bool b)
{
QActionWidget::SetEnabled(b);
m_Controls->Severity->enableInput(b);
}
void QAirwayObstructionWidget::ControlsToAction()
{
QActionWidget::ControlsToAction();
m_Controls->Severity->getValue(m_Controls->Action.GetSeverity());
}
void QAirwayObstructionWidget::AtSteadyState(PhysiologyEngine& pulse)
{
// Nothing expected here
}
void QAirwayObstructionWidget::AtSteadyStateUpdateUI()
{
// Nothing expected here
}
void QAirwayObstructionWidget::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
if (m_PassAction)
{
if (m_Controls->Action.IsValid())
pulse.ProcessAction(m_Controls->Action);
m_PassAction = false;
}
}
void QAirwayObstructionWidget::PhysiologyUpdateUI()
{// This is called from a slot, you can update UI here
// Nothing is expected to be in the environment
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QWidget>
#include "actions/ActionWidget.h"
class QAirwayObstructionWidget : public QActionWidget, public PulseListener
{
Q_OBJECT
public:
QAirwayObstructionWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QAirwayObstructionWidget();
virtual void Reset() override;
virtual void SetEnabled(bool b) override;
virtual void AtSteadyState(PhysiologyEngine& pulse) override;
virtual void AtSteadyStateUpdateUI() override;// Main Window will call this to update UI Components
virtual void ProcessPhysiology(PhysiologyEngine& pulse) override;
virtual void PhysiologyUpdateUI() override;// Main Window will call this to update UI Components
virtual void ControlsToAction() override;
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 "actions/ApneaWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "PhysiologyEngine.h"
#include "cdm/patient/actions/SEApnea.h"
#include "cdm/properties/SEScalar0To1.h"
class QApneaWidget::Controls
{
public:
Controls() {}
SEApnea Action;
QScalarWidget* Severity;
};
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, ScalarOptionWidget::None, this);
Properties()->layout()->addWidget(m_Controls->Severity);
Reset();
}
QApneaWidget::~QApneaWidget()
{
delete m_Controls;
}
void QApneaWidget::Reset()
{
QActionWidget::Reset();
m_Controls->Action.Clear();
m_Controls->Severity->reset();
}
void QApneaWidget::SetEnabled(bool b)
{
QActionWidget::SetEnabled(b);
m_Controls->Severity->enableInput(b);
}
void QApneaWidget::ControlsToAction()
{
QActionWidget::ControlsToAction();
m_Controls->Severity->getValue(m_Controls->Action.GetSeverity());
}
void QApneaWidget::AtSteadyState(PhysiologyEngine& pulse)
{
// Nothing expected here
}
void QApneaWidget::AtSteadyStateUpdateUI()
{
// Nothing expected here
}
void QApneaWidget::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
if (m_PassAction)
{
if (m_Controls->Action.IsValid())
pulse.ProcessAction(m_Controls->Action);
m_PassAction = false;
}
}
void QApneaWidget::PhysiologyUpdateUI()
{// This is called from a slot, you can update UI here
// Nothing is expected to be in the environment
}
\ No newline at end of file
/* Distributed under the Apache License, Version 2.0.
See accompanying NOTICE file for details.*/
#pragma once
#include <QObject>
#include <QWidget>
#include "actions/ActionWidget.h"
class QApneaWidget : public QActionWidget, public PulseListener
{
Q_OBJECT
public:
QApneaWidget(QPulse& qp, QWidget *parent = Q_NULLPTR, Qt::WindowFlags flags = Qt::WindowFlags());
virtual ~QApneaWidget();
virtual void Reset() override;
virtual void SetEnabled(bool b) override;
virtual void AtSteadyState(PhysiologyEngine& pulse) override;
virtual void AtSteadyStateUpdateUI() override;// Main Window will call this to update UI Components
virtual void ProcessPhysiology(PhysiologyEngine& pulse) override;
virtual void PhysiologyUpdateUI() override;// Main Window will call this to update UI Components
virtual void ControlsToAction() override;
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 "actions/AsthmaAttackWidget.h"
#include "controls/ScalarWidget.h"
#include "controls/ScalarQuantityWidget.h"
#include "cdm/CommonDataModel.h"
#include "PhysiologyEngine.h"
#include "cdm/patient/actions/SEAsthmaAttack.h"
#include "cdm/properties/SEScalar0To1.h"
class QAsthmaAttackWidget::Controls
{
public:
Controls() {}
SEAsthmaAttack Action;
QScalarWidget* Severity;
};
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, ScalarOptionWidget::None, this);
Properties()->layout()->addWidget(m_Controls->Severity);
Reset();
}
QAsthmaAttackWidget::~QAsthmaAttackWidget()
{
delete m_Controls;
}
void QAsthmaAttackWidget::Reset()
{
QActionWidget::Reset();
m_Controls->Action.Clear();
m_Controls->Severity->reset();
}
void QAsthmaAttackWidget::SetEnabled(bool b)
{
QActionWidget::SetEnabled(b);
m_Controls->Severity->enableInput(b);
}
void QAsthmaAttackWidget::ControlsToAction()
{
QActionWidget::ControlsToAction();
m_Controls->Severity->getValue(m_Controls->Action.GetSeverity());
}
void QAsthmaAttackWidget::AtSteadyState(PhysiologyEngine& pulse)
{