Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -9,10 +9,10 @@ property alias headerMenuIndex : _headerMenu.index property alias titleText : _title.text property alias loggedUser : _loggedInUser.text + property alias model : _model readonly property int currentScreen : _headerMenu.currentScreen - property alias heparinStatusColor : _headerMenu.heparinStatusColor - property alias hdfStatusColor : _headerMenu.hdfStatusColor property bool isCreateRx : false // set in slot in parent + property bool isHeparinFeatured : vSettings.heparinSyringePump width : Variables.applicationWidth height : Variables.headerHeight @@ -23,6 +23,23 @@ GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } } + enum TreatmentScreen { + Treatment = 0, + Trends = 1, + Heparin = 2, + HDF = 3 + } + + onIsHeparinFeaturedChanged : _model.setProperty(HeaderBar.Heparin, "visible", _root.isHeparinFeatured) + Component.onCompleted : _model.setProperty(HeaderBar.Heparin, "visible", _root.isHeparinFeatured) + + ListModel { id: _model + ListElement { text: qsTr("Treatment"); visible: true; screen: 0; statusColor: "Transparent" } // HeaderBar.Treatment + ListElement { text: qsTr("Trends"); visible: true; screen: 1; statusColor: "Transparent" } // HeaderBar.Trends + ListElement { text: qsTr("Heparin"); visible: true; screen: 2; statusColor: "Transparent" } // HeaderBar.Heparin + ListElement { text: qsTr("HDF"); visible: true; screen: 3; statusColor: "Transparent" } // HeaderBar.HDF + } + function vitalsRecorded() { _vitalsButton.pulseAnimation.start() } MouseArea { id: _mouseArea @@ -132,22 +149,14 @@ bottom : parent.bottom bottomMargin: hidden || disable ? height * -1 : 0 } - height : parent.height - width : parent.width / 2 // gives the width of the headerbar menu + height : parent.height + width : parent.width / 2 // gives the width of the headerbar menu hidden : true titlePixelSize : 32 backgroundColor : Colors.transparent highlightHeight : 15 model : _model - isMainTreatment : true - onHiddenChanged: { if (hidden) { index = 0 } } - - ListModel { id: _model - ListElement { text: qsTr("Treatment"); visible: true; screen: 0 } // MainMenu.Treatment - ListElement { text: qsTr("Trends"); visible: true; screen: 1 } // MainMenu.Trends - ListElement { text: qsTr("Heparin"); visible: true; screen: 2 } // MainMenu.Heparin - ListElement { text: qsTr("HDF"); visible: true; screen: 3 } // MainMenu.HDF - } + onHiddenChanged : { if (hidden) { index = 0 } } } Row { id: _headerButtonRow Index: sources/gui/qml/components/MainMenu.qml =================================================================== diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76) +++ sources/gui/qml/components/MainMenu.qml (.../MainMenu.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -33,23 +33,13 @@ property int titlePixelSize : 40 property color backgroundColor : Colors.backgroundMainMenu property int highlightHeight : 10 - property bool isMainTreatment : false - readonly property int currentScreen : isMainTreatment ? _model.get(index).screen : 0 - property color heparinStatusColor : Colors.transparent - property color hdfStatusColor : Colors.transparent + readonly property int currentScreen : model.get(index).screen ?? 0 width : parent.width height : Variables.mainMenuHeight color : _root.backgroundColor clip : true - enum TreatmentScreen { - Treatment = 0, - Trends = 1, - Heparin = 2, - HDF = 3 - } - gradient: Gradient { GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) } GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } @@ -95,7 +85,7 @@ objectName : "delegateControl" width : ListView.view.count ? _delegateControl.visible ? ListView.view.width / ListView.view.count : 0 : 0 height : ListView.view.height - visible : model.screen === MainMenu.Heparin ? vSettings.heparinSyringePump : model.visible + visible : model.visible TouchRect { id : _touchRect objectName: "_touchRect" + index @@ -116,10 +106,8 @@ height : 15 width : height radius : height - visible : _root.isMainTreatment && ( model.screen === MainMenu.Heparin || - model.screen === MainMenu.HDF ) - color : model.screen === MainMenu.Heparin ? _root.heparinStatusColor : - model.screen === MainMenu.HDF ? _root.hdfStatusColor : Colors.transparent + color : model.statusColor ?? Colors.transparent + } onPressed: { Index: sources/gui/qml/pages/treatment/TreatmentHDF.qml =================================================================== diff -u -re5576e4397ed640fec2a936dc5e42c773870b29a -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision e5576e4397ed640fec2a936dc5e42c773870b29a) +++ sources/gui/qml/pages/treatment/TreatmentHDF.qml (.../TreatmentHDF.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -34,9 +34,8 @@ signal sectionPressuresClicked() signal treatmentModeEditClicked() - Component.onCompleted: { - _headerBar.hdfStatusColor = _root.statusColor // TODO update later - } + // onStatusColorChanged: TODO update to this + Component.onCompleted : { _headerBar.model.setProperty(HeaderBar.HDF, "statusColor", _root.statusColor.toString() ) } Row { id: _row objectName: "_row" Index: sources/gui/qml/pages/treatment/TreatmentHeparin.qml =================================================================== diff -u -r45ce5cd058a8d0239d486e0ab4b057731f7dba76 -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/pages/treatment/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision 45ce5cd058a8d0239d486e0ab4b057731f7dba76) +++ sources/gui/qml/pages/treatment/TreatmentHeparin.qml (.../TreatmentHeparin.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -60,7 +60,7 @@ signal idleTimeout() - onHeparinColorChanged : _headerBar.heparinStatusColor = heparinColor + onHeparinColorChanged : _headerBar.model.setProperty(HeaderBar.Heparin, "statusColor", heparinColor.toString()) enum HeparinPrescription{ HeparinType, Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -re5576e4397ed640fec2a936dc5e42c773870b29a -rdb77d641586bcf38af1b931296519307d5901281 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision e5576e4397ed640fec2a936dc5e42c773870b29a) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision db77d641586bcf38af1b931296519307d5901281) @@ -55,16 +55,16 @@ onHeaderMenuIndexChanged: { switch( _headerBar.currentScreen ) { - case MainMenu.Treatment: + case HeaderBar.Treatment: pop(null) // unwind stack back to main treatment break - case MainMenu.Trends: + case HeaderBar.Trends: page( _treatmentTrends ) break; - case MainMenu.Heparin: + case HeaderBar.Heparin: page( _treatmentHeparin ) break - case MainMenu.HDF: // TODO + case HeaderBar.HDF: // TODO page( _treatmentHDF ) break default: @@ -118,7 +118,7 @@ TreatmentHeparin { id: _treatmentHeparin } Connections { target: _treatmentHeparin function onIdleTimeout ( ) { - _headerBar.headerMenuIndex = MainMenu.Treatment // on heparin idle timeout go to main treatment + _headerBar.headerMenuIndex = HeaderBar.Treatment // on heparin idle timeout go to main treatment } } Index: sources/view/dd/data/VDDValvesStatesData.cpp =================================================================== diff -u -r9760eecfc557430078d5ef4ec6f9bc2ec423bfc1 -rdb77d641586bcf38af1b931296519307d5901281 --- sources/view/dd/data/VDDValvesStatesData.cpp (.../VDDValvesStatesData.cpp) (revision 9760eecfc557430078d5ef4ec6f9bc2ec423bfc1) +++ sources/view/dd/data/VDDValvesStatesData.cpp (.../VDDValvesStatesData.cpp) (revision db77d641586bcf38af1b931296519307d5901281) @@ -48,11 +48,11 @@ balancingChamberValve7 ( vData.mValvesStatus.at( GuiDDValves::D26_VALV )); balancingChamberValve8 ( vData.mValvesStatus.at( GuiDDValves::D22_VALV )); - spareValve0 ( vData.mValvesStatus.at( GuiDDValves::D79_PMP_VALV )); // Start of spare valve group + spareValve0 ( vData.mValvesStatus.at( GuiDDValves::D88_79_VALV )); // Start of spare valve group spareValve1 ( vData.mValvesStatus.at( GuiDDValves::D83_VALV )); spareValve2 ( vData.mValvesStatus.at( GuiDDValves::D91_VALV )); - spareValve3 ( vData.mValvesStatus.at( GuiDDValves::SPARE3_VALV )); - spareValve4 ( vData.mValvesStatus.at( GuiDDValves::SPARE4_VALV )); + spareValve3 ( vData.mValvesStatus.at( GuiDDValves::D104_VALV )); + spareValve4 ( vData.mValvesStatus.at( GuiDDValves::D95_VALV )); spareValve5 ( vData.mValvesStatus.at( GuiDDValves::SPARE5_VALV )); spareValve6 ( vData.mValvesStatus.at( GuiDDValves::D100_VALV )); spareValve7 ( vData.mValvesStatus.at( GuiDDValves::SPARE7_VALV ));