Index: sources/gui/qml/dialogs/NotificationDialog.qml =================================================================== diff -u -r4bb515b8b2cd9791b6411dd7d596767f2d0c0644 -r0975a67dd4e4673b9a7b226bfea02cbfa489c418 --- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 4bb515b8b2cd9791b6411dd7d596767f2d0c0644) +++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 0975a67dd4e4673b9a7b226bfea02cbfa489c418) @@ -21,6 +21,7 @@ // Qml imports import "qrc:/globals" import "qrc:/components" +import "qrc:/compounds" /*! * \brief Contains the Alarm Dialog Implementation @@ -43,6 +44,7 @@ property bool resumeVisible : false property bool rinsebackVisible : false + property bool temporaryBreakVisible: false property bool endVisible : false property bool okVisible : false property bool minVisible : true @@ -60,6 +62,7 @@ signal listClicked() signal resumeClicked() + signal temporaryBreakClicked() signal rinsebackClicked() signal endClicked() signal okClicked() @@ -121,118 +124,113 @@ bottom : _timerRect.top } - Item { id: _infoItem + AutoStepController { id: _autoStepController anchors { left : parent.left - leftMargin : Variables.defaultMargin * 2 + leftMargin : Variables.defaultMargin * 4 top : parent.top - topMargin : Variables.defaultMargin * 3 + topMargin : Variables.defaultMargin * 2 } - height : 35 - width : parent.width / 2 - NotificationBarSmall { id: _infoNotificationBar - color : "transparent" - imageSource : "qrc:/images/iHelp" - imageVisible : true - text : qsTr("TAP THE STEP NUMBER TO VIEW THE CORRESPONDING IMAGES") - textColor : "#595959" - imageDiameter : 25 - imageTopMargin : 3 - } + onTriggered : _listView.currentIndex = (_listView.currentIndex + 1) % _listView.count } - Row { id: _alarmContentRow + ListView {id: _listView anchors { - top : _infoItem.bottom + top : _autoStepController.bottom + topMargin : Variables.defaultMargin * 3 bottom : parent.bottom left : parent.left leftMargin : Variables.defaultMargin * 4 - right : parent.right - rightMargin : Variables.defaultMargin * 3 - margins : Variables.defaultMargin - } - spacing : Variables.defaultMargin * 3 - width : _descriptionRect.width - ListView {id: _listView - height : _alarmContentRow.height - width : parent.width * 0.65 - currentIndex: 0 - interactive : false - clip : true + height : _descriptionRect.height + width : _descriptionRect.width / 2 + currentIndex: 0 + interactive : false + clip : true - delegate: Item { id: _delegateControl - width : _listView.width - height : Variables.instructionHeight - clip : true + onCurrentIndexChanged: { + var item = model.get(_listView.currentIndex) + _root.figureImageSource = item.image ?? "" + _autoStepController.refresh() + } - Rectangle { id: _stepRect - height : 40 - width : height - radius : height - color : Colors.backgroundMainMenu + delegate: Item { id: _delegateControl + width : _listView.width + height : Variables.instructionHeight + clip : true - Text { id: _stepNumberRect - anchors.centerIn: parent - text : index + 1 - color : Colors.white - font.pixelSize : 20 - font.weight : Font.Medium - } + Rectangle { id: _stepRect + height : 40 + width : height + radius : height + color : _delegateControl.ListView.isCurrentItem ? Colors.backgroundMainMenu : Colors.offWhite + border { + color: Colors.backgroundMainMenu + width: 2 + } - layer.enabled : true - layer.effect : DropShadow { id: _dropShadow - horizontalOffset: 0 - verticalOffset : 3 - radius : 3.0 - samples : 7 - color : "#50000000" - source : _stepRect - anchors.fill : _stepRect - } + Text { id: _stepNumberRect + anchors.centerIn: parent + text : index + 1 + color : _delegateControl.ListView.isCurrentItem ? Colors.offWhite : Colors.backgroundMainMenu + font.pixelSize : 20 + font.weight : Font.Medium } - Text { id: _delegateText - anchors { - left : _stepRect.right - leftMargin : Variables.defaultMargin - right : _delegateControl.right - } - height : parent.height - width : parent.width - font.pixelSize : 23 - font.weight : _delegateControl.ListView.isCurrentItem ? Font.DemiBold : Font.Normal - color : _delegateControl.ListView.isCurrentItem ? "#18559E" : Colors.alarmDialogText - text : model.instruction - wrapMode : Text.WordWrap + layer.enabled : true + layer.effect : DropShadow { id: _dropShadow + horizontalOffset: 0 + verticalOffset : 3 + radius : 3.0 + samples : 7 + color : "#50000000" + source : _stepRect + anchors.fill : _stepRect } + } - MouseArea { - anchors.fill: parent - onClicked: { - if (_listView.currentIndex !== index) { - _listView.currentIndex = index - _root.figureImageSource = model.image - } - } + Text { id: _delegateText + anchors { + left : _stepRect.right + leftMargin : Variables.defaultMargin + right : _delegateControl.right } + height : parent.height + width : parent.width + font.pixelSize : Fonts.fontPixelInstructionStep + font.weight : _delegateControl.ListView.isCurrentItem ? Font.DemiBold : Font.Normal + color : _delegateControl.ListView.isCurrentItem ? "#18559E" : Colors.alarmDialogText + text : model.instruction + wrapMode : Text.WordWrap } - } - Item { id: _imageContainer - width: parent.width * 0.30 - height: _alarmContentRow.height - Variables.defaultMargin - anchors.verticalCenter: parent.verticalCenter - - Image { id: _figureImage - width: parent.width - height: parent.height - fillMode: Image.PreserveAspectFit + MouseArea { + anchors.fill: parent + onClicked: _listView.currentIndex = index } } } + + Image { id: _figureImage + anchors{ + right : parent.right + bottom : parent.bottom + bottomMargin: Variables.defaultMargin * 3 + } + } + // TODO TEST ON NEW DISPLAY AND ADD BACK IN +// InteractiveImage { id: _figureImage +// anchors { +// right : parent.right +// bottom : parent.bottom +// bottomMargin : Variables.defaultMargin * 3 + +// } +// width : parent.width / 2 +// height : _listView.height +// } } Rectangle { id: _timerRect @@ -293,15 +291,15 @@ } Row { id: _buttonGroup - property int buttonsWidth : 250 + property int buttonsWidth : 350 spacing: 50 anchors { bottom : parent.bottom horizontalCenter: parent.horizontalCenter rightMargin : spacing leftMargin : spacing - bottomMargin : Variables.defaultMargin * 2 + bottomMargin : Variables.defaultMargin * 4 } // IMPORTANT NOTE : Alarm Dialog buttons @@ -314,32 +312,46 @@ TouchRect { id : _resumeTouchRect visible : resumeVisible onPressed : resumeClicked() - text.text : qsTr("RESUME") + text.text : qsTr("Resume") width : _buttonGroup.buttonsWidth isDefault : true backgroundColor: Colors.white fgColor : isPressed ? Colors.white : borderColor selectColor : Qt.darker(borderColor, 1.15) + pixelSize : Fonts.fontPixelNotification } + TouchRect { id : _temporaryBreak + visible : temporaryBreakVisible + onPressed : temporaryBreakClicked() + text.text : qsTr("Temporary Break") + width : _buttonGroup.buttonsWidth + backgroundColor: Colors.white + fgColor : isPressed ? Colors.white : borderColor + selectColor : Qt.darker(borderColor, 1.15) + pixelSize : Fonts.fontPixelNotification + } + TouchRect { id : _rinsebackTouchRect visible : rinsebackVisible onPressed : rinsebackClicked() - text.text : qsTr("RINSEBACK") + text.text : qsTr("Return Blood & End Treatment") width : _buttonGroup.buttonsWidth backgroundColor: Colors.white fgColor : isPressed ? Colors.white : borderColor selectColor : Qt.darker(borderColor, 1.15) + pixelSize : Fonts.fontPixelNotification } TouchRect { id : _endTouchRect visible : endVisible onPressed : endClicked() - text.text : qsTr("END TREATMENT") + text.text : qsTr("End Treatment Only") width : _buttonGroup.buttonsWidth backgroundColor: Colors.white fgColor : isPressed ? Colors.white : borderColor selectColor : Qt.darker(borderColor, 1.15) + pixelSize : Fonts.fontPixelNotification } TouchRect { id : _okTouchRect @@ -350,6 +362,7 @@ backgroundColor: Colors.white fgColor : isPressed ? Colors.white : borderColor selectColor : Qt.darker(borderColor, 1.15) + pixelSize : Fonts.fontPixelNotification } } @@ -360,7 +373,7 @@ left : parent.left bottom : parent.bottom leftMargin : Variables.defaultMargin * 3 - bottomMargin: Variables.defaultMargin * 4 + bottomMargin: Variables.defaultMargin } color : Colors.alarmDialogGreyText font.pixelSize : Fonts.fontPixelAlarmID