Index: sources/gui/qml/pages/treatment/TreatmentStart.qml =================================================================== diff -u -r9e57e4c990afab0996def98521d4f9fee83f96d8 -rca1be6d62d36d8da766bd05d1df2ce1488344dee --- sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision 9e57e4c990afab0996def98521d4f9fee83f96d8) +++ sources/gui/qml/pages/treatment/TreatmentStart.qml (.../TreatmentStart.qml) (revision ca1be6d62d36d8da766bd05d1df2ce1488344dee) @@ -15,6 +15,7 @@ // Qt import QtQuick 2.12 import QtQuick.Controls 2.12 +import QtQuick.Shapes 1.12 // Project import Gui.Actions 0.1; @@ -32,7 +33,6 @@ property int bloodFlow_MeasuredFlow_Precision: 0 property int dialysateInletFlow_MeasuredFlow_Precision: 0 - property int leftColumnX : 40 property int rightColumnX : 875 @@ -71,6 +71,57 @@ TreatmentInfusion { id: _solutionInfusionTouchArea } + // Time Remaining + Rectangle { id: _timeRemaining + property int value: 0 + property int minimum: 0 + property int maximum: 360 + + QtObject { id: _private + property int length: ((360 * (_timeRemaining.value - _timeRemaining.minimum)) / (_timeRemaining.maximum - _timeRemaining.minimum)) + } + + anchors.centerIn: parent + width: 336 + height: 336 + radius: width + color: "Transparent" + border.width: 2 + border.color: Colors.backgroundMainMenu + Shape { id: _shape + width: parent.width + height: parent.height + layer.enabled: true + layer.smooth: true + layer.textureSize: Qt.size(_shape.width * 2, _shape.height * 2) + ShapePath { + fillColor: "Transparent" + strokeColor: Colors.borderButton + strokeWidth: 2 + PathAngleArc { + centerX: _timeRemaining.width / 2 + centerY: _timeRemaining.height / 2 + radiusX: 167 + radiusY: 167 + startAngle: -90 + sweepAngle: _private.length + } + } + } + Text { id: _timeRemainingText + text:"04:37" + font.pixelSize: 90 + font.weight: Font.ExtraLight + color: "white" + anchors.centerIn: parent + } + NumberAnimation on value { duration: 5000 + from: _timeRemaining.minimum + to : _timeRemaining.maximum + loops: Animation.Infinite + } + } + onVisibleChanged: { if (visible) { _mainMenu.hidden = true