Index: leahi.qrc
===================================================================
diff -u -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- leahi.qrc (.../leahi.qrc) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1)
+++ leahi.qrc (.../leahi.qrc) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -92,6 +92,7 @@
resources/images/CloudSync.png
resources/images/Information.png
resources/images/Storage.png
+ resources/images/help.png
sources/gui/qml/components/MainMenu.qml
@@ -139,14 +140,12 @@
sources/gui/qml/components/DebugDataColumn.qml
sources/gui/qml/components/RangeSlider.qml
sources/gui/qml/components/MuteButton.qml
- sources/gui/qml/components/UpDownButton.qml
sources/gui/qml/components/ImageText.qml
sources/gui/qml/components/WaitDone.qml
sources/gui/qml/components/TimeCircle.qml
sources/gui/qml/components/Footer.qml
sources/gui/qml/components/TextEntry.qml
sources/gui/qml/components/ScrollBar.qml
- sources/gui/qml/compounds/Fader.qml
sources/gui/qml/components/FooterStatic.qml
sources/gui/qml/components/TimeEntry.qml
sources/gui/qml/components/Label.qml
@@ -157,6 +156,7 @@
sources/gui/qml/components/LabelValue.qml
sources/gui/qml/components/ArrowButton.qml
sources/gui/qml/components/HeaderBar.qml
+ sources/gui/qml/components/AlarmButtonRow.qml
sources/gui/qml/compounds/PressureRangeSlider.qml
Index: sources/gui/qml/AlarmItem.qml
===================================================================
diff -u -r43ae56f762e6f3e1416d39e3d16f9103fc597e41 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 43ae56f762e6f3e1416d39e3d16f9103fc597e41)
+++ sources/gui/qml/AlarmItem.qml (.../AlarmItem.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -39,7 +39,7 @@
VAlarmStatus { id: vAlarmStatus }
VAlarmActiveList { id: vAlarmActiveList }
- readonly property alias backgroundColor: _alarmDialog.backgroundColor
+ readonly property alias backgroundColor: _alarmDialog.titleBarBackground
readonly property alias textColor : _alarmDialog.textColor
readonly property string title : vAlarmStatus.title
readonly property string message : vAlarmStatus.message
@@ -93,12 +93,6 @@
_alarmBar .visible = false
}
- Connections { target: _alarmDialog
- function onMinimizeClicked ( ) { if ( vAlarmStatus.alarm_Flag_noMinimize ) alarmList (); else alarmMinimize(); }
- }
- Connections { target: _alarmListDialog
- function onMinimizeClicked ( ) { if ( vAlarmStatus.alarm_Flag_noMinimize ) alarmMaximize(); else alarmMinimize(); }
- }
Connections { target: _alarmBar
function onListClicked ( ) { alarmList () }
function onMaximizeClicked ( ) { alarmMaximize () }
@@ -122,7 +116,6 @@
titleText : vAlarmStatus.title
titlePixelSize : Fonts.fontPixelAlarmTitle
description : vAlarmStatus.message
- descriptionPixelSize: Fonts.fontPixelAlarmMessage
alarmID : vAlarmStatus.alarm_AlarmID
isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced
timeout : vAlarmStatus.alarm_MuteTimeout
@@ -131,13 +124,13 @@
rinsebackVisible : ! vAlarmStatus.alarm_Flag_noRinseback
endVisible : ! vAlarmStatus.alarm_Flag_noEndTreatment
minVisible : ! vAlarmStatus.alarm_Flag_noMinimize
- titleFading : vTDOpMode.fault
- countDown : vTreatmentStop.countDown
+ countDown : vTreatmentStop.countDown
+// countDownVisible : true//
countDownVisible : vTDOpMode.inTreatment
&& (
vTDTreatmentStates.txStop
- || vTDTreatmentStates.txRinseback
- || vTDTreatmentStates.txEnd
+ || vTDTreatmentStates.txRinseback
+ || vTDTreatmentStates.txEnd
)
&& vTreatmentStop.total
@@ -146,14 +139,17 @@
onRinsebackClicked : vAlarmStatus.doUserActionRinseback()
onEndClicked : vAlarmStatus.doUserActionEnd ()
onOkClicked : vAlarmStatus.doUserActionOk ()
+ onListClicked : alarmList ()
+ onMinimizeClicked : alarmMinimize ()
}
AlarmListDialog { id : _alarmListDialog
isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced
timeout : vAlarmStatus.alarm_MuteTimeout
minVisible : ! vAlarmStatus.alarm_Flag_noMinimize
- onMuteClicked : vAlarmStatus.doSilence()
- titleFading : vTDOpMode.fault
+ onMuteClicked : vAlarmStatus.doSilence()
+ onMinimizeClicked : alarmMinimize()
+ onListClicked : alarmMaximize()
}
Connections { target: vAlarmStatus
Index: sources/gui/qml/components/AlarmButtonRow.qml
===================================================================
diff -u
--- sources/gui/qml/components/AlarmButtonRow.qml (revision 0)
+++ sources/gui/qml/components/AlarmButtonRow.qml (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -0,0 +1,64 @@
+// Qt
+import QtQuick 2.12
+
+// Project
+import "qrc:/components"
+import "qrc:/globals"
+
+Item { id: _root
+ property color backgroundColor : Colors.Transparent
+
+ property alias muteVisible : _muteButton.visible
+ property alias minMaxVisible: _minMaxButton.visible
+ property alias lsitVisible : _alarmsList.visible
+
+ property alias timeout : _muteButton.timeout
+ property alias isSilenced : _muteButton.isSilenced
+
+ property bool isMaxButton : false
+ property bool isMinButton : false
+
+ signal muteClicked()
+ signal minMaxClicked()
+ signal listClicked()
+
+ property int spacing : Variables.defaultMargin * 4.5
+
+ MuteButton { id: _muteButton
+ anchors{
+ right: _alarmsList.right
+ rightMargin: _root.spacing
+ verticalCenter : _root.verticalCenter
+ }
+ onClicked : _root.muteClicked()
+ selectColor : Qt.darker (_root.backgroundColor, 1.15)
+ }
+
+ IconButton { id: _alarmsList
+ anchors{
+ right: _minMaxButton.right
+ rightMargin: _root.spacing
+ verticalCenter : _root.verticalCenter
+ }
+ iconSize : Variables.iconsDiameter
+ border.color : Colors.white
+ backgroundColor : isPressed ? Qt.darker (_root.backgroundColor, 1.15) : Colors.transparent
+ iconImageSource : "qrc:/images/iList"
+ onClicked : _root.listClicked()
+ }
+
+ ArrowButton { id: _minMaxButton
+ anchors{
+ right: parent.right
+ verticalCenter : _root.verticalCenter
+ }
+
+ upArrow : _root.isMaxButton
+ downArrow : _root.isMinButton
+ backgroundColor : isPressed ? Qt.darker (_root.backgroundColor, 1.15) : Colors.transparent
+ isDefault : false
+ borderColor : Colors.white
+ iconSize : Variables.iconsDiameter
+ onClicked : _root.minMaxClicked()
+ }
+}
Index: sources/gui/qml/components/ArrowButton.qml
===================================================================
diff -u -rd70b0372a4457f36abedd3034f237d6e0cafa111 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/components/ArrowButton.qml (.../ArrowButton.qml) (revision d70b0372a4457f36abedd3034f237d6e0cafa111)
+++ sources/gui/qml/components/ArrowButton.qml (.../ArrowButton.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -29,9 +29,6 @@
Image { id : _iconImage
anchors.centerIn: parent
- anchors.verticalCenterOffset: upArrow ? -3 :
- downArrow ? 3 :
- 0
height : iconSize
width : iconSize
fillMode : Image.PreserveAspectFit
Index: sources/gui/qml/components/MuteButton.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/components/MuteButton.qml (.../MuteButton.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/MuteButton.qml (.../MuteButton.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -25,36 +25,38 @@
height: 45
width : isSilenced ? 120 : height
+ radius : height
- backgroundColor: Colors.transparent
- borderColor: Colors.white
- touchExpanding: 25
- Row {
- anchors.fill: _root
- leftPadding: 10
- spacing: 5
- Image { id: _image
- anchors.verticalCenter: parent.verticalCenter
- height : Variables.iconsDiameter
- width : Variables.iconsDiameter
- source : _root.isSilenced ? "qrc:/images/iBellOff" : "qrc:/images/iBellOn"
+ borderColor : Colors.transparent
+ backgroundColor : Colors.transparent
+ touchExpanding : 25
+
+ TimeText { id: _timeoutText
+ anchors {
+ right : _image.left
+ rightMargin : Variables.defaultMargin
+ verticalCenter : _root.verticalCenter
}
- TimeText { id: _timeoutText
- // texts are working with thir base line and not the dimetion
- // needs to be adjusted and cannot just be set to verticalCenter
- anchors.top: parent.top
- anchors.topMargin: 4
+ textPixelSize : 30
+ textWeight : Font.Normal
+ // the TimeText component works with hour and minute mainly
+ // so changing the seconds to minuts was easier than changing the component
+ seconds : _root.timeout * 60
+ secondsVisible : false
+ hourZero : false
+ minuteZero : true
+ visible : _root.isSilenced
+ }
- textPixelSize : 30
- textWeight : Font.Normal
- // the TimeText component works with hour and minute mainly
- // so changing the seconds to minuts was easier than changing the component
- seconds : _root.timeout * 60
- secondsVisible : false
- hourZero : false
- minuteZero : true
- visible : _root.isSilenced
+ Image { id: _image
+ anchors {
+ right : _root.right
+ verticalCenter : _root.verticalCenter
}
+
+ height : Variables.muteIconDiameter
+ width : Variables.muteIconDiameter
+ source : _root.isSilenced ? "qrc:/images/iBellOff" : "qrc:/images/iBellOn"
}
}
Index: sources/gui/qml/components/NotificationBar.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/components/NotificationBar.qml (.../NotificationBar.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -27,17 +27,23 @@
property alias text : _text.text
property alias textPixelSize : _text.font.pixelSize
property alias textColor : _text.color
- property alias isSilenced : _muteButton.isSilenced
- property alias timeout : _muteButton.timeout
- property alias backgroundColor : _root.color
+ property alias isSilenced : _headerButtonGroup.isSilenced
+ property alias timeout : _headerButtonGroup.timeout
property bool iconVisible : true
property bool enableMute : true
clip : true // the mute button expands so we need to clip the outside unwanted area.
visible : _text.text
height : Variables.notificationHeight
color : Colors.textNotificationNoneBg
- radius : Variables.dialogRadius
+
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: 0.0; color: Qt.darker (_root.color, 1.1) }
+ GradientStop { position: 0.5; color: Qt.lighter (_root.color, 1.1) }
+ GradientStop { position: 0.9; color: Qt.darker (_root.color, 1.1) }
+ }
+
anchors {
bottom : parent.bottom
left : parent.left
@@ -49,96 +55,44 @@
signal listClicked()
signal maximizeClicked()
- property bool backgroundFading : false
- Fader {
- fadingProperyTarget : _root
- fadingProperyRunning: backgroundFading
- fadingProperyName : "backgroundColor"
- fadingProperyValue : backgroundColor
+ MouseArea { id: _minimizeArea
+ anchors.fill : parent
+ onClicked : { _root.maximizeClicked() }
}
- // Image { id: _muteImage
- // source: "qrc:/images/iAlarm"
- // anchors.right: _text.left
- // anchors.rightMargin: Variables.notificationBarIconMargin;
- // anchors.verticalCenter: parent.verticalCenter;
- // sourceSize.height: Variables.notificationBarIconHeight;
- // sourceSize.width: Variables.notificationBarIconWidth;
- // }
-
Text { id: _text
color : Colors.textNotificationNoneFg
anchors.centerIn : parent
font.pixelSize : Fonts.fontPixelNotification
+ font.weight : Font.DemiBold
horizontalAlignment : Text.AlignHCenter
verticalAlignment : Text.AlignVCenter
}
- MouseArea {
- id: _TouchArea
- anchors.fill: parent;
- onClicked: _root.clicked()
- }
-
- MuteButton { id: _muteButton
- visible: _root.iconVisible
- backgroundColor: _root.color
+ AlarmButtonRow { id: _headerButtonGroup
anchors {
verticalCenter : _root.verticalCenter
- left : _root.left
- leftMargin : Variables.silenceIconMargin
- }
- // might be another event
- // but call the same as the rest of the bar for now
- // when it has it's own event then the borderColor transparency can be removed as well
- // to indicate the touchable area.
- borderColor : _root.enableMute ? Colors.white : Colors.transparent
- onClicked : _root.enableMute ? _root.muteClicked(): _root.clicked()
- }
-
- UpDownButton { id: _updownButton
- visible: _root.iconVisible
- backgroundColor: _root.color
- isUp: true
- anchors {
- verticalCenter : _root.verticalCenter
right : _root.right
- rightMargin : Variables.silenceIconMargin
+ rightMargin : Variables.defaultMargin * 2
}
- onClicked: _root.maximizeClicked()
+
+ isMaxButton : true
+ backgroundColor : _root.color
+ onMuteClicked : _root.enableMute ? _root.muteClicked(): _root.clicked()
+ onMinMaxClicked : _root.maximizeClicked()
+ onListClicked : _root.listClicked()
}
- TouchRect { id: _alarmsList
- visible: _root.iconVisible
- height: 45
- width : height
-
- backgroundColor: _root.color
- borderColor : Colors.white
-
+ Text { id: _alarmID
+ text : ("[%1:%2]") .arg(qsTr("ID"))
+ .arg(_root.alarmID)
anchors {
- verticalCenter : _root.verticalCenter
- right : _updownButton.left
- rightMargin : Variables.silenceIconMargin * 2
- }
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 2
+ verticalCenter : parent.verticalCenter
- Image { id: _alarmListImage
- anchors.centerIn: parent
- height : Variables.iconsDiameter
- width : Variables.iconsDiameter
- source : "qrc:/images/iList"
}
-
- onClicked: _root.listClicked()
- }
- Text { id: _alarmID
- text : qsTr("ID") + ":" + _root.alarmID
- anchors {
- right : parent.right
- top : parent.top
- rightMargin : 130
- }
color : Colors.textMain
- font.pixelSize : Fonts.fontPixelDialogText
+ font.pixelSize : Fonts.fontPixelAlarmTID
}
}
Fisheye: Tag 21041955990385205ec1aca17ef51fc1fd9a4b29 refers to a dead (removed) revision in file `sources/gui/qml/components/UpDownButton.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag 21041955990385205ec1aca17ef51fc1fd9a4b29 refers to a dead (removed) revision in file `sources/gui/qml/compounds/Fader.qml'.
Fisheye: No comparison available. Pass `N' to diff?
Index: sources/gui/qml/compounds/TouchGrid.qml
===================================================================
diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1)
+++ sources/gui/qml/compounds/TouchGrid.qml (.../TouchGrid.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -44,6 +44,7 @@
property alias rowSpacing : _grid.rowSpacing
property alias colSpacing : _grid.columnSpacing
property color lineColor : Colors.borderButtonHalfDarker
+ property color textColor : Colors.textButton
property real lineThickness : 1.5
property real itemsValueLeftMargin : itemWidth / 2
property real itemsUnitLeftMargin : itemWidth / 4
@@ -103,6 +104,7 @@
border.width : 0
height : _root.itemHeight
width : _root.itemWidth
+ textColor : _root.textColor
radius : Variables.dialogRadius
enabled : undef( _root.itemsEnabled[index], true )
visible : undef( _root.itemsVisible[index], true )
Index: sources/gui/qml/dialogs/AlarmListDialog.qml
===================================================================
diff -u -rf8e37a0cbb537edceebee7a7c5f2676f497d1e26 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision f8e37a0cbb537edceebee7a7c5f2676f497d1e26)
+++ sources/gui/qml/dialogs/AlarmListDialog.qml (.../AlarmListDialog.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -31,37 +31,39 @@
property alias titleText : _title.text;
property alias titleBarForeground : _title.color
property alias titleBarBackground : _titleBar.color
- property alias isSilenced : _muteButton.isSilenced
- property alias timeout : _muteButton.timeout
+ property alias isSilenced : _headerButtonGroup.isSilenced
+ property alias timeout : _headerButtonGroup.timeout
property int alarmID : -1
property bool minVisible : true
- radius : Variables.dialogRadius
+ property color contentbackgroundColor : Colors.alarmDialog
+ property int headerOverlap : 30
+ backgroundColor : contentbackgroundColor
+ radius : Variables.alarmDialogRadius
+ width : Variables.alarmDialogWidth
+ height : Variables.alarmDialogHeight
+
signal muteClicked()
signal minimizeClicked()
+ signal listClicked()
signal itemClicked(int vIndex)
- property bool titleFading : false
- Fader {
- fadingProperyTarget : _root
- fadingProperyRunning: titleFading
- fadingProperyName : "titleBarBackground"
- fadingProperyValue : titleBarBackground
- }
-
Rectangle { id: _titleBar
color : Colors.backgroundButtonSelect
- height : Variables.mainMenuHeight
+ height : Variables.alarmDialogHeaderHeight + _root.headerOverlap
width : _root.width
radius : _root.radius
+ clip : true
Image {
id: _icon
source: "qrc:/images/iList"
- anchors.horizontalCenter: _title.horizontalCenter
- anchors.verticalCenter: _title.verticalCenter
- anchors.horizontalCenterOffset: -_title.width + Variables.dialogIconHorizontalOffset;
+ anchors {
+ verticalCenter : _title.verticalCenter
+ right : _title.left
+ rightMargin : Variables.defaultMargin
+ }
height : Variables.alarmListIconDiameter
width : Variables.alarmListIconDiameter
}
@@ -70,7 +72,13 @@
color: Colors.textMain
font.pixelSize: Fonts.fontPixelTitle
text: qsTr("Alarm list")
- anchors.centerIn: _titleBar;
+
+ anchors {
+ verticalCenter : _titleBar.verticalCenter
+ verticalCenterOffset: (_root.headerOverlap / 2) * -1
+ left : _titleBar.left
+ leftMargin : Variables.defaultMargin * 5
+ }
}
MouseArea { id: _minimizeArea
@@ -79,78 +87,80 @@
onClicked : _root.minimizeClicked()
}
- UpDownButton {
- isUp : false
- isList : ! _root.minVisible
+ AlarmButtonRow { id: _headerButtonGroup
anchors {
verticalCenter : _titleBar.verticalCenter
+ verticalCenterOffset: (_root.headerOverlap / 2) * -1
right : _titleBar.right
- rightMargin : Variables.silenceIconMargin
+ rightMargin : Variables.defaultMargin * 2
}
- onClicked: _root.minimizeClicked()
- }
- MuteButton { id: _muteButton
- anchors {
- verticalCenter : _titleBar.verticalCenter
- left : _titleBar.left
- leftMargin : Variables.silenceIconMargin
- }
- onClicked: _root.muteClicked()
+ isMinButton : true
+ backgroundColor : _titleBar.color
+ minMaxVisible : _root.minVisible
+
+ onMuteClicked : _root.muteClicked()
+ onMinMaxClicked : _root.minimizeClicked()
+ onListClicked : _root.listClicked()
}
}
- Text { id: _desc
- visible : ! vAlarmActiveList.adjustment_Accepted
- text : vAlarmActiveList.status
- objectName: "_NotificationDialog_Description"
- color: Colors.textMain
- font.pixelSize: Fonts.fontPixelButton
+ Rectangle { id: _content
+ color : _root.contentbackgroundColor
+ clip : true
anchors {
- horizontalCenter: parent.horizontalCenter;
- verticalCenter: parent.verticalCenter;
+ fill : parent
+ topMargin : _titleBar.height + 2 - _root.headerOverlap
+ bottomMargin : _root.headerOverlap
}
- }
- ScrollBar {
- visible : vAlarmActiveList.adjustment_Accepted && ( flickable.height < flickable.contentHeight )
- anchors.fill: _flickable
- flickable : _flickable
- backColor : Colors.backgroundDialog
- }
-
- Flickable { id : _flickable
- clip : true
- visible : vAlarmActiveList.adjustment_Accepted
- anchors {
- top : _titleBar.bottom
- topMargin : Variables.minVGap
- bottom : _root.bottom
- bottomMargin : Variables.mainMenuHeight + Variables.minVGap
- horizontalCenter: parent.horizontalCenter
+ Text { id: _desc
+ visible : ! vAlarmActiveList.adjustment_Accepted
+ text : vAlarmActiveList.status
+ objectName: "_NotificationDialog_Description"
+ color: Colors.alarmDialogText
+ font.pixelSize: Fonts.fontPixelButton
+ anchors {
+ horizontalCenter: parent.horizontalCenter;
+ verticalCenter: parent.verticalCenter;
+ }
}
- width : Variables.dialogWidth - Variables.minVGap * 2 // * 2 : for each side
- height : Variables.dialogHeight - Variables.minVGap * 2 - _titleBar.height // * 2 : for each side
- contentWidth : width
- contentHeight: _alarmGrid.height
- TouchGrid { id: _alarmGrid
- alignCenter : false
- height : rowCount * ( rowSpacing + itemHeight )
- width : parent.width
- colCount : 1
- rowCount : vAlarmActiveList.alarmIDs.length
- itemHeight : 80
- itemWidth : Variables.dialogWidth - Variables.minVGap * (2 + 1) // * 2 : for each side & the +1 to not cover the scrollbar
- rowSpacing : 0
- colSpacing : 0
- lineColor : Colors.backgroundMain
- itemsText : vAlarmActiveList.alarmIDs
- itemsValue : vAlarmActiveList.alarmTexts
- itemsTouchable : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]
- itemsValueLeftMargin : 80 // if decreased maybe covered by title
- itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable
- onItemClicked : _root.itemClicked(vIndex)
+ Flickable { id : _flickable
+ visible : vAlarmActiveList.adjustment_Accepted
+ anchors {
+ top : _content.top
+ topMargin : Variables.minVGap
+ bottom : _root.bottom
+ bottomMargin : Variables.mainMenuHeight + Variables.minVGap
+ horizontalCenter: parent.horizontalCenter
+ }
+ width : _content.width - Variables.minVGap * 2 // * 2 : for each side
+ height : _content.height - Variables.minVGap * 2 - _titleBar.height // * 2 : for each side
+ contentWidth : _content.width - Variables.minVGap * 2
+ contentHeight : _alarmGrid.height
+ boundsBehavior : Flickable.StopAtBounds
+ interactive : false
+
+ TouchGrid { id: _alarmGrid
+ alignCenter : false
+ height : rowCount * ( rowSpacing + itemHeight )
+ width : parent.width
+ colCount : 1
+ rowCount : vAlarmActiveList.alarmIDs.length
+ itemHeight : 75
+ itemWidth : _content.width - Variables.minVGap * (2 + 1) // * 2 : for each side & the +1 to not cover the scrollbar
+ rowSpacing : 0
+ colSpacing : 0
+ lineColor : Colors.alarmDialogText
+ textColor : Colors.alarmDialogText
+ itemsText : vAlarmActiveList.alarmIDs
+ itemsValue : vAlarmActiveList.alarmTexts
+ itemsTouchable : [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]
+ itemsValueLeftMargin : 80 // if decreased maybe covered by title
+ itemsUnitLeftMargin : 470 // if increased will be covered by chevron if touchable
+ onItemClicked : _root.itemClicked(vIndex)
+ }
}
}
}
Index: sources/gui/qml/dialogs/NotificationDialog.qml
===================================================================
diff -u -rf8e37a0cbb537edceebee7a7c5f2676f497d1e26 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision f8e37a0cbb537edceebee7a7c5f2676f497d1e26)
+++ sources/gui/qml/dialogs/NotificationDialog.qml (.../NotificationDialog.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -15,6 +15,7 @@
// Qt
import QtQuick 2.12
+import QtGraphicalEffects 1.12
// Project
// Qml imports
@@ -29,152 +30,341 @@
property alias titleText : _title.text
property alias titlePixelSize : _title.font.pixelSize
- property alias description : _desc.text
- property alias descriptionPixelSize : _desc.font.pixelSize
+ property string description : "_desc.text"
property alias titleBarForeground : _title.color
property alias titleBarBackground : _titleBar.color
- property alias isSilenced : _muteButton.isSilenced
- property alias timeout : _muteButton.timeout
+ property alias isSilenced : _headerButtonGroup.isSilenced
+ property alias timeout : _headerButtonGroup.timeout
property int alarmID : -1
- property alias countDown : _timeoutText.countDown
- property alias countDownVisible : _timeoutText.visible
+ property alias countDown : _timerRect.countDown
+ property alias countDownVisible : _timerRect.visible
+ property alias figureImageSource : _figureImage.source
-
property bool resumeVisible : false
property bool rinsebackVisible : false
property bool endVisible : false
property bool okVisible : false
property bool minVisible : true
- property bool titleFading : false
- Fader {
- fadingProperyTarget : _root
- fadingProperyRunning: titleFading
- fadingProperyName : "titleBarBackground"
- fadingProperyValue : titleBarBackground
- }
+ property int headerOverlap : 30
+ property string figureTextString : ("%1 %2.").arg(qsTr("Figure")).arg(_listView.currentIndex + 1)
+ property bool showFigureText : false
+
// Look for this tag: #First_Time_Message_Sent_With_Silenced
// the isSilenced is helping not to show this dialog maximized and
// then if the silence is set minimize it immediately
// this behaviour does not look nice on the screen and it bounces
visible : description && ! isSilenced
- radius : Variables.dialogRadius
+ radius : Variables.alarmDialogRadius
+ width : Variables.alarmDialogWidth
+ height : Variables.alarmDialogHeight
+ /////////////// TODO: Update with actual instructions ////////////////
+ onDescriptionChanged: {
+ _model.set(0, { text: vAlarmStatus.title, image: "qrc:/images/iSplash" })
+ _model.set(1, { text: vAlarmStatus.message, image: "qrc:/images/iBusy" })
+ _model.set(2, { text: vAlarmStatus.text, image: "qrc:/images/iLock" })
+
+ _listView.currentIndex = 0
+ figureImageSource = _model.get(_listView.currentIndex).image
+ }
+
+ ListModel { id: _model
+ ListElement { text: "I am 1"; image: "qrc:/images/iSplash" }
+ ListElement { text: "I am 2"; image: "qrc:/images/iBusy" }
+ ListElement { text: "Step 3"; image: "qrc:/images/iLock" }
+ ListElement { text: "Step number 4. Ensure Airtraph hsd no gosm. zrnf ytrqw or znSL BLABLHABLHABABLHABLA BLAHHHH alb siogb wrb gou"; image: "qrc:/images/iHomeBackground" }
+ ListElement { text: "I am 5"; image: "qrc:/images/iRedCrossWCircle" }
+ ListElement { text: "Inspect dialyzer for clots. FOllow facility poicly to end treatment if clots are present :)"; image: "qrc:/images/iClock+" }
+ }
+ /////////////////////////////////////////////////////////////////
+
signal muteClicked()
signal minimizeClicked()
+ signal listClicked()
signal resumeClicked()
signal rinsebackClicked()
signal endClicked()
signal okClicked()
Rectangle { id: _titleBar
- height : Variables.mainMenuHeight
+ height : Variables.alarmDialogHeaderHeight + _root.headerOverlap
width : _root.width
radius : _root.radius
clip : true // the mute button expands so we need to clip the outside unwanted area.
- // Image { id: _icon
- // source: "qrc:/images/iAlarm"
- // anchors.horizontalCenter: _title.horizontalCenter
- // anchors.verticalCenter: _title.verticalCenter
- // anchors.horizontalCenterOffset: -_title.width + Variables.dialogIconHorizontalOffset;
- // height : Variables.alarmListIconDiameter
- // width : Variables.alarmListIconDiameter
- // }
-
- Text { id: _title
- color: Colors.textMain
- font.pixelSize: Fonts.fontPixelTitle
- text: qsTr("Notification")
-
- width: _titleBar.width
- verticalAlignment : Text.AlignVCenter
- horizontalAlignment : Text.AlignHCenter
- anchors.centerIn: _titleBar
+ gradient: Gradient {
+ orientation: Gradient.Horizontal
+ GradientStop { position: 0.0; color: Qt.darker (_titleBar.color, 1.1) }
+ GradientStop { position: 0.5; color: Qt.lighter (_titleBar.color, 1.1) }
+ GradientStop { position: 0.9; color: Qt.darker (_titleBar.color, 1.1) }
}
+ // TODO: disable doubleClicked later. this is only for diagnostic purpose when alarm dialog covers the entire screen.
MouseArea { id: _minimizeArea
- // this object is not exposed so cannot be missused by the child component, so here it can be enabled and being handled by the minVisible property
- // enabled : _root.minVisible
anchors.fill : parent
- onClicked : { if ( _root.minVisible ) _root.minimizeClicked() } // if can be minimized (minVisible = true ), call the minimizeClinked signal (norma behavior)
- onDoubleClicked : { if ( ! _root.minVisible ) _sdcProgressItem.doubleClicked() } // if can NOT be minimized (minVisible = false), call the sdcard.double click to pop the DiagnosticsDialog
- // TODO: disable doubleClicked later. this is only for diagnostic purpose when alarm dialog covers the entire screen.
+ onDoubleClicked : { if ( ! _root.minVisible ) _sdcProgressItem.doubleClicked() } // call the sdcard.double click to pop the DiagnosticsDialog
}
- UpDownButton { id: _minimizeButton
- backgroundColor: _titleBar.color
- isUp : false
- isList : ! _root.minVisible
+ Text { id: _title
+ color : Colors.textMain
+ font.pixelSize : Fonts.fontPixelTitle
+ text : qsTr("Notification")
+ font.weight : Font.DemiBold
+ width : _titleBar.width
+
anchors {
- verticalCenter : _titleBar.verticalCenter
- right : _titleBar.right
- rightMargin : Variables.silenceIconMargin
+ left: parent.left
+ leftMargin: Variables.defaultMargin * 2
+ verticalCenter: parent.verticalCenter
+ verticalCenterOffset: (_root.headerOverlap / 2) * -1
}
- onClicked: _root.minimizeClicked()
}
- MuteButton { id: _muteButton
- backgroundColor: _titleBar.color
+ AlarmButtonRow { id: _headerButtonGroup
anchors {
verticalCenter : _titleBar.verticalCenter
- left : _titleBar.left
- leftMargin : Variables.silenceIconMargin
+ verticalCenterOffset: (_root.headerOverlap / 2) * -1
+ right : _titleBar.right
+ rightMargin : Variables.defaultMargin * 2
}
- onClicked: _root.muteClicked()
+
+ isMinButton : true
+ backgroundColor : _titleBar.color
+ minMaxVisible : _root.minVisible
+
+ onMuteClicked : _root.muteClicked()
+ onMinMaxClicked : _root.minimizeClicked()
+ onListClicked : _root.listClicked()
}
+ }
- TimeText { id: _timeoutText
- property int countDown : 0
- seconds : countDown * 60
+ Rectangle { id: _descriptionRect
+ color : Colors.alarmDialog
+ clip : true
- height: _titleBar.height
+ anchors {
+ top : _titleBar.bottom
+ topMargin: _root.headerOverlap * -1
+ left: parent.left
+ right: parent.right
+ bottom: _timerRect.top
+ }
+
+ Item { id: _infoItem
anchors {
- verticalCenter : _titleBar.verticalCenter
- right : _minimizeButton.left
- rightMargin : 15
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 2
+ top :parent.top
+ topMargin : Variables.defaultMargin * 3
}
- textPixelSize : 30
- textWeight : Font.Normal
- secondsVisible : false
- hourZero : false
- minuteZero : true
+ height: 35
+ width: parent.width / 2
+
+ NotificationBarSmall { id: _infoItem1
+ 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
+ }
}
+
+ Row { id: _alarmContentRow
+ anchors {
+ top: _infoItem.bottom
+ 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
+ model : _model
+ height : _alarmContentRow.height
+ width : parent.width * 0.65
+ currentIndex: 0
+ interactive : false
+ clip : true
+
+ delegate: Item { id: _delegateControl
+ width : parent.width
+ height : 73
+ clip : true
+
+ Rectangle { id: _stepRect
+ height : 40
+ width : height
+ radius : height
+ color : Colors.backgroundMainMenu
+
+ Text { id: _stepNumberRect
+ anchors.centerIn: parent
+ text: index + 1
+ color: Colors.white
+ font.pixelSize: 20
+ font.weight: Font.Medium
+ }
+
+ 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: _delegateText
+ anchors {
+ left : _stepRect.right
+ leftMargin : Variables.defaultMargin
+ right : _delegateControl.right
+ rightMargin : _figureText.contentWidth
+ }
+ 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.text
+ wrapMode : Text.WordWrap
+ }
+
+ Text { id: _figureText
+ anchors {
+ left: _delegateText.left
+ leftMargin: _delegateText.contentWidth + Variables.defaultMargin
+ verticalCenter: parent.verticalCenter
+ }
+ height : parent.height
+ font.pixelSize: 22
+ font.italic : true
+ color : "#18559E"
+ text : ("(%1)").arg(_root.figureTextString)
+ visible : _delegateControl.ListView.isCurrentItem && _root.showFigureText
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (_listView.currentIndex !== index) {
+ _listView.currentIndex = index
+ _root.figureImageSource = model.image
+ }
+ }
+ }
+ }
+ }
+
+ 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
+ }
+
+ Text { id: _imageFigureText
+ anchors {
+ top: _figureImage.bottom
+ right: _figureImage.right
+ }
+
+ font.pixelSize : 23
+ font.weight : Font.Medium
+ color : Colors.alarmDialogGreyText
+ text : _root.figureTextString
+ visible : _root.showFigureText
+ }
+ }
+ }
}
- Rectangle { id: _descReect
- color: Colors.transparent
- clip : true
+ Rectangle { id: _timerRect
+ property int countDown : 0
+
+ height: 70
+ width: parent.width / 3
+
anchors {
- fill : parent
- topMargin : _titleBar .height + 2
- bottomMargin : _buttonGroup .height
+ bottom : _alarmID.top
+ bottomMargin : Variables.defaultMargin * 2
+ left : parent.left
+ leftMargin : Variables.defaultMargin * 4
}
- Text { id: _desc
- objectName: "_NotificationDialog_Description"
- color: Colors.textMain
- font.pixelSize: Fonts.fontPixelButton
+ color : "#FFECEC"
+ radius : 10
+
+ Text { id: _astrix
anchors {
- horizontalCenter: parent.horizontalCenter
+ left: parent.left
+ leftMargin: Variables.defaultMargin
+ top: _timerDescription.top
+ }
+
+ color : "#AB352E"
+ text : "*"
+ font.pixelSize : 25
+ font.weight : Font.Medium
+ }
+
+ Text { id: _timerDescription
+ anchors {
+ verticalCenter: parent.verticalCenter
+ left: _astrix.right
+ }
+
+ color : "black"
+ text : qsTr("Rinseback will not be allowed in:")
+ font.pixelSize : 25
+ font.weight : Font.Medium
+
+ }
+
+ TimeText { id: _timeoutText
+ seconds : countDown * 60
+ anchors {
verticalCenter : parent.verticalCenter
+ left: _timerDescription.right
}
+ height: _titleBar.height
+ textPixelSize : 30
+ textWeight : Font.Bold
+ secondsVisible : false
+ hourZero : false
+ minuteZero : true
+ textColor : "#AB352E"
}
}
Row { id: _buttonGroup
- property int buttonsWidth : 300
+ property int buttonsWidth : 250
spacing: 50
anchors {
bottom : parent.bottom
horizontalCenter: parent.horizontalCenter
rightMargin : spacing
leftMargin : spacing
- bottomMargin : spacing / 2 // give the content more space.
+ bottomMargin : Variables.defaultMargin * 2
}
// IMPORTANT NOTE : Alarm Dialog buttons
@@ -189,46 +379,53 @@
onPressed : resumeClicked()
text.text : qsTr("RESUME")
width : _buttonGroup.buttonsWidth
- borderColor : Colors.white
- selectColor : Qt.darker(_root.backgroundColor, 1.15)
+ isDefault : true
+ backgroundColor: Colors.white
+ fgColor : isPressed ? Colors.white : borderColor
+ selectColor : Qt.darker(borderColor, 1.15)
}
TouchRect { id : _rinsebackTouchRect
visible : rinsebackVisible
onPressed : rinsebackClicked()
text.text : qsTr("RINSEBACK")
width : _buttonGroup.buttonsWidth
- borderColor : Colors.white
- selectColor : Qt.darker(_root.backgroundColor, 1.15)
+ backgroundColor: Colors.white
+ fgColor : isPressed ? Colors.white : borderColor
+ selectColor : Qt.darker(borderColor, 1.15)
}
TouchRect { id : _endTouchRect
visible : endVisible
onPressed : endClicked()
text.text : qsTr("END TREATMENT")
width : _buttonGroup.buttonsWidth
- borderColor : Colors.white
- selectColor : Qt.darker(_root.backgroundColor, 1.15)
+ backgroundColor: Colors.white
+ fgColor : isPressed ? Colors.white : borderColor
+ selectColor : Qt.darker(borderColor, 1.15)
}
+
TouchRect { id : _okTouchRect
visible : okVisible
onPressed : okClicked()
text.text : qsTr("OK")
width : _buttonGroup.buttonsWidth
- borderColor : Colors.white
- selectColor : Qt.darker(_root.backgroundColor, 1.15)
+ backgroundColor: Colors.white
+ fgColor : isPressed ? Colors.white : borderColor
+ selectColor : Qt.darker(borderColor, 1.15)
}
}
Text { id: _alarmID
- text : qsTr("ID") + ":" + _root.alarmID
+ text : ("[%1:%2]") .arg(qsTr("ID"))
+ .arg(_root.alarmID)
anchors {
left : parent.left
bottom : parent.bottom
- leftMargin : 5
- bottomMargin: 5
+ leftMargin : Variables.defaultMargin * 3
+ bottomMargin: Variables.defaultMargin * 4
}
- color : Colors.textMain
- font.pixelSize : Fonts.fontPixelDialogText
+ color : Colors.alarmDialogGreyText
+ font.pixelSize : Fonts.fontPixelAlarmTID
}
}
Index: sources/gui/qml/globals/Colors.qml
===================================================================
diff -u -r31ff96b799fff4ea66b9187416e9dd16e3dc10fe -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 31ff96b799fff4ea66b9187416e9dd16e3dc10fe)
+++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -54,6 +54,9 @@
readonly property color backgroundUltrafiltrationButton : "#31568F"
readonly property color textValueUltrafiltrationButtonFg: "#98aec2"
+ readonly property color alarmDialogText : "#343434"
+ readonly property color alarmDialogGreyText : "#838080"
+ readonly property color alarmDialog : "#FEFEFE"
readonly property color backgroundRangeRect : "#3e546e"
readonly property color highlightProgressBar : "#3d8eef"
@@ -113,7 +116,7 @@
readonly property color textNotificationHighBg : red
readonly property color textNotificationHighFg : white
- readonly property color alarmTopBarHighBg : "#831913"
+ readonly property color alarmTopBarHighBg : red
readonly property color alarmTopBarHighFg : white
readonly property color alarmTopBarMedBg : "#db8f00"
@@ -148,25 +151,25 @@
case GuiActions.ALARM_PRIORITY_HIGH:
titleBg = alarmTopBarHighBg
titleFg = alarmTopBarHighFg
- contentBg = textNotificationHighBg
+ contentBg = white
contentFg = textNotificationHighFg
break
case GuiActions.ALARM_PRIORITY_MEDIUM:
titleBg = alarmTopBarMedBg
titleFg = alarmTopBarMedFg
- contentBg = textNotificationMedBg
+ contentBg = white
contentFg = textNotificationMedFg
break
case GuiActions.ALARM_PRIORITY_LOW:
titleBg = alarmTopBarLowBg
titleFg = alarmTopBarLowFg
- contentBg = textNotificationLowBg
+ contentBg = white
contentFg = textNotificationLowFg
break
default : // GuiActions.ALARM_PRIORITY_NONE
titleBg = backgroundButtonSelect
titleFg = textMain
- contentBg = backgroundDialog
+ contentBg = white
contentFg = textMain
}
return [titleBg ,
Index: sources/gui/qml/globals/Fonts.qml
===================================================================
diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8)
+++ sources/gui/qml/globals/Fonts.qml (.../Fonts.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -31,6 +31,7 @@
readonly property int fontPixelAlarmTitle : 48
readonly property int fontPixelAlarmBarTitle : 40
readonly property int fontPixelAlarmMessage : 40
+ readonly property int fontPixelAlarmTID : 32
readonly property int fontPixelTouchAreaTitle : 16
Index: sources/gui/qml/globals/Variables.qml
===================================================================
diff -u -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1)
+++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -41,6 +41,7 @@
readonly property int contentHeight : 50
readonly property int mainMenuHeight : 80 //// ----- @LEAHIZED
+ readonly property int alarmDialogHeaderHeight : 100
readonly property int minVGap : 15
readonly property int minVGap2 : 30
@@ -73,6 +74,9 @@
readonly property int dialogWidth : applicationWidth - dialogMargin
readonly property int dialogHeight : applicationHeight - dialogMargin
readonly property int dialogRadius : 10
+ readonly property int alarmDialogWidth : applicationWidth * 0.75
+ readonly property int alarmDialogHeight : applicationHeight * 0.85
+ readonly property int alarmDialogRadius : 30
readonly property int rangeRectMargin : 1
readonly property int rangeRectRadius : 2
@@ -110,6 +114,7 @@
readonly property int pauseIconDiameter : 60
readonly property int arrowIconDiameter : 35
+ readonly property int muteIconDiameter : 38
readonly property int headerIconDiameter : 40
readonly property int topBarMenuHeight : 80 //// ----- @LEAHIZED
readonly property int sliderCircleDiameter : 30
Index: sources/gui/qml/main.qml
===================================================================
diff -u -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 -r21041955990385205ec1aca17ef51fc1fd9a4b29
--- sources/gui/qml/main.qml (.../main.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1)
+++ sources/gui/qml/main.qml (.../main.qml) (revision 21041955990385205ec1aca17ef51fc1fd9a4b29)
@@ -344,14 +344,13 @@
// then cannot be anchored.
NotificationBar { id: _alarmBar
anchors.bottom : _mainMenu.top
- backgroundColor : _alarmItem.backgroundColor
+ color : _alarmItem.backgroundColor
textColor : _alarmItem.textColor
alarmID : _alarmItem.alarm_AlarmID
text : _alarmItem.title
textPixelSize : Fonts.fontPixelAlarmBarTitle
isSilenced : _alarmItem.isSilenced
timeout : _alarmItem.timeout
- backgroundFading : vTDOpMode.fault
z : 995
}