Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -rf0e262920199d1d5ebdbe3f1bf0c58c58a82d363 -rd4b731494a05087a763afff95b91c675bb417347 --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision f0e262920199d1d5ebdbe3f1bf0c58c58a82d363) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision d4b731494a05087a763afff95b91c675bb417347) @@ -9,9 +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 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 +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: false; screen: 3; statusColor: "Transparent" } // HeaderBar.HDF + } + function vitalsRecorded() { _vitalsButton.pulseAnimation.start() } MouseArea { id: _mouseArea @@ -138,15 +156,7 @@ 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 - } + onHiddenChanged : { if (hidden) { index = 0 } } } Row { id: _headerButtonRow