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