Index: sources/gui/qml/pages/treatment/TreatmentCreate.qml =================================================================== diff -u -r9baa4f15fe9866be23895f9738b091b3ab078898 -rd6869b2442823e77476ace6df006d0d000ec9b7a --- sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision 9baa4f15fe9866be23895f9738b091b3ab078898) +++ sources/gui/qml/pages/treatment/TreatmentCreate.qml (.../TreatmentCreate.qml) (revision d6869b2442823e77476ace6df006d0d000ec9b7a) @@ -1,14 +1,14 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2020 Diality Inc. - All Rights Reserved. * \copyright \n * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, \n * IN PART OR IN WHOLE, \n * WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. \n * - * \file ManagerHome.qml - * \date 2019/10/21 - * \author Behrouz NematiPour + * \file TreatmentCreate.qml + * \date 2020/07/07 + * \author Peter Lucia * */ @@ -26,7 +26,8 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - signal backPressed() + signal clickedBack() + signal clickedContinue() Rectangle { id: _topMenuBar anchors.top: parent.top @@ -37,21 +38,25 @@ BackButton { id : _backButton anchors.verticalCenter: parent.verticalCenter - onPressed: backPressed() + onPressed: clickedBack() } } - ScrollView { - anchors.top: _topMenuBar.bottom; - anchors.left: parent.left; - anchors.bottom: parent.bottom; - width: parent.width; + Flickable { + id: _flickable + anchors.top: _topMenuBar.bottom + anchors.left: parent.left + anchors.bottom: parent.bottom + width: parent.width + contentWidth: parent.width + contentHeight: parent.height + clip: true Rectangle { color: "transparent"; anchors.fill: parent; Column { - spacing: Variables.columnSpacing + spacing: Variables.createTreatmentSpacing anchors.horizontalCenter: parent.horizontalCenter; anchors.fill: parent; @@ -66,55 +71,87 @@ anchors.horizontalCenter: parent.horizontalCenter; text: qsTr("PRESCRIPTION"); color: Colors.textMain; - font.pixelSize: Fonts.fontPixelSection + font.pixelSize: Fonts.fontPixelButton + font.bold: true } - // TODO: make this a component. - Rectangle { - height: Variables.progressbarRectHeight - width: Variables.progressbarRectWidth - anchors.horizontalCenter: parent.horizontalCenter - color: "transparent"; + SliderCreateTreatment { + id: _bloodFlowRate + text: "Blood Flow Rate" + units: qsTr(" mL/min") + min: 100 + max: 500 + } - Text { - text: "Blood Flow Rate" - anchors.top: parent.top - anchors.left: parent.left - font.pixelSize: Fonts.fontPixelFluidText - color: Colors.textMain; + SliderCreateTreatment { + id: _dialysateFlowRate + text: "Dialysate Flow Rate" + units: qsTr(" mL/min") + min: 100 + max: 600 + } - } + SliderCreateTreatment { + id: _duration + text: "Duration" + units: qsTr(" min") + min: 60 + max: 480 + } - Text { - id: _selected_value - anchors.top: parent.top - anchors.right: parent.right - text: "-- mL/min" - font.pixelSize: Fonts.fontPixelFluidUnit - color: Colors.textMain; + SliderCreateTreatment { + id: _heparinDispensingRate + text: "Heparin Dispensing Rate" + units: qsTr(" IU/hr") + min: 0 + max: 1000 + } - } + SliderCreateTreatment { + id: _heparinBolusVolume + text: "Heparin Bolus Volume" + units: qsTr(" IU") + min: 100 + max: 2000 + } - Slider { id : _bloodFlowRate - anchors.horizontalCenter: parent.horizontalCenter; - anchors.bottom: parent.bottom; - width : Variables.progressbarSmallWidth - height : 5 - minimum : 100 - maximum : 500 - unit : qsTr(" mL/min") - step : Variables.bloodFlowResolution - ticks : true - onValueChanged: { - _selected_value.text = value + unit; - } - } + TouchRect { id : _continueRect + anchors.horizontalCenter: parent.horizontalCenter + text.text: qsTr("CONTINUE") + button.onClicked: _root.clickedContinue() } } } + states: State { + when: _flickable.movingVertically + PropertyChanges { + target: _verticalScrollBar + opacity: 0.8 + } + } + } + ScrollBar { + anchors.top: _flickable.top + anchors.bottom: _flickable.bottom + id: _verticalScrollBar + size: Variables.scrollBarSize + active: true + anchors.right: _flickable.right + anchors.rightMargin: 5 + opacity: 0 + orientation: Qt.Vertical + position: _flickable.visibleArea.yPosition + + contentItem: Rectangle { + color: Colors.backgroundRangeRect + implicitWidth: 6 + radius: width / 2 + width: 3 + } + } onVisibleChanged: {