Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -ref583f0056a0fb8c66a64e132be159719b2bc2f6 -rb0370d82c7653eca5347374aa3f6b02a188c8fe7 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision ef583f0056a0fb8c66a64e132be159719b2bc2f6) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision b0370d82c7653eca5347374aa3f6b02a188c8fe7) @@ -10,8 +10,8 @@ property alias titleText : _title.text property alias loggedUser : _loggedInUser.text readonly property int currentScreen : _headerMenu.currentScreen - property alias statusColor : _headerMenu.statusColor property bool isCreateRx : false // set in slot in parent + property bool isHeparinFeatured : vSettings.heparinSyringePump width : Variables.applicationWidth height : Variables.headerHeight @@ -22,6 +22,16 @@ GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } } + enum TreatmentScreen { + Treatment = 0, + Trends = 1, + Heparin = 2, + HDF = 3 + } + + onIsHeparinFeaturedChanged : vListModel.setHeaderbarVisible(HeaderBar.Heparin, _root.isHeparinFeatured) + Component.onCompleted : vListModel.setHeaderbarVisible(HeaderBar.Heparin, _root.isHeparinFeatured) + function vitalsRecorded() { _vitalsButton.pulseAnimation.start() } MouseArea { id: _mouseArea @@ -131,22 +141,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: false; screen: 3 } // MainMenu.HDF - } + model : vListModel.headerbarModel + onHiddenChanged : { if (hidden) { index = 0 } } } Row { id: _headerButtonRow