Index: sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml =================================================================== diff -u -r88563177f10f20ced98750b2e40036201728131d -r8a5dbf556a66524fbe4b60ac1573182a0bd27617 --- sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision 88563177f10f20ced98750b2e40036201728131d) +++ sources/gui/qml/pages/endtreatment/rinseback/EndTreatmentRinsebackInit.qml (.../EndTreatmentRinsebackInit.qml) (revision 8a5dbf556a66524fbe4b60ac1573182a0bd27617) @@ -20,146 +20,48 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/endtreatment" /*! * \brief the end treatment rinseback setup screen */ -ScreenItem { id: _root +EndTreatmentBase { id: _root objectName: "_EndTreatmentRinsebackInit" - property alias reasonText : _notification.text - signal treatmentBackClicked () signal rinsebackClicked () signal treatmentEndClicked () - QtObject { id: _private - property int sectionSpace : 30 - property int sectionWidth : _root.width * 2/3 - sectionSpace * 1.5 - property int sectionHeight: _root.width * 1/3 - sectionSpace * 1.5 - } - Text { id: _title - anchors { - top: parent.top - topMargin: 65 - horizontalCenter: parent.horizontalCenter - } - color: Colors.white - text: qsTr("Rinseback Setup") - font.pixelSize: Fonts.fontPixelTitle - } + title.text : qsTr("Rinseback Setup") + instructionBased : true - TimeText { id: timeout - visible : vTreatmentRinseback.timeoutTotal - anchors { - horizontalCenter: parent.horizontalCenter - top : _title.bottom - topMargin : 15 - } - textPixelSize : 30 - textWeight : Font.Normal - // the TimeText component works with hour and minute mainly - // so changing the seconds to minuts was easier than changing the component - secondsVisible : false - seconds : vTreatmentRinseback.timeoutCountDown * 60 - } + hasTimeout : vTreatmentRinseback .timeoutTotal + timeoutValue : vTreatmentRinseback .timeoutCountDown * 60 - Rectangle { - color : Colors.backgroundDialog - width : _private.sectionWidth - height : _private.sectionHeight - border.width: 2 - border.color: Colors.borderDisableButton - radius: 10 - anchors { - verticalCenter: parent.verticalCenter - left: parent.left - leftMargin: _private.sectionSpace - } - Column { - spacing : 10 - anchors.fill: parent - anchors.margins: _private.sectionSpace - Text { id: _titleSteps - anchors.left: parent.left - color: Colors.white - text: qsTr("Please Follow The Steps") - font.pixelSize: Fonts.fontPixelButton + footer { + width : parent.width + height : Variables.touchRectHeight + } + FooterStatic { + childrenWidth : 300 + anchors.fill : footer + children : [ + TouchRect { id : _backTreatmentTouchRect + visible : vTreatmentTime .time_IsLeft + text.text : qsTr("BACK TO TREATMENT") + onClicked : treatmentBackClicked() + }, + TouchRect { id : _beginRinsebackTouchRect + visible : true + isDefault : true + text.text : qsTr("START RINSEBACK") + onClicked : rinsebackClicked() + }, + TouchRect { id : _endTreatmentTouchRect + visible : vTreatmentTime .time_IsLeft + text.text : qsTr("END TREATMENT") + onClicked : treatmentEndClicked() } - - Text { id: _steps - anchors.left: parent.left - anchors.leftMargin: _private.sectionSpace - color: Colors.white - text: qsTr("First Step\nSecond Step\nThird Step\n") - font.pixelSize: Fonts.fontPixelButton - } - } + ] } - - Rectangle { - color : Colors.backgroundDialog - width : _private.sectionHeight - height : _private.sectionHeight - border.width: 2 - border.color: Colors.borderDisableButton - radius: 10 - anchors { - verticalCenter: parent.verticalCenter - right: parent.right - rightMargin: _private.sectionSpace - } - Text { id: _visualAID - anchors.centerIn: parent - color: Colors.white - text: qsTr("Visual AID\nplaceholder") - font.pixelSize: Fonts.fontPixelButton - } - } - - Row { id: _buttonGroup - property int buttonsWidth : 300 - spacing: 75 - - anchors { - bottom : parent.bottom - horizontalCenter: parent.horizontalCenter - rightMargin : spacing - leftMargin : spacing - bottomMargin : spacing - } - - TouchRect { id : _backTreatmentTouchRect - visible : vTreatmentTime.time_Total > 0 - text.text : qsTr("BACK TO TREATMENT") - width : _buttonGroup.buttonsWidth - onClicked : treatmentBackClicked() - } - - TouchRect { id : _beginRinsebackTouchRect - visible : true - text.text : qsTr("START RINSEBACK") - width : _buttonGroup.buttonsWidth - isDefault : true - onClicked : rinsebackClicked() - } - - TouchRect { id : _endTreatmentTouchRect - visible : vTreatmentTime.time_Total > 0 - text.text : qsTr("END TREATMENT") - width : _buttonGroup.buttonsWidth - onClicked : treatmentEndClicked() - } - } - - NotificationBar { id: _notification - iconVisible: false - } - - onVisibleChanged: { - _notification.text = "" - if (visible) { - _mainMenu.hidden = true - } - } }