Index: leahi.qrc =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- leahi.qrc (.../leahi.qrc) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ leahi.qrc (.../leahi.qrc) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -79,11 +79,7 @@ resources/images/Unlock.png resources/images/Wifi.png resources/images/PauseOrange.png - resources/images/arrowDownActive.png - resources/images/arrowDownInactive.png resources/images/arrowsExpanding.png - resources/images/arrowUpActive.png - resources/images/arrowUpInactive.png resources/images/HomeBackground.png @@ -147,6 +143,7 @@ sources/gui/qml/components/QRCode.qml sources/gui/qml/components/ContentArea.qml sources/gui/qml/components/LabelValue.qml + sources/gui/qml/components/ArrowButton.qml sources/gui/qml/compounds/PressureRangeSlider.qml Index: sources/gui/qml/components/ArrowButton.qml =================================================================== diff -u --- sources/gui/qml/components/ArrowButton.qml (revision 0) +++ sources/gui/qml/components/ArrowButton.qml (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -0,0 +1,57 @@ +// Qt +import QtQuick 2.12 +import QtGraphicalEffects 1.12 + +import "qrc:/globals" +import "qrc:/components" + +TouchRect { id : _root + + // arrow type must be set externally + property bool upArrow : false + property bool downArrow : false + property bool leftArrow : false + property bool rightArrow : false + property bool expandingArrow: false + + property string iconImage : upArrow ? "qrc:/images/iChevronUp" : + downArrow ? "qrc:/images/iChevronDown" : + leftArrow ? "qrc:/images/iChevronLeft" : + rightArrow ? "qrc:/images/iChevronRight" : + expandingArrow ? "qrc:/images/iArrowsExpanding" : + "" + + property int iconSize : expandingArrow ? Variables.arrowIconDiameter * 2 : + Variables.arrowIconDiameter + + isDefault : true + height : expandingArrow ? iconSize - 15 : + iconSize + 20 + width : height + radius : height + disabledColor : Colors.buttonDisableColor + borderColor : Colors.transparent + borderDisabledColor: Colors.transparent + + Image { id : _iconImage + anchors.centerIn: parent + anchors.verticalCenterOffset: upArrow ? -3 : + downArrow ? 3 : + 0 + height : iconSize + width : iconSize + fillMode : Image.PreserveAspectFit + source : iconImage + } + + layer.enabled: true + layer.effect: DropShadow { id: _dropShadow + horizontalOffset: 3 + verticalOffset : 3 + radius : 3.0 + samples : 7 + color : "#50000000" + source : _root + anchors.fill : _root + } +} Index: sources/gui/qml/components/TouchRect.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/components/TouchRect.qml (.../TouchRect.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -45,6 +45,8 @@ property color textColor : Colors.textButton property color borderColor : Colors.borderButton property color backgroundColor : Colors.backgroundButtonNormal + property color disabledColor : Colors.transparent + property color borderDisabledColor: Colors.borderDisableButton property color defaultColor : backgroundColor == Colors.transparent ? Colors.backgroundButtonSelect : @@ -65,7 +67,7 @@ function color() { var mBackgroundColor = _root.backgroundColor if ( isDefault ) mBackgroundColor = _root.defaultColor - if (! enabled ) return Colors.transparent + if (! enabled ) return disabledColor if ( selectable ) if ( selected ) return Colors.backgroundButtonSelectDark else return mBackgroundColor @@ -75,7 +77,7 @@ } function borderColor() { - if ( ! enabled ) return Colors.borderDisableButton + if ( ! enabled ) return borderDisabledColor if ( selectable ) if ( selected ) { return _root.borderColor Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -76,6 +76,7 @@ readonly property color borderDisableButton : "#607A91" readonly property color boderSeparatorLine : "#476982" readonly property color borderDialog : transparent // different colors for different displays // "#D01A344D" // "#D00F0F0F" //"#F51A344D" + readonly property color buttonDisableColor : "#515050" readonly property color touchTextAreaTitle : "#a0b6d0" Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -38,7 +38,7 @@ readonly property int defaultMargin : 20 readonly property int contentHeight : 50 - readonly property int mainMenuHeight : 100 //// ----- @LEAHIZED + readonly property int mainMenuHeight : 80 //// ----- @LEAHIZED readonly property int minVGap : 15 readonly property int minVGap2 : 30 @@ -100,15 +100,16 @@ readonly property int sliderTextMargin : 20 readonly property int treatmentSpacing : 80 // 60 - readonly property int notificationHeight : 100 //// ----- @LEAHIZED + readonly property int notificationHeight : 80 //// ----- @LEAHIZED readonly property int notificationIconDiameter : 36 readonly property int checkListViewItemWidth : 350 readonly property int checkListViewItemHeight : 60 readonly property int pauseIconDiameter : 60 - readonly property int mainTreatmentIconDiameter : 45 - readonly property int topBarMenuHeight : 100 //// ----- @LEAHIZED + readonly property int arrowIconDiameter : 35 + readonly property int headerIconDiameter : 40 + readonly property int topBarMenuHeight : 80 //// ----- @LEAHIZED readonly property int sliderCircleDiameter : 30 readonly property int pressuresProgressbarWidth : 725 Index: sources/gui/qml/pages/MainStack.qml =================================================================== diff -u -r1e44d84a258f8506550b176216481bb7cab2f102 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 1e44d84a258f8506550b176216481bb7cab2f102) +++ sources/gui/qml/pages/MainStack.qml (.../MainStack.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -109,7 +109,7 @@ } MainHome { id: _mainHome - onStartTreatment : { page( _treatmentStack )} + onStartTreatment : { page( _treatmentStack )} // TODO: Remove before merging into staging. Only needed for this branch onCreateTreatment : { vPreTreatmentAdjustmentInitTreatment.doInitiate( )} onVisibleChanged: { if (visible) { Index: sources/gui/qml/pages/treatment/TreatmentHome.qml =================================================================== diff -u -rfe084f2cccb0f0a258340cc431db2d67aeea7c75 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision fe084f2cccb0f0a258340cc431db2d67aeea7c75) +++ sources/gui/qml/pages/treatment/TreatmentHome.qml (.../TreatmentHome.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -42,8 +42,8 @@ signal sectionUltrafiltrationClicked() signal logVitalTime() - readonly property int cellWidth : _root.width / 7 - 10 // = screen width / # columns - readonly property int cellHeight: _root.height / 2 - Variables.notificationHeight - Variables.defaultMargin // = screen height / # rows - header bar + readonly property int cellWidth : (_root.width / 7) - 10 // = screen width / # columns + readonly property int cellHeight: (_root.height / 2) - Variables.notificationHeight - (Variables.defaultMargin * 2) // = screen height / # rows - header bar - margin onLogVitalTime: _treatmentVitals.updateVitalTime() @@ -65,12 +65,12 @@ topMargin: Variables.defaultMargin * 3 horizontalCenter: parent.horizontalCenter } - height : 200 - width : height - radius : height - color: "transparent" + height : 200 + width : height + radius : height + color : "transparent" border.color: _treatmentFlows.editEnabled ? "#6697D2" : - "#A47E38" + "#A47E38" border.width: 2 Image { id : _iconImage @@ -80,21 +80,21 @@ height : 80 width : 80 fillMode: Image.PreserveAspectFit - source : _treatmentFlows.editEnabled ? "qrc:/images/iUnlock" : + source : _treatmentFlows.editEnabled ? "qrc:/images/iUnlock" : "qrc:/images/iLock" } Rectangle { id: _innerCircle objectName: "lockDialogInnerCircle" anchors.centerIn: parent - color: "transparent" - border.color: _treatmentFlows.editEnabled ? "#8FC1FE" : - "#CDAF78" - border.width: 1 - height: parent.height - 20 - width: height - radius : height + color : "transparent" + border.color : _treatmentFlows.editEnabled ? "#8FC1FE" : + "#CDAF78" + border.width : 1 + height : parent.height - 20 + width : height + radius : height } } } @@ -107,7 +107,7 @@ anchors { fill: parent margins: Variables.defaultMargin - topMargin : Variables.notificationHeight + (Variables.defaultMargin * 2)// FIXME: 120 - to adjust from current headerbar implementation + topMargin : Variables.notificationHeight + 30 } Row { id: _topRow Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -r7805806e4370be4d9207872e916f478875bd4ba6 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 7805806e4370be4d9207872e916f478875bd4ba6) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -59,81 +59,17 @@ MainMenu { id: _treatmentMenu position : MainMenu.Position.Top hidden : true - titles : [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin") ] - visibleItems : [ true , true , true ] + titles : [ qsTr("Treatment") ] + visibleItems : [ true ] spacing : Variables.defaultMargin leftPdding : Variables.headerBarDateTimeWidth + Variables.columnSpacing // 200 + 60 partitionWidth : 80 * titles.length// Todo Important : max width should be the width for all bottons titlePixelSize : 32 onCurrentIndexChanged: { - console.debug("INDEX + " + currentIndex) - console.debug("stackView + " + stackView.index) - console.debug("depth + " + stackView.depth) - if (stackView.depth > 2) pop() - if (currentIndex === 2) push(_treatmentHeparin) - if (currentIndex === 1) push(_treatmentTrends) - if (currentIndex === 0) pop() + if (currentIndex === 1) push(_treatmentTrends) + if (currentIndex === 0) pop() } - - Row { id: _headerButtonRow - width : 350 - height : parent.height - - spacing : Variables.defaultMargin - anchors { - right : parent.right - rightMargin : Variables.defaultMargin - } - - TouchRect { id : _prescriptionButton - width : Variables.mainMenuHeight - height : Variables.mainMenuHeight - border.color: "transparent" - - Image { id : _prescriptionImage - anchors.centerIn: parent - height : Variables.mainTreatmentIconDiameter - width : Variables.mainTreatmentIconDiameter - fillMode: Image.PreserveAspectFit - source : "qrc:/images/iPrescription" - } - - onPressed: print("Prescription button pressed!") - } - - TouchRect { id : _settingsButton - width : Variables.mainMenuHeight - height : Variables.mainMenuHeight - border.color: "transparent" - - Image { id : _settingsImage - anchors.centerIn: parent - height : Variables.mainTreatmentIconDiameter - width : Variables.mainTreatmentIconDiameter - fillMode: Image.PreserveAspectFit - source : "qrc:/images/iSettings" - } - - onPressed: print("Settings button pressed!") - } - - TouchRect { id : _wifiButton - width : Variables.mainMenuHeight - height : Variables.mainMenuHeight - border.color: "transparent" - - Image { id : _wifiImage - anchors.centerIn: parent - height : Variables.mainTreatmentIconDiameter - width : Variables.mainTreatmentIconDiameter - fillMode: Image.PreserveAspectFit - source : "qrc:/images/iWifi" - } - - onPressed: print("Wifi button pressed!") - } - } } TreatmentBloodPrime { id: _treatmentBloodPrime } Index: sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml =================================================================== diff -u -r21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (.../TreatmentFlowsComponent.qml) (revision 21bcf654a57e2b3a6d1a2fee1173c3dff81f8f99) +++ sources/gui/qml/pages/treatment/sections/TreatmentFlowsComponent.qml (.../TreatmentFlowsComponent.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -19,7 +19,6 @@ property bool showButtons : true property bool buttonsEnabled : true - property int iconSize : 70 property bool dropShadowEnabled : true color : Colors.mainTreatmentLighterBlue @@ -78,24 +77,22 @@ objectName: "column" visible: showButtons - spacing: Variables.defaultMargin + spacing: Variables.defaultMargin * 2.5 - TreatmentSectionIcon { id : _upArrowIcon - objectName : "upArrowIcon" - enabled : buttonsEnabled - iconSize : _root.iconSize - iconImage.source : enabled ? "qrc:/images/iArrowUpActive" : - "qrc:/images/iArrowUpInactive" - onClicked : _root.increment() + ArrowButton {id : _upArrowIcon + objectName : "upArrowIcon" + upArrow : true + enabled : buttonsEnabled + + onClicked : _root.increment() } - TreatmentSectionIcon { id : _downArrowIcon - objectName : "downArrowIcon" - enabled : buttonsEnabled - iconSize : _root.iconSize - iconImage.source : enabled ? "qrc:/images/iArrowDownActive" : - "qrc:/images/iArrowDownInactive" - onClicked : _root.decrement() + ArrowButton {id : _downArrowIcon + objectName : "downArrowIcon" + downArrow : true + enabled : buttonsEnabled + + onClicked : _root.decrement() } } } Index: sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml =================================================================== diff -u -r7caa737179a8c31825ae6445f593ac7ff5f95080 -r36a488a3d29449ffedfe364d0031ed74d03c0ae0 --- sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 7caa737179a8c31825ae6445f593ac7ff5f95080) +++ sources/gui/qml/pages/treatment/sections/TreatmentPressures.qml (.../TreatmentPressures.qml) (revision 36a488a3d29449ffedfe364d0031ed74d03c0ae0) @@ -107,18 +107,20 @@ } } - TreatmentSectionIcon { id : _expandingArrows + ArrowButton {id : _expandingArrows + objectName : "expandingArrows" + anchors { top : header.bottom topMargin : Variables.defaultMargin right : parent.right + rightMargin : Variables.defaultMargin } - iconSize : 65 - iconImage.source : "qrc:/images/iArrowsExpanding" - enabled : ! expandingTimer.running + expandingArrow : true + enabled : ! expandingTimer.running - onClicked : { + onClicked : { expandingTimer.start() expandAllRangeBars() }