Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -r0975a67dd4e4673b9a7b226bfea02cbfa489c418 -rc70815ad2b3beadf61832f2e4d12eb90d476e020 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 0975a67dd4e4673b9a7b226bfea02cbfa489c418) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision c70815ad2b3beadf61832f2e4d12eb90d476e020) @@ -10,9 +10,9 @@ property alias headerMenuIndex : _headerMenu.index property alias userMode : _loggedInUser.text readonly property int currentScreen : _headerMenu.currentScreen - property bool isCreateRx : false // This is to hide in the create rx icon in the screen only property bool isHeparinFeatured : vSettings.heparinSyringePump property bool isHDFFeatured : vTreatmentCreate.treatmentModality === HeaderBar.Mode_HDF + property StackView activeStack : null width : Variables.applicationWidth @@ -36,11 +36,10 @@ Mode_HDF } - onIsHDFFeaturedChanged : vListModel.setHeaderbarHDFVisible(_root.isHDFFeatured ) - onIsHeparinFeaturedChanged : vListModel.setHeaderbarHeparinVisible(_root.isHeparinFeatured ) + onIsHDFFeaturedChanged : vHeaderbarModel.setHeaderbarHDFVisible(_root.isHDFFeatured ) + onIsHeparinFeaturedChanged : vHeaderbarModel.setHeaderbarHeparinVisible(_root.isHeparinFeatured ) Component.onCompleted : { - vListModel.setHeaderbarHeparinVisible (_root.isHeparinFeatured ) - vListModel.setHeaderbarHDFVisible (_root.isHDFFeatured ) + vHeaderbarModel.setHeaderbarHDFVisible (_root.isHDFFeatured ) } function vitalsRecorded() { _vitalsButton.pulseAnimation.start() } @@ -118,7 +117,6 @@ text : vDateTime.time font.pixelSize : Fonts.fontHeaderbarTime font.weight : Font.DemiBold - } Text { id: _dateText @@ -161,7 +159,7 @@ titlePixelSize : 32 backgroundColor : Colors.transparent highlightHeight : 15 - model : vListModel.headerbarModel + model : vHeaderbarModel.model onHiddenChanged : { if (hidden) { index = 0 } } } @@ -193,10 +191,11 @@ iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iPrescription" extraSpace : _headerButtonRow.spacing - visible : ( vTDOpMode.preTreatment || - vTDOpMode.inTreatment || - vTDOpMode.postTreatment ) && ! _root.isCreateRx + visible : _root.activeStack && + _root.activeStack.currentItem && + _root.activeStack.currentItem.showCreateRxHeaderButton ? _root.activeStack.currentItem.showCreateRxHeaderButton : false + onPressed : _headerbarPrescription.open() }