Index: sources/gui/qml/pages/treatment/TreatmentHDF.qml =================================================================== diff -u -rc2f474ff07c98aa350c445a2474976a3cf985f40 -rbecdb453874007323459a9afe9fe581b6c158902 --- sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision c2f474ff07c98aa350c445a2474976a3cf985f40) +++ sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision becdb453874007323459a9afe9fe581b6c158902) @@ -25,14 +25,32 @@ import "qrc:/pages/treatment/sections" ScreenItem { id: _root + enum Status { + Paused = 0, + Active = 1, + Complete = 2 + } + readonly property int margin : Variables.defaultMargin * 5 - readonly property color statusColor : Colors.statusActive - showCreateRxHeaderButton : true + readonly property int hdfState : vTreatmentHDF.hdfState + function statusColor ( vHeaderBar = false ) { + return _root.hdfState === TreatmentHDF.Active ? Colors.statusActive : + _root.hdfState === TreatmentHDF.Paused ? Colors.statusPaused : + _root.hdfState === TreatmentHDF.Complete ? vHeaderBar ? Colors.statusComplete : + Colors.statusTextComplete : Colors.transparent + } + property alias notification : _notification + onHdfStateChanged : setStatusColor() + showCreateRxHeaderButton: true + showHeaderMenu : true + signal sectionPressuresClicked() signal treatmentHDFEditClicked() - Component.onCompleted : vHeaderbarModel.setHeaderbarHDFStatusColor(_root.statusColor.toString()) + function setStatusColor() { + vHeaderbarModel.setHeaderbarHDFStatusColor(_root.statusColor(true).toString()) + } Connections { target: vTDOpMode function onInTreatmentChanged ( vValue ) { if ( vValue ) { _chart.updateXAxis() } } @@ -68,7 +86,7 @@ color : Colors.panelBackgroundColor header.color : Colors.heparinSectionHeader - enableDropShadow: false + // enableDropShadow: false } BaseChart { id: _chart @@ -95,11 +113,13 @@ objectName : "_treatmentHdfComponent" width : _column.width height : _column.cellHeight - statusColor : _root.statusColor + statusColor : _root.statusColor() - onSubstitutionFlowClicked : print ("Substitution Flow Clicked") + onPauseResumeClicked : vTreatmentHDF.hdfState === TreatmentHDF.Paused ? vTreatmentAdjustmentHDFState.doResume() : + vTreatmentAdjustmentHDFState.doPause() - onEditClicked : _root.treatmentHDFEditClicked() + onEditClicked : _root.treatmentHDFEditClicked() } } + NotificationBarSmall { id: _notification } }