Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r4f7e0c9f1b844d4dfcd23c9d3bcd4d0200b1ae47 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 4f7e0c9f1b844d4dfcd23c9d3bcd4d0200b1ae47) @@ -21,93 +21,109 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/pages/treatment" /*! * \brief Treatment Screen Treatment Time Remaining section */ Rectangle { id: _root - objectName: "TreatmentTime" property int minimum : 0 property int maximum : vTreatmentTime.time_Total property int progressValue : vTreatmentTime.time_Elapsed property int timeTextValue : vTreatmentTime.time_Remaining property bool isRunning : vHDTreatmentStates.txDialysis && - !( vHDTreatmentStates.sbWaitPump || vHDTreatmentStates.sbRunning ) + !( vHDTreatmentStates.sbWaitPump || vHDTreatmentStates.sbRunning ) + color : "transparent" + width : _circle.width + height : _circle.height + signal clicked() - anchors.centerIn: parent - width : _circle.width - height: _circle.height - color: "transparent" - ProgressCircle { id: _circle - minimum: _root.minimum - maximum: _root.maximum + objectName : "circle" + minimum : _root.minimum + maximum : _root.maximum - anchors.centerIn : parent - value: _root.progressValue + anchors.fill : parent + value : _root.progressValue + thickness : 35 + circleShadowColor : Colors.mainTreatmentLighterBlue + circleFillColor : Colors.mainTreatmentDarkerBlue + runAnimation : _root.isRunning } TimeText { id: _timeText - anchors.centerIn : parent - seconds : _root.timeTextValue - secondsVisible: _root.isRunning + objectName: "timeText" + + anchors { + centerIn : parent + horizontalCenterOffset : -Variables.defaultMargin + } + seconds : _root.timeTextValue + textWeight : Font.Normal + secsPixelSize : 35 + secondsLeftMargin : 10 } - Rectangle { id: _timeTitleRect - color: "Transparent" - anchors.horizontalCenter: _timeText.horizontalCenter - anchors.bottom: _timeText.top + Item { id: _timeTitleRect + objectName: "timeTextRect" - width : _timeTitle.width + _arrowImage.width + _arrowImage.anchors.leftMargin - height : _timeTitle.height + anchors { + horizontalCenter: _root.horizontalCenter + bottom : _timeText.top + bottomMargin : Variables.defaultMargin * 2 + } + width : _root.width + Text { id: _timeTitle - text: qsTr("Time Remaining") + objectName : "timeTitle" + text : qsTr("Time Remaining") - font.pixelSize: 26 - color: Colors.textMain + anchors { + horizontalCenter: parent.horizontalCenter + } - anchors.left: parent.left - Image { id: _arrowImage - visible: _root.isRunning - anchors.left : parent.right - anchors.bottom: parent.baseline - anchors.leftMargin: 10 - width : Variables.arrowWidth - height: Variables.arrowHeight - source: "qrc:/images/iArrowRight" + font.pixelSize : 26 + font.weight : Font.Normal + color : Colors.textMain + } + + IconButton { id : _editTimeIcon + objectName: "editTimeIcon" + anchors { + bottom: _timeTitle.top + bottomMargin: Variables.defaultMargin + horizontalCenter: parent.horizontalCenter } + iconSize : 30 + iconImageSource : "qrc:/images/iEdit" + onClicked : _root.clicked() } } NotificationBarSmall { id: _notification - visible : ! _root.isRunning - height : 25 - imageAutoSize: false - imageAnimated: true - color: "transparent" + objectName: "notification" + anchors { - leftMargin : 80 - bottomMargin: 80 + left : _timeTitleRect.left + leftMargin : Variables.defaultMargin + top : _timeTitleRect.bottom + topMargin : Variables.defaultMargin * 2 } - imageSource : "qrc:/images/iPauseGray" - text : qsTr("Treatment Paused") - textColor : "gray" - textfontSize: 16 - rowAnchors.centerIn: null + visible : ! _root.isRunning + height : 25 + color : "transparent" + imageDiameter : 25 + imageTopMargin : 4 + imageSource : "qrc:/images/iPauseOrange" + text : qsTr("Treatment Paused") + textColor : "#FFB836" + textfontSize : 26 + textfontWeight : Font.Medium } - - MouseArea { id: _mouseArea - anchors.fill: parent - onClicked: { - if (_root.isRunning) { - _root.clicked() - } - } - } }