Index: sources/gui/qml/main.qml =================================================================== diff -u -rf2e4eba6e85c5d36537be782926f23cc9dc01037 -r2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9 --- sources/gui/qml/main.qml (.../main.qml) (revision f2e4eba6e85c5d36537be782926f23cc9dc01037) +++ sources/gui/qml/main.qml (.../main.qml) (revision 2ad0fc5c1215088ee0e4ea7f9b2bc367c4ed2fd9) @@ -14,7 +14,7 @@ */ // Qt -import QtQuick 2.12 +import QtQuick 2.12 // Project // C++ imports @@ -285,124 +285,152 @@ } // 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() - } } } @@ -429,8 +457,8 @@ } GuiView { id: _GuiView -// Component.onCompleted: { -// console.debug("GuiView - complete") -// } + // Component.onCompleted: { + // console.debug("GuiView - complete") + // } } }