Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5) @@ -21,6 +21,7 @@ import "qrc:/globals" import "qrc:/components" import "qrc:/compounds" +import "qrc:/dialogs" import "qrc:/pages/treatment/adjustments" /*! @@ -38,6 +39,10 @@ _treatmentAdjustmentPressuresLimits .close() _treatmentAdjustmentDuration .close() _treatmentUltrafiltrationItem .close() + + if (! visible) { + _headerBar.menuHidden = true + } } stackView.initialItem : null @@ -55,23 +60,15 @@ || _treatmentAdjustmentPressuresLimits .visible || _treatmentAdjustmentDuration .visible || _treatmentUltrafiltrationItem .visible - // Components - MainMenu { id: _treatmentMenu - position : MainMenu.Position.Top - hidden : true - titles : [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin")] - visibleItems : [ true , false , false ] - spacing : Variables.defaultMargin - leftPdding : Variables.headerBarDateTimeWidth + Variables.columnSpacing // 200 + 60 - partitionWidth : 80 * titles.length// Todo Important : max width should be the width for all bottons - titlePixelSize : 32 - onCurrentIndexChanged: { - if (currentIndex === 1) push(_treatmentTrends) - if (currentIndex === 0) pop() - } + property int headerBarIndex: _headerBar.headerMenuIndex + + onHeaderBarIndexChanged: { + if ( _root.headerBarIndex === 1) push(_treatmentTrends) + if ( _root.headerBarIndex === 0) pop() } + // Components TreatmentBloodPrime { id: _treatmentBloodPrime } TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } TreatmentHome { id: _treatmentHome } @@ -168,6 +165,58 @@ } } + // Treatment Lock Dialog + AutoHideInfo { id: _lockDialog + objectName : "lockDialog" + property bool isLocked: false + + width: 600 + height: 400 + backgroundColor: "#091E31" + fontSize: 35 + verticalOffset: Variables.defaultMargin * 5 + + Rectangle { id: _mainCircle + objectName: "lockDialogMainCircle" + anchors { + top: parent.top + topMargin: Variables.defaultMargin * 2 + horizontalCenter: parent.horizontalCenter + } + height : 200 + width : height + radius : height + color : "transparent" + border.color: _lockDialog.isLocked ? "#6697D2" : + "#A47E38" + border.width: 2 + + Image { id : _iconImage + objectName: "lockDialogIcon" + + anchors.centerIn : parent + height : 80 + width : 80 + fillMode: Image.PreserveAspectFit + source : _lockDialog.isLocked ? "qrc:/images/iUnlock" : + "qrc:/images/iLock" + } + + Rectangle { id: _innerCircle + objectName: "lockDialogInnerCircle" + + anchors.centerIn: parent + color : "transparent" + border.color : _lockDialog.isLocked ? "#8FC1FE" : + "#CDAF78" + border.width : 1 + height : parent.height - 20 + width : height + radius : height + } + } + } + // ---------- Manages Responses ---------- Connections { target: vTreatmentAdjustmentDuration function onAdjustmentTriggered ( vValue ) { @@ -207,7 +256,7 @@ Connections { target: _treatmentBloodPrime function onVisibleChanged ( vValue ) { if (_treatmentBloodPrime.visible) { - _treatmentMenu.hidden = true + _headerBar.menuHidden = true } } }