Index: sources/gui/qml/main.qml =================================================================== diff -u -r71784f783e4e2c0eadebef28eefb0fc53534ba66 -r1d43ff790e6a3fb03d371bb5bde9c2d432d299b6 --- sources/gui/qml/main.qml (.../main.qml) (revision 71784f783e4e2c0eadebef28eefb0fc53534ba66) +++ sources/gui/qml/main.qml (.../main.qml) (revision 1d43ff790e6a3fb03d371bb5bde9c2d432d299b6) @@ -143,32 +143,46 @@ // Alarms function alarmMinimize() { - _alarm_dialog .visible = false - _alarm_bar .visible = true + _alarmDialog .visible = false + _alarmListDialog.visible = false + _alarmBar .visible = true } function alarmMaximize() { - _alarm_dialog .visible = true - _alarm_bar .visible = false + _alarmDialog .visible = true + _alarmListDialog.visible = false + _alarmBar .visible = false } + function alarmList() { + _alarmDialog .visible = false + _alarmListDialog.visible = true + _alarmBar .visible = false + } function alarmHide() { - _alarm_dialog .visible = false - _alarm_bar .visible = false + _alarmDialog .visible = false + _alarmListDialog.visible = false + _alarmBar .visible = false } - NotificationBar { id : _alarm_bar - backgroundColor : _alarm_dialog.backgroundColor - textColor : _alarm_dialog.textColor + NotificationBar { id : _alarmBar + backgroundColor : _alarmDialog.backgroundColor + textColor : _alarmDialog.textColor anchors.bottom : _mainMenu.top text : vAlarmStatus.text; isSilenced : vAlarmStatus.alarm_Flag_alarmsSilenced timeout : vAlarmStatus.alarm_MuteTimeout onMuteClicked : vAlarmStatus.doSilence() + onListClicked : alarmList() onMaximizeClicked : alarmMaximize() onClicked : alarmMaximize() } - NotificationDialog { id : _alarm_dialog + // TODO : Later need to create a base Notification dialog class + // and inherit NotificationDialog and AlarmListDialog from that + // Beter be the NotificationDialog defined as parent + // and two separate dialogs by the names of AlarmDialog , AlarmListDlialog creatd. + // Same for the Notification Bar + NotificationDialog { id : _alarmDialog // this will change later to the actual message text // and the instruction would be in the dialog content titleText : "Alarm" @@ -195,29 +209,40 @@ } } + AlarmListDialog { id : _alarmListDialog + onMinimizeClicked : { + alarmMinimize() + // when used minimizes the alarm it can stay minimized until otherwize is set + // by the next alarm status received. + // see also the "Connections { target: vAlarmStatus" implementation + // vAlarmStatus.alarm_KeepMinimized = true + } + } + // 9 - Others Text { // TEST : Application version should be moved into the information screen later. - color: Colors.textMain + color : Colors.textMain anchors { - right: parent.right - margins: 5 - bottom: parent.bottom + top : parent.top + right : parent.right + topMargin : 35 + rightMargin : 125 } - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignBottom + horizontalAlignment : Text.AlignRight + verticalAlignment : Text.AlignBottom - height: Variables.mainMenuHeight - text: Qt.application.version + height : 25 + text : Qt.application.version font.pixelSize: 14 } Rectangle { // TEST : SD-Card not present should be handled with better indication(s). color : ! _GuiView.sdIsReady ? "red" : _GuiView.sdIsReadOnly ? "gray" : "green" anchors { - right : parent.right - bottom : parent.bottom - bottomMargin: 35 - rightMargin: 10 + top : parent.top + right : parent.right + topMargin : 15 + rightMargin : 125 } width : 25 height: 25 @@ -259,10 +284,10 @@ onAlarm_Flag_alarmsSilencedChanged : vAlarmStatus.alarm_KeepMinimized = vAlarmStatus.alarm_Flag_alarmsSilenced onAlarm_PriorityChanged: { [ - _alarm_dialog.titleBarBackground, - _alarm_dialog.titleBarForeground, - _alarm_dialog.backgroundColor , - _alarm_dialog.textColor , + _alarmDialog.titleBarBackground, + _alarmDialog.titleBarForeground, + _alarmDialog.backgroundColor , + _alarmDialog.textColor , ] = Colors.alarmPriorityColors(vAlarmStatus.alarm_Priority) }