Index: sources/gui/qml/components/Circle.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/components/Circle.qml (.../Circle.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/Circle.qml (.../Circle.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -16,6 +16,7 @@ // Qt import QtQuick 2.12 import QtQuick.Shapes 1.12 +import QtGraphicalEffects 1.0 // Project @@ -29,6 +30,7 @@ Item { id: _root property alias thickness : _path.strokeWidth property alias color : _path.strokeColor + property alias shape : _shape property alias shadow : _rectangle.border property int shadowEdge : 1 property alias fillColor : _rectangle.color @@ -39,6 +41,10 @@ property real diameter : Variables.circleNormalDiameter + property bool showGradient : false + property bool runAnimation : false + property color startGradientColor : _root.color + width : diameter height : diameter @@ -62,6 +68,7 @@ strokeColor: Colors.borderButton strokeWidth: 1 capStyle: ShapePath.RoundCap + PathAngleArc { id: _arc centerX: _root.width / 2 centerY: _root.height / 2 @@ -72,5 +79,45 @@ } } } + + ConicalGradient { + id: borderGradient + + anchors.fill: _shape + angle: -5 + source: _shape + + gradient: Gradient { + GradientStop { position: 0.4; color: showGradient ? _root.startGradientColor :_root.color } + GradientStop { position: 1.0; color: _root.color } + } + } + + OpacityAnimator { target: borderGradient + from : 0.2 + to : 1 + duration : 1000 + running : ! runAnimation + onFinished : { + var tmp = from + from = to + to = tmp + ! runAnimation ? restart() : target.opacity = 1 + } + } + + OpacityAnimator { target: _shape + from : 0.2 + to : 1 + duration : 1000 + running : ! runAnimation + onFinished : { + var tmp = from + from = to + to = tmp + ! runAnimation ? restart() : target.opacity = 1 + } + } + } } Index: sources/gui/qml/components/ProgressCircle.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/components/ProgressCircle.qml (.../ProgressCircle.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/ProgressCircle.qml (.../ProgressCircle.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -30,6 +30,7 @@ property alias diameter : _circle.diameter property alias thickness : _circle.thickness property color color : Colors.borderButton + property alias circle : _circle width : _circle.width height : _circle.height Index: sources/gui/qml/components/TimeText.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/TimeText.qml (.../TimeText.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -28,6 +28,7 @@ objectName: "_TimeText" //SquishQt testability property int seconds : 0 property bool secondsVisible : true + property int secondsLeftMargin : 0 property bool hourZero : true property bool minuteZero : true @@ -101,6 +102,7 @@ color: _root.textColor horizontalAlignment: Text.AlignLeft anchors.left: _minuteText.right + anchors.leftMargin: _root.secondsLeftMargin anchors.baseline: _timeSeparator.baseline } } Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -rdb6925e589ca85f2272af31d5f90f41452b342a7 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision db6925e589ca85f2272af31d5f90f41452b342a7) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -43,7 +43,8 @@ readonly property color backgroundSlider : "#195187" readonly property color treatmentSectionHeader : "#1A2E42" readonly property color treatmentSectionMain : "#1A3046" - readonly property color treatmentFlowComponent : "#1F3D5A" + readonly property color mainTreatmentLighterBlue : "#1F3D5A" + readonly property color mainTreatmentDarkerBlue : "#142C49" readonly property color sliderHighlightColor : "orange" readonly property color sliderProgressBorderActive : white Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rdb6925e589ca85f2272af31d5f90f41452b342a7 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision db6925e589ca85f2272af31d5f90f41452b342a7) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -92,7 +92,7 @@ readonly property int progressbarRectHeight : 50 readonly property int progressbarRectWidth : 620 - readonly property int circleNormalDiameter : 350 + readonly property int circleNormalDiameter : 425 readonly property int progressCircleDiameterNormal : circleNormalDiameter readonly property int progressCircleDiameterSmall : 150 readonly property int opacityAnimationDuration : 1200 Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rdb6925e589ca85f2272af31d5f90f41452b342a7 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision db6925e589ca85f2272af31d5f90f41452b342a7) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -64,7 +64,7 @@ width : height radius : height color: "transparent" - border.color: _treatmentParametersMonitor.editEnabled ? "#6697D2" : + border.color: treatmentFlows.editEnabled ? "#6697D2" : "#A47E38" border.width: 3 @@ -75,17 +75,17 @@ height : 80 width : 80 fillMode: Image.PreserveAspectFit - source : _treatmentParametersMonitor.editEnabled ? "qrc:/images/iUnlock" : - "qrc:/images/iLock" + source : treatmentFlows.editEnabled ? "qrc:/images/iUnlock" : + "qrc:/images/iLock" } Rectangle { id: _innerCircle objectName: "lockDialogInnerCircle" anchors.centerIn: parent color: "transparent" - border.color: _treatmentParametersMonitor.editEnabled ? "#8FC1FE" : - "#CDAF78" + border.color: treatmentFlows.editEnabled ? "#8FC1FE" : + "#CDAF78" border.width: 2 height: parent.height - 20 width: height @@ -111,18 +111,11 @@ spacing: Variables.defaultMargin height: cellHeight - Rectangle { // TIMER GOES HERE - color: "cyan" + TreatmentTime { id: _treatmentTime + objectName: "treatmentTime" width: (cellWidth * 2) - (Variables.defaultMargin * 2) height: cellHeight - - TreatmentTime { id: _treatmentTime - objectName: "treatmentTime" - - onClicked: { - sectionTimeClicked() - } - } + onClicked: sectionTimeClicked() } TreatmentSaline { id: treatmentSaline @@ -199,13 +192,6 @@ } } -// // ---------- Center -// TreatmentTime { id: _treatmentTime -// onClicked: { -// sectionTimeClicked() -// } -// } - onVisibleChanged: { if (visible) { _mainMenu.hidden = true Index: sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml =================================================================== diff -u -rdb6925e589ca85f2272af31d5f90f41452b342a7 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision db6925e589ca85f2272af31d5f90f41452b342a7) +++ sources/gui/qml/pages/treatment/TreatmentSectionIcon.qml (.../TreatmentSectionIcon.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -23,12 +23,13 @@ property alias iconImage : _iconImage property int iconSize : Variables.treatmentSectionIconSize - width : iconSize - height : iconSize - radius : iconSize + width : iconSize + 20 + height : iconSize + 20 + radius : height border.color: "transparent" Image { id : _iconImage + anchors.centerIn: parent height : iconSize width : iconSize fillMode: Image.PreserveAspectFit Index: sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml =================================================================== diff -u -rdb6925e589ca85f2272af31d5f90f41452b342a7 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision db6925e589ca85f2272af31d5f90f41452b342a7) +++ sources/gui/qml/pages/treatment/sections/TreatmentFlows.qml (.../TreatmentFlows.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -42,7 +42,7 @@ TreatmentFlowsComponent { id: _bloodFlow objectName : "bloodFlowComponent" title : qsTr("Blood Flow") - height : contentItem.height // 2 + height : contentItem.height width : _row.cellWidth value : "320"//Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) unitText : Variables.unitTextFlowRate @@ -55,11 +55,12 @@ TreatmentFlowsComponent { id: _dialysateFlow objectName : "dialysateFlowComponent" title : qsTr("Dialysate Flow") - height : contentItem.height // 2 + height : contentItem.height width : _row.cellWidth value : Variables.notSetVariable(vTreatmentBloodFlow.dialysateFlow_PresFlow) unitText : Variables.unitTextFlowRate - buttonsEnabled : editEnabled + buttonsEnabled : editEnabled // TODO + extraText : "OFF" // TODO onIncrement : print(" increment dial flow") onDecrement : print(" decrement dial flow") @@ -68,11 +69,11 @@ TreatmentFlowsComponent { id: _dialysateTemp objectName : "dialysateTempComponent" title : qsTr("Dialysat Temp.") - height : contentItem.height // 2 + height : contentItem.height width : _row.cellWidth value : Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) unitText : Variables.unitTextTemperature - buttonsEnabled : editEnabled + buttonsEnabled : editEnabled // TODO onIncrement : print(" increment dial temp") onDecrement : print(" decrement dial temp") @@ -81,7 +82,7 @@ TreatmentFlowsComponent { id: _dialysateCond objectName : "dialysateCondComponent" title : qsTr("Dialysate Cond.") - height : contentItem.height // 2 + height : contentItem.height width : _row.cellWidth value : Variables.notSetVariable(vTreatmentBloodFlow.bloodFlow_PresFlow) unitText : Variables.unitTextDialCond Index: sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml =================================================================== diff -u -r7805806e4370be4d9207872e916f478875bd4ba6 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) +++ sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -106,7 +106,6 @@ top : header.bottom topMargin : Variables.defaultMargin right : parent.right - rightMargin : Variables.defaultMargin } iconSize : 70 Index: sources/gui/qml/pages/treatment/sections/TreatmentTime.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r68757118f0b5dc5d831f8330ff3fec40dc461aa9 --- sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/treatment/sections/TreatmentTime.qml (.../TreatmentTime.qml) (revision 68757118f0b5dc5d831f8330ff3fec40dc461aa9) @@ -26,88 +26,105 @@ * \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 int timeTextValue : 30000//vTreatmentTime.time_Remaining property bool isRunning : vHDTreatmentStates.txDialysis && - !( vHDTreatmentStates.sbWaitPump || vHDTreatmentStates.sbRunning ) + !( vHDTreatmentStates.sbWaitPump || vHDTreatmentStates.sbRunning ) signal clicked() - anchors.centerIn: parent - width : _circle.width - height: _circle.height color: "transparent" + width: _circle.width + height: _circle.height ProgressCircle { id: _circle - minimum: _root.minimum - maximum: _root.maximum + objectName: "circle" - anchors.centerIn : parent - value: _root.progressValue + minimum: 0//_root.minimum + maximum: 60//_root.maximum + + anchors.fill : parent + value: 45//_root.progressValue + thickness : 30 + circle.shadow.color: Colors.mainTreatmentLighterBlue + circle.fillColor: Colors.mainTreatmentDarkerBlue + circle.showGradient: _root.isRunning + circle.runAnimation: _root.isRunning + circle.startGradientColor: "#2A5A93" +// circle.opacity: 0 + color: _root.isRunning ? Colors.borderButton : "#9B864E" } TimeText { id: _timeText + objectName: "timeText" + anchors.centerIn : parent seconds : _root.timeTextValue secondsVisible: _root.isRunning + 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 + objectName: "timeTitle" text: qsTr("Time Remaining") + anchors { + horizontalCenter: parent.horizontalCenter + } + font.pixelSize: 26 + font.weight: Font.Normal color: Colors.textMain + } - 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" + TreatmentSectionIcon { id : _editTimeIcon + objectName: "editTimeIcon" + anchors { + bottom: _timeTitle.top + bottomMargin: Variables.defaultMargin + horizontalCenter: parent.horizontalCenter } + iconSize : 30 + iconImage.source : "qrc:/images/iEdit" + onClicked : _root.isRunning = ! _root.isRunning // REMOVE Testing***********8 +// onClicked : _root.clicked() } } NotificationBarSmall { id: _notification + objectName: "notification" + + anchors { + left: _timeTitleRect.left + leftMargin: Variables.defaultMargin + top: _timeTitleRect.bottom + topMargin: Variables.defaultMargin + } + visible : ! _root.isRunning height : 25 - imageAutoSize: false - imageAnimated: true color: "transparent" - anchors { - leftMargin : 80 - bottomMargin: 80 - } - imageSource : "qrc:/images/iPauseGray" + imageSource : "qrc:/images/iPauseOrange" text : qsTr("Treatment Paused") - textColor : "gray" - textfontSize: 16 - rowAnchors.centerIn: null + textColor : "#FFB836" + textfontSize: 26 } - - MouseArea { id: _mouseArea - anchors.fill: parent - onClicked: { - if (_root.isRunning) { - _root.clicked() - } - } - } }