Index: sources/gui/qml/pages/treatment/TreatmentBegin.qml =================================================================== diff -u -r66e87ea403ec12a273553284919684282d87bc6a -rdf74454a7a75eb63ac577739c1fd0f179e479f44 --- sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision 66e87ea403ec12a273553284919684282d87bc6a) +++ sources/gui/qml/pages/treatment/TreatmentBegin.qml (.../TreatmentBegin.qml) (revision df74454a7a75eb63ac577739c1fd0f179e479f44) @@ -15,8 +15,6 @@ // Qt import QtQuick 2.12 -import QtQuick.Controls 2.12 -import QtQuick.Layouts 1.12 // Project // Qml imports @@ -30,92 +28,116 @@ */ ScreenItem { id: _root objectName: "_treatmentBegin" - backgroundRect.color: Colors.backgroundMainMenu - signal clickedBack() - signal clickedStart() + property alias ufVolume : _volumeSlider.value + property alias reasonText : _notification.text + signal backClicked () + signal startClicked() + + QtObject { id: _private + property real minimum : 0.000 + property real maximum : 8.000 + } + TopMenuBarCreateTreatment { id: _topMenuBar anchors.top: parent.top anchors.left: parent.left width: parent.width onClickedBack: { - _root.clickedBack(); - + _root.backClicked(); } state: "begin" } - Flickable { id: _flickable - objectName: "_treatmentBeginFlickable" - anchors.top: _topMenuBar.bottom - anchors.left: parent.left - anchors.bottom: parent.bottom - width: parent.width - contentWidth: parent.width - contentHeight: _column.implicitHeight - clip: true - flickDeceleration: Variables.createTreatmentFlickableDeceleration + Text { id: _textTitle + visible : true + color : "white" + text : qsTr("Begin Treatment") + font.pixelSize : Fonts.fontPixelTitle + anchors { + horizontalCenter: parent.horizontalCenter + top : parent.top + topMargin : 150 + } + } - function setInteractive(isInteractive) { - _flickable.interactive = isInteractive + Text { id: _textLabel + visible : true + color : "white" + text : qsTr("Ultrafiltration Volume") + " " + Variables.unitTextUltrafiltrationVolume + font { + pixelSize : Fonts.createTreatmentFontSize } + anchors { + left : _volumeSlider.left + bottom : _volumeSlider.top + bottomMargin : 45 + } + } - ScrollBar.vertical: ScrollBar { id: _scrollBar - anchors.right: _flickable.right - anchors.rightMargin: 3 - contentItem: Rectangle { - color: Colors.backgroundRangeRect - implicitWidth: 6 - radius: width / 2 - width: 3 - } + Text { id: _textValue + visible : true + color : "white" + text : _root.ufVolume.toFixed(vTreatmentUltrafiltration.precision) + font { + pixelSize : Fonts.createTreatmentFontSize } + anchors { + right : _volumeSlider.right + bottom : _volumeSlider.top + bottomMargin : 45 + } + } - Column { id: _column - spacing: Variables.treatmentSpacing - anchors.horizontalCenter: parent.horizontalCenter; - anchors.fill: parent; + Slider { id: _volumeSlider + anchors { + horizontalCenter: parent.horizontalCenter + top: parent.top + topMargin: 425 + } + isActive: false + width : parent.width / 2 + height : 5 + step : 0.100 + stepSnap: true + ticks : false + diameter: Variables.sliderCircleDiameter + decimal : vTreatmentUltrafiltration.precision + minimum : _private.minimum + maximum : _private.maximum + minText.font.pixelSize: Fonts.fontPixelFluidText + maxText.font.pixelSize: Fonts.fontPixelFluidText + onPressed: isActive = true + } - Text { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; - text: qsTr("Begin Treatment") - color: Colors.textMain - font.pixelSize: Fonts.fontPixelTitle - } - - SliderCreateTreatment { - id: _ultrafiltration - objectName: "_ultrafiltration" - sliderObjectName: objectName + "Slider" - selectedValueObjectName: objectName + "Value" - text: "Ultrafiltration Volume" - units: qsTr("mL") - min: vTreatmentBegin.ufVolumeMin - max: vTreatmentBegin.ufVolumeMax - step: vTreatmentBegin.ufVolumeRes - onPressed: { - _flickable.setInteractive(false) - vTreatmentBegin.ufVolume = value - } - onReleased: { - vTreatmentBegin.ufVolume = value - _flickable.setInteractive(true) - } - } - - TouchRect { id : _continueRect - objectName: "_treatmentBeginStartButton" - anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("START") - button.onClicked: { - _root.clickedStart() - } - } + TouchRect { id: _startButton + objectName: "_treatmentBeginStartButton" + width : 515 + height : 70 + anchors { + top: parent.top + topMargin: 650 + horizontalCenter: parent.horizontalCenter } + disabled: ! _volumeSlider.isActive + backgroundColor: Colors.backgroundButtonSelect + text { + text: qsTr("START") + font.weight : Font .DemiBold + font.pixelSize: Fonts.fontPixelUltrafiltrationAdjustmentButton + } + onClicked: { + _root.startClicked() + } } + NotificationBar { id: _notification + iconVisible: false + } + onVisibleChanged: { + _notification.text = "" if (visible) { _mainMenu.hidden = true }