Index: leahi.qrc =================================================================== diff -u -r544066717110941fc0133c22d197fd50953e65d5 -r44eb40bd3d3676d972c035a8fad1bf51eb01f4af --- leahi.qrc (.../leahi.qrc) (revision 544066717110941fc0133c22d197fd50953e65d5) +++ leahi.qrc (.../leahi.qrc) (revision 44eb40bd3d3676d972c035a8fad1bf51eb01f4af) @@ -44,6 +44,7 @@ sources/gui/qml/dialogs/headerbar/WiFiDialog.qml + sources/gui/qml/dialogs/headerbar/InformationDialog.qml resources/images/Logo d.png Index: sources/gui/qml/components/HeaderBar.qml =================================================================== diff -u -red8be1a75c2b1b3cc9f5e919fd38e135f707eac6 -r44eb40bd3d3676d972c035a8fad1bf51eb01f4af --- sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision ed8be1a75c2b1b3cc9f5e919fd38e135f707eac6) +++ sources/gui/qml/components/HeaderBar.qml (.../HeaderBar.qml) (revision 44eb40bd3d3676d972c035a8fad1bf51eb01f4af) @@ -51,27 +51,13 @@ } } - Text { id: _version // TEST : Application version should be moved into the information screen later. + Text { id: _timeZone // TEST : Current timezone color : Colors.textMain anchors { top : parent.top left : parent.left + leftMargin : parent.width / 5 } - horizontalAlignment : Text.AlignHCenter - verticalAlignment : Text.AlignBottom - - height : 15 - width : _root.width / 4 - text : Qt.application.version //DEBUG: + "[" + _GuiView.platform + "]" - font.pixelSize: 14 - } - - Text { id: _timeZone // TEST : Current timezone - color : Colors.textMain - anchors { - top : parent.top - left : _version.right - } horizontalAlignment : Text.Alignleft verticalAlignment : Text.AlignBottom @@ -95,11 +81,7 @@ highlightHeight : 15 isMainTreatment : true - onHiddenChanged: { - if (hidden) { - index = 0 - } - } + onHiddenChanged: { if (hidden) { index = 0 } } } Row { id: _headerButtonRow @@ -116,7 +98,7 @@ iconImageSource : "qrc:/images/iPrescription" extraSpace : _headerButtonRow.spacing - onPressed: print("Prescription button pressed!") + onPressed : print("Prescription button pressed!") } IconButton { id : _wifiButton @@ -131,39 +113,39 @@ iconImageSource : "qrc:/images/iBluetooth" extraSpace : _headerButtonRow.spacing - onPressed: print("Bluetooth button pressed!") + onPressed : print("Bluetooth button pressed!") } IconButton { id : _cloudSyncButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iCloudSync" extraSpace : _headerButtonRow.spacing - onPressed: print("CloudSync button pressed!") + onPressed : print("CloudSync button pressed!") } IconButton { id : _storageButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iStorage" extraSpace : _headerButtonRow.spacing - onPressed: print("Storage button pressed!") + onPressed : print("Storage button pressed!") } IconButton { id : _settingsButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iSettings" extraSpace : _headerButtonRow.spacing - onPressed: print("Settings button pressed!") + onPressed : print("Settings button pressed!") } IconButton { id : _informationButton iconSize : Variables.headerIconDiameter iconImageSource : "qrc:/images/iInformation" extraSpace : _headerButtonRow.spacing - onPressed: print("Information button pressed!") + onPressed : _informationDialog.openDialog(_informationButton) } } } Index: sources/gui/qml/dialogs/headerbar/InformationDialog.qml =================================================================== diff -u --- sources/gui/qml/dialogs/headerbar/InformationDialog.qml (revision 0) +++ sources/gui/qml/dialogs/headerbar/InformationDialog.qml (revision 44eb40bd3d3676d972c035a8fad1bf51eb01f4af) @@ -0,0 +1,60 @@ +import QtQuick 2.12 + +import "qrc:/components" +import "qrc:/globals" + +HeaderBarPopup { id: _root + property int delegateWidth : calculateLargestTextWidth() + + function calculateLargestTextWidth() { + var maxWidth = 0; + for (var i = 0; i < _repeater.count; i++) { + var delegateItem = _repeater.itemAt(i); + if (delegateItem && delegateItem.children.length > 0) { + var textItem = delegateItem.children[0]; // Assuming Text is the first child + if (textItem && textItem.implicitWidth > maxWidth) { + maxWidth = textItem.implicitWidth; + } + } + } + return maxWidth; + } + + contentItem: Row { + anchors.centerIn : parent + + QRCode { id: _qrCode + + // FIX ME .. QML ERROR - NR + qrcode : "https://www.diality.com/moda-flx" + + } + + Column { id : _versionList + Repeater { id: _repeater + model: [("%1: %2").arg(qsTr("OS Version" )).arg(vDevice.osVersion ), + ("%1: %2").arg(qsTr("UI Version" )).arg(Qt.application.version ), + ("%1: %2").arg(qsTr("TD Version" )).arg(vAdjustmentVersions.tdVerDevice ), + ("%1: %2").arg(qsTr("TD FPGA Version" )).arg(vAdjustmentVersions.tdVerFPGA ), + ("%1: %2").arg(qsTr("TD Serial Number" )).arg(vAdjustmentVersions.tdSerial ), + ("%1: %2").arg(qsTr("DD Version" )).arg(vAdjustmentVersions.ddVerDevice ), + ("%1: %2").arg(qsTr("DD FPGA Version" )).arg(vAdjustmentVersions.ddVerFPGA ), + ("%1: %2").arg(qsTr("DD Serial Number" )).arg(vAdjustmentVersions.ddSerial )] + + delegate: Rectangle { id: _delegate + width : _root.delegateWidth + height : _text.contentHeight + + color : index % 2 == 0 ? "transparent" : Colors.dialogShadowColor + + Text { id: _text + anchors.fill : parent + color : Colors.dialogText + text : modelData + font.pixelSize : Fonts.fontPixelDialogText + } + } + } + } + } +} Index: sources/gui/qml/globals/Colors.qml =================================================================== diff -u -r3bee9f20350882eca47f3d18b0accf5bec3933d4 -r44eb40bd3d3676d972c035a8fad1bf51eb01f4af --- sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 3bee9f20350882eca47f3d18b0accf5bec3933d4) +++ sources/gui/qml/globals/Colors.qml (.../Colors.qml) (revision 44eb40bd3d3676d972c035a8fad1bf51eb01f4af) @@ -55,6 +55,7 @@ readonly property color backgroundUltrafiltrationButton : "#31568F" readonly property color textValueUltrafiltrationButtonFg: "#98aec2" readonly property color dialogText : "#343434" + readonly property color dialogShadowColor : "#334E759C" readonly property color backgroundRangeRect : "#3e546e" readonly property color highlightProgressBar : "#3d8eef" Index: sources/gui/qml/main.qml =================================================================== diff -u -r6d2d7392d9fbae0d24a79fabd0619d446025a946 -r44eb40bd3d3676d972c035a8fad1bf51eb01f4af --- sources/gui/qml/main.qml (.../main.qml) (revision 6d2d7392d9fbae0d24a79fabd0619d446025a946) +++ sources/gui/qml/main.qml (.../main.qml) (revision 44eb40bd3d3676d972c035a8fad1bf51eb01f4af) @@ -344,6 +344,7 @@ KeyboardItem { id: _keyboard } WiFiDialog { id: _wifiDialog } + InformationDialog { id: _informationDialog } LockDialog { id: _lockDialog } AlarmItem { id: _alarmItem ; z: 996 } PowerItem { id: _powerItem ; z: 997 }