Index: sources/gui/qml/pages/treatment/TreatmentPrime.qml =================================================================== diff -u -r4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac -r67371c6a2861c5e8a2328984ae999bf8df4b0bb7 --- sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision 4fab8841b1040c8eaa406713ff9bdc8c65b7b6ac) +++ sources/gui/qml/pages/treatment/TreatmentPrime.qml (.../TreatmentPrime.qml) (revision 67371c6a2861c5e8a2328984ae999bf8df4b0bb7) @@ -27,30 +27,34 @@ * which is the default screen in the "Manager" stack */ ScreenItem { id: _root - signal backClicked() - signal continueClicked() + objectName: "_treatmentPrime" backgroundRect.color: Colors.backgroundMainMenu + signal clickedBack() + signal clickedContinue() + TopMenuBarCreateTreatment { id: _topMenuBar anchors.top: parent.top anchors.left: parent.left width: parent.width - onBackClicked: { - _root.backClicked(); + onClickedBack: { + _root.clickedBack(); } state: "prime" } Flickable { id: _flickable + objectName: "_treatmentPrimeFlickable" 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 ScrollBar.vertical: ScrollBar { id: _scrollBar anchors.right: _flickable.right @@ -69,19 +73,86 @@ anchors.fill: parent; Text { id: _titleText - anchors.horizontalCenter: parent.horizontalCenter; + anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Priming") color: Colors.textMain font.pixelSize: Fonts.fontPixelTitle } - TouchRect { + ProgressCircle { id: _circle anchors.horizontalCenter: parent.horizontalCenter - text.text: qsTr("CONTINUE TO TREATMENT") + minimum: 0 + maximum: vPriming.secondsTotal + diameter: 100 + value: vPriming.primingComplete ? vPriming.secondsTotal : vPriming.secondsRemaining + + PrimingTimer { id: _timeText + anchors.centerIn: parent + seconds : vPriming.secondsRemaining + completed: vPriming.primingComplete + } + } + + Column { id: _checklist + spacing: 20 + anchors.horizontalCenter: parent.horizontalCenter + + CheckListItem { id: _checking_installation + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Checking installation" + completed: vPriming.checkingInstallationComplete + } + + CheckListItem { id: _creating_dialysate + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Creating dialysate" + completed: vPriming.creatingDialysateComplete + } + + CheckListItem { id: _priming_lines + anchors.horizontalCenter: parent.horizontalCenter + color: "transparent" + text: "Priming lines" + completed: vPriming.primingLinesComplete + } + } + + Text { id: _priming_complete + objectName: "_primingCompleteText" + anchors.horizontalCenter: parent.horizontalCenter + text: "Priming Complete!" + color: vPriming.primingComplete ? Colors.textMain : "transparent" + font.pixelSize: Fonts.primingFontSize + } + + TouchRect { id : _continueRect + objectName: "_treatmentPrimeContinueButton" + anchors.horizontalCenter: parent.horizontalCenter + text.text: vPriming.continueBtnText + enabled: vPriming.continueEnabled + onEnabledChanged: { + if (enabled) { + borderColor = Colors.primingReady + textColor = Colors.primingReady + } else { + borderColor = Colors.primingNotReady + textColor = Colors.primingNotReady + } + } + button.onClicked: { - _root.continueClicked() + _root.clickedContinue() } } + + Rectangle { + id: _spacer + height: 75 + width: parent.width + color: "transparent" + } } }