Index: sources/gui/qml/main.qml =================================================================== diff -u -ra245272e6d8eee5c3658245570b6d31bd039af74 -r7f61f6da0818d40aed3ef528ae498ea3f619ae07 --- sources/gui/qml/main.qml (.../main.qml) (revision a245272e6d8eee5c3658245570b6d31bd039af74) +++ sources/gui/qml/main.qml (.../main.qml) (revision 7f61f6da0818d40aed3ef528ae498ea3f619ae07) @@ -14,7 +14,7 @@ */ // Qt -import QtQuick 2.12 +import QtQuick 2.12 // Project // C++ imports @@ -56,7 +56,7 @@ import VHDUsageInfo 0.1 import VAdjustmentInstitutionalRecord 0.1 // States views -import VHDOperationMode 0.1 +import VTDOpMode 0.1 //// ----- @LEAHIZED import VPreTreatmentStates 0.1 import VHDTreatmentStates 0.1 import VPostTreatmentStates 0.1 @@ -158,9 +158,9 @@ VAdjustmentInstitutionalRecord { id: vAdjustmentInstitutionalRecord } //VAdjustIn // ---- States - VHDOperationMode { id: vHDOperationMode + VTDOpMode { id: vTDOpMode onStandbyChanged: { - if(vHDOperationMode.standby) { + if(vTDOpMode.standby) { vTreatmentVitals.doReset() } } @@ -172,7 +172,7 @@ VTreatmentBloodFlow { id: vTreatmentBloodFlow } VTreatmentVitals { id: vTreatmentVitals interval : vTreatmentCreate.bloodPressureMeasureInterval - enableDialog: vHDOperationMode.inTreatment && vHDTreatmentStates.txTreatment + enableDialog: vTDOpMode.inTreatment && vHDTreatmentStates.txTreatment // As long as UI is in In-Tx BP/HR is updated and the dialog will pop up on interval. onEnableDialogChanged : { if ( vTreatmentVitals.enableDialog ) { @@ -293,129 +293,157 @@ } } - Connections { target: vHDOperationMode + Connections { target: vTDOpMode function onStandbyWaitDisinfectChanged ( vValue ) { _mainMenu.isTreatment() } } // 9 - Others - Text { // TEST : Application version should be moved into the information screen later. - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 10 + Rectangle { //TODO:@LEAHI: make this the statusbar/headerbar component. + anchors.top: parent.top + width : Variables.applicationWidth + height : Variables.notificationHeight + color : Colors.backgroundMainMenu + gradient: Gradient { //TODO:@LEAHI: make this a component. + GradientStop { position: 0.2; color: Qt.lighter(Colors.backgroundMain, 1.1) } + GradientStop { position: 0.8; color: Qt.darker (Colors.backgroundMain, 1.1) } } - 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 + Item { + width : 200 + anchors { + top : parent.top + left : parent.left + bottom : parent.bottom + margins : 10 + } + 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 + } + } } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom + Text { // TEST : Application version should be moved into the information screen later. + color : Colors.textMain + anchors { + top : parent.top + left : parent.left + leftMargin : 100 - height : 15 - text : "W:" // + vNetwork.wirelessIP // ===================== Device Controller: FIXME - font.pixelSize: 15 - } + } + horizontalAlignment : Text.AlignRight + verticalAlignment : Text.AlignBottom - Text { // TEST : Ethernet IP - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 475 + height : 15 + text : Qt.application.version //DEBUG: + "[" + _GuiView.platform + "]" + font.pixelSize: 14 } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - height : 15 - text : "E:" // + vNetwork.ethernetIP // ===================== Device Controller: FIXME - font.pixelSize: 15 - } + Text { // TEST : Wireless IP + color : Colors.textMain + anchors { + top : parent.top + left : parent.left + leftMargin : 325 + } + horizontalAlignment : Text.Alignleft + verticalAlignment : Text.AlignBottom - Text { // TEST : BluetoothStatus - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 615 + height : 15 + text : "W:" // + vNetwork.wirelessIP // ===================== Device Controller: FIXME + font.pixelSize: 15 } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - height : 15 - text : "B:" + vBluetooth.pairedAddr - font.pixelSize: 14 - } + Text { // TEST : Ethernet IP + color : Colors.textMain + anchors { + top : parent.top + left : parent.left + leftMargin : 475 + } + horizontalAlignment : Text.Alignleft + verticalAlignment : Text.AlignBottom - Text { // TEST : The treatment vital dialog countdown time - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 900 + height : 15 + text : "E:" // + vNetwork.ethernetIP // ===================== Device Controller: FIXME + font.pixelSize: 15 } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - height : 15 - //DEBUG text : "Vital Timer: " + vTreatmentVitals.min_left + " : " + vTreatmentVitals.sec_left - font.pixelSize: 14 - } + Text { // TEST : BluetoothStatus + color : Colors.textMain + anchors { + top : parent.top + left : parent.left + leftMargin : 615 + } + horizontalAlignment : Text.Alignleft + verticalAlignment : Text.AlignBottom - Text { // TEST : Current Date/Time - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 1080 + height : 15 + text : "B:" + vBluetooth.pairedAddr + font.pixelSize: 14 } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - height : 15 - text : vDateTime.current - 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 - Text { // TEST : Current timezone - color : Colors.textMain - anchors { - top : parent.top - left : parent.left - leftMargin : 1220 + height : 15 + //DEBUG text : "Vital Timer: " + vTreatmentVitals.min_left + " : " + vTreatmentVitals.sec_left + font.pixelSize: 14 } - horizontalAlignment : Text.Alignleft - verticalAlignment : Text.AlignBottom - height : 15 - text : vDateTime.timezone - 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 - 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 + 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() + } } - else { - _diagnosticsDialog.open() - } } } @@ -438,12 +466,12 @@ textPixelSize : Fonts.fontPixelAlarmBarTitle isSilenced : _alarmItem.isSilenced timeout : _alarmItem.timeout - backgroundFading : vHDOperationMode.fault + backgroundFading : vTDOpMode.fault } GuiView { id: _GuiView -// Component.onCompleted: { -// console.debug("GuiView - complete") -// } + // Component.onCompleted: { + // console.debug("GuiView - complete") + // } } }