Index: sources/gui/qml/main.qml =================================================================== diff -u -r77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8 -r3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5 --- sources/gui/qml/main.qml (.../main.qml) (revision 77ba0083b790f7c1c851c60ecaeaa4f2e7eff7a8) +++ sources/gui/qml/main.qml (.../main.qml) (revision 3ef1a4ff361ba1774ad1a6f6170dbb174cadbdd5) @@ -263,14 +263,18 @@ 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 function isTreatment () { _mainMenu.itemPressed(0) } @@ -287,11 +291,11 @@ _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 } } @@ -300,154 +304,8 @@ } // 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 - } - 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 - } - } - } - 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.