Index: leahi.qrc =================================================================== diff -u -r204d5f7514be78430a667297ced829bd104880d5 -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- leahi.qrc (.../leahi.qrc) (revision 204d5f7514be78430a667297ced829bd104880d5) +++ leahi.qrc (.../leahi.qrc) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -33,9 +33,15 @@ sources/gui/qml/dialogs/AutoHideInfo.qml sources/gui/qml/dialogs/NotificationDialog.qml sources/gui/qml/dialogs/AlarmListDialog.qml - sources/gui/qml/dialogs/DiagnosticsDialog.qml sources/gui/qml/dialogs/LockDialog.qml + + sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml + sources/gui/qml/dialogs/diagnostics/DiagnosticsBase.qml + sources/gui/qml/dialogs/diagnostics/DiagnosticsSwipe.qml + sources/gui/qml/dialogs/diagnostics/DiagnosticsTD.qml + sources/gui/qml/dialogs/diagnostics/DiagnosticsDD.qml + resources/images/Logo d.png resources/images/Logo DialityT.png Index: sources/gui/qml/components/Circle.qml =================================================================== diff -u -raac60a5c8b23870142cedea0cbea8558ebfd88d8 -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- sources/gui/qml/components/Circle.qml (.../Circle.qml) (revision aac60a5c8b23870142cedea0cbea8558ebfd88d8) +++ sources/gui/qml/components/Circle.qml (.../Circle.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -63,7 +63,7 @@ fillColor: Colors.transparent strokeColor: Colors.borderButton strokeWidth: 1 - capStyle: ShapePath.RoundCap + capStyle: ShapePath.FlatCap PathAngleArc { id: _arc centerX: _root.width / 2 centerY: _root.height / 2 Index: sources/gui/qml/components/ModalDialog.qml =================================================================== diff -u -r923377d29fe730c0e2209386479a61b1e8ee1097 -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision 923377d29fe730c0e2209386479a61b1e8ee1097) +++ sources/gui/qml/components/ModalDialog.qml (.../ModalDialog.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -40,7 +40,8 @@ height : Variables.dialogHeight visible : false - anchors.centerIn: parent + x: Math.round((Variables.applicationWidth - width) / 2) + y: Math.round((Variables.applicationHeight - height) / 2) enter: Transition { NumberAnimation { property: "opacity"; from: 0.0; to: 1.0; duration: 200 } } exit : Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200 } } Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -r493c6653bc98492d200bfd82abd6abf9af8d29ca -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 493c6653bc98492d200bfd82abd6abf9af8d29ca) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -28,11 +28,12 @@ readonly property int applicationWidth : 1920 //// ----- @LEAHIZED readonly property int applicationHeight : 1080 //// ----- @LEAHIZED + readonly property int screenContentHeight : applicationHeight - notificationHeight readonly property int buttonSpacing : 150 readonly property int dialogIconHeight : 50 readonly property int dialogIconWidth : 50 readonly property int dialogIconHorizontalOffset : 25 - readonly property int headerHeight : 100 + readonly property int headerHeight : 80 readonly property int headerButtonsMargin : 35 readonly property int confirmButtonWidth : 155 readonly property int headerBarDateTimeWidth : 200 Index: sources/gui/qml/main.qml =================================================================== diff -u -rb3f0f9afa498c5892f39745c36b9762ec957a468 -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- sources/gui/qml/main.qml (.../main.qml) (revision b3f0f9afa498c5892f39745c36b9762ec957a468) +++ sources/gui/qml/main.qml (.../main.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -266,35 +266,43 @@ Background {} // ----- Follow the below Z order ----- - // 1 - Screens - // 1 - 1 - SettingsStack { id: _settingsStack } // FIXME: BEHROUZ - anchors.top : _headerbar.bottom or add topMargin to all stacks - // 1 - 2 - ManagerStack { id: _managerStack } - // 1 - 3 - MainStack { id: _mainStack } + Item { id: _mainContent + anchors.top: _headerBar.bottom + // 1 - Screens + // 1 - 1 + SettingsStack { id: _settingsStack } + // 1 - 2 + ManagerStack { id: _managerStack } + // 1 - 3 + MainStack { id: _mainStack } + } + // 3 - Footer MainMenu { id: _mainMenu + anchors.bottom : parent.bottom + anchors.bottomMargin: hidden || disable ? height * -1 : 0 + function isTreatment () { _mainMenu.itemPressed(0) } function isManager () { _mainMenu.itemPressed(1) } function isSettings () { _mainMenu.itemPressed(2) } disable : _GuiView.manufactSetup || _GuiView.updateSetup hidden : true // it should be hidden by default since the landing screen changed to init and it does not have the main menu until the POST passes. - titles : [ qsTr("Treatment") , qsTr("Prescriptions") , qsTr("Settings") ] - visibleItems : [ true , true , true ] + width : Variables.applicationWidth + isMainMenu : true + Component.onCompleted : { _settingsStack.visible = false _managerStack .visible = false _mainStack .visible = true } - onItemPressed: { + onItemPressed: function (vIndex) { if ( disable ) return - _mainStack .visible = vIndex == 0 - _managerStack .visible = vIndex == 1 - _settingsStack.visible = vIndex == 2 + _mainStack .visible = vIndex === 0 + _managerStack .visible = vIndex === 1 + _settingsStack.visible = vIndex === 2 } } @@ -303,159 +311,30 @@ } // 9 - Others - Rectangle { //TODO:@LEAHI: make this the statusbar/headerbar component. + HeaderBar { id: _headerBar anchors.top: parent.top - width : Variables.applicationWidth - height : Variables.notificationHeight - color : _mainStack.currentScreen.objectName === 'TreatmentStack' ? "transparent" : // FIXME: BEHROUZ - My workaround for showing the top main treatment menu with headerbar - Colors.backgroundMainMenu - gradient: Gradient { //TODO:@LEAHI: make this a component. - GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.2) } - GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.2) } - } + } - Item { - width : Variables.headerBarDateTimeWidth - anchors { - top : parent.top - left : parent.left - bottom : parent.bottom - margins : 10 + SDCProgressItem { id: _sdcProgressItem + // TODO: disable this later. this is only for diagnostic purpose. + onDoubleClicked : { + if ( _GuiView.dryDemoMode ) { + let dryDemoTempID = 99 + let id = vConfirm.id + vConfirm.id = dryDemoTempID + vConfirm.doConfirm( true ) + vConfirm.id = id } - Column { - spacing : 0 - anchors.fill: parent - Text { - color : Colors.textMain - width : parent.width - height : parent.height * 3/5 - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - text : vDateTime.time - font.pixelSize: 40 - } - Text { - color : Colors.textMain - width : parent.width - height : parent.height * 2/5 - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignVCenter - text : vDateTime.date - font.pixelSize: 25 - } + else { + _diagnosticsDialog.open() } } - Text { // TEST : Application version should be moved into the information screen later. - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 100 - - } - horizontalAlignment : Text.AlignRight - verticalAlignment : Text.AlignBottom - - height : 15 - text : Qt.application.version //DEBUG: + "[" + _GuiView.platform + "]" - font.pixelSize: 14 - } - - Text { // TEST : Wireless IP - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 325 - } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - - height : 15 - text : "W:" // + vNetwork.wirelessIP // ===================== Device Controller: FIXME - font.pixelSize: 15 - } - - Text { // TEST : Ethernet IP - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 475 - } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - - height : 15 - text : "E:" // + vNetwork.ethernetIP // ===================== Device Controller: FIXME - font.pixelSize: 15 - } - - Text { // TEST : BluetoothStatus - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 615 - } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - - height : 15 - text : "B:" + vBluetooth.pairedAddr - font.pixelSize: 14 - } - - Text { // TEST : The treatment vital dialog countdown time - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 900 - } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - - height : 15 - //DEBUG text : "Vital Timer: " + vTreatmentVitals.min_left + " : " + vTreatmentVitals.sec_left - font.pixelSize: 14 - } - - Text { // TEST : Current timezone - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 1220 - } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - - height : 15 - text : vDateTime.timezone - font.pixelSize: 14 - } - - SDCProgressItem { id: _sdcProgressItem - // TODO: disable this later. this is only for diagnostic purpose. - onDoubleClicked : { - if ( _GuiView.dryDemoMode ) { - let dryDemoTempID = 99 - let id = vConfirm.id - vConfirm.id = dryDemoTempID - vConfirm.doConfirm( true ) - vConfirm.id = id - } - else { - _diagnosticsDialog.open() - } - } - } } // keyboard should always be before AlarmItem to not to covet it. KeyboardItem { id: _keyboard } + LockDialog { id: _lockDialog } AlarmItem { id: _alarmItem ; z: 996 } PowerItem { id: _powerItem ; z: 997 } ConfirmDialog { id: _confirmDialog ; z: 998 } Index: sources/gui/qml/pages/treatment/TreatmentStack.qml =================================================================== diff -u -rb76f43fffe933994819e03930c6ad4dd0f0e2fca -rea51c0546c7061d225e7b9d8b754554c65f0d1b1 --- sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision b76f43fffe933994819e03930c6ad4dd0f0e2fca) +++ sources/gui/qml/pages/treatment/TreatmentStack.qml (.../TreatmentStack.qml) (revision ea51c0546c7061d225e7b9d8b754554c65f0d1b1) @@ -15,12 +15,12 @@ // Qt import QtQuick 2.12 -//import QtCharts 2.3 // Qml imports -import "qrc:/globals" import "qrc:/components" import "qrc:/compounds" +import "qrc:/dialogs" +import "qrc:/globals" import "qrc:/pages/treatment/adjustments" /*! @@ -38,6 +38,10 @@ _treatmentAdjustmentPressuresLimits .close() _treatmentAdjustmentDuration .close() _treatmentUltrafiltrationItem .close() + + if (! visible) { + _headerBar.menuHidden = true + } } stackView.initialItem : null @@ -57,23 +61,16 @@ || _treatmentAdjustmentPressuresLimits .visible || _treatmentAdjustmentDuration .visible || _treatmentUltrafiltrationItem .visible - // Components - MainMenu { id: _treatmentMenu - position : MainMenu.Position.Top - hidden : true - titles : [ qsTr("Treatment") , qsTr("Trends") , qsTr("Heparin")] - visibleItems : [ true , false , false ] - 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: { - if (currentIndex === 1) push(_treatmentTrends) - if (currentIndex === 0) pop() - } + property int headerMenuIndex: _headerBar.headerMenuIndex + + onHeaderMenuIndexChanged: { + if ( _root.headerMenuIndex === 2) page(_treatmentHeparin) + if ( _root.headerMenuIndex === 1) page(_treatmentTrends) + if ( _root.headerMenuIndex === 0) pop(null) // unwind stack } + // Components TreatmentBloodPrime { id: _treatmentBloodPrime } TreatmentUltrafiltrationItem{ id: _treatmentUltrafiltrationItem } TreatmentHome { id: _treatmentHome } @@ -209,7 +206,7 @@ Connections { target: _treatmentBloodPrime function onVisibleChanged ( vValue ) { if (_treatmentBloodPrime.visible) { - _treatmentMenu.hidden = true + _headerBar.menuHidden = true } } }