Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r50e38888132835a21357dfadff7a9bb1ccfdd334 -r3aee99e86a02eee80e15a157399a5b9968958ec1 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 50e38888132835a21357dfadff7a9bb1ccfdd334) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 3aee99e86a02eee80e15a157399a5b9968958ec1) @@ -31,6 +31,11 @@ */ StackItem { id : _root objectName: "TreatmentStack" + enum Page { + Treatment, + Trends, + Heparin + } onVisibleChanged : { // this should never happen by design, but in tests it can easily happen and will block the screen touch. _treatmentAdjustmentFlow .close() @@ -57,23 +62,24 @@ || _treatmentUltrafiltrationItem .visible // Components MainMenu { id: _treatmentMenu -// y : Variables.mainMenuHeight * -1 position : MainMenu.Position.Top hidden : true - titles : [ qsTr("Treatment") , qsTr("Trending") , qsTr("Heparin") ] + titles : [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin") ] visibleItems : [ true , true , true ] 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 - /* ----- TEST: Under the test code, for the plotting of the items ----- onCurrentIndexChanged: { - console.debug(currentIndex) - if (currentIndex == 1) push(_treatmentTrending) - if (currentIndex == 0) pop() + console.debug("INDEX + " + currentIndex) + console.debug("stackView + " + stackView.index) + console.debug("depth + " + stackView.depth) + if (stackView.depth > 2) pop() + if (currentIndex === TreatmentStack.Page.Heparin) push(_treatmentHeparin) + if (currentIndex === TreatmentStack.Page.Trends) push(_treatmentTrends) + if (currentIndex === TreatmentStack.Page.Treatment) pop() } - */ Row { id: _headerButtonRow width : 350 @@ -82,6 +88,7 @@ spacing : Variables.defaultMargin anchors { right : parent.right + rightMargin : Variables.defaultMargin } TouchRect { id : _prescriptionButton @@ -158,7 +165,8 @@ } } - ScreenItem { id: _treatmentTrending } + ScreenItem { id: _treatmentTrends } // TODO: make me! + ScreenItem { id: _treatmentHeparin } // TODO: make me! //// Treatment Adjustment Dialogs TreatmentAdjustmentFlow { id: _treatmentAdjustmentFlow }