Index: leahi.qrc =================================================================== diff -u -r80e196a153549a10b01ddc52fdd3c4f09d215da6 -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 --- leahi.qrc (.../leahi.qrc) (revision 80e196a153549a10b01ddc52fdd3c4f09d215da6) +++ leahi.qrc (.../leahi.qrc) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -45,6 +45,7 @@ sources/gui/qml/dialogs/AlarmDialog.qml sources/gui/qml/dialogs/PatientIdEntry.qml sources/gui/qml/dialogs/DryDemoDialog.qml + sources/gui/qml/dialogs/ConfirmPasswordDialog.qml sources/gui/qml/dialogs/diagnostics/DiagnosticsDialog.qml Index: sources/device/DeviceView.h =================================================================== diff -u -r80e196a153549a10b01ddc52fdd3c4f09d215da6 -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 --- sources/device/DeviceView.h (.../DeviceView.h) (revision 80e196a153549a10b01ddc52fdd3c4f09d215da6) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -93,7 +93,7 @@ READONLY ( QString , dns , "" ) READONLY ( bool , wifiError , false ) - Q_PROPERTY(MListModel* model READ model NOTIFY didModelChange ) + Q_PROPERTY(MListModel* wifiModel READ wifiModel NOTIFY didWifiModelChange ) VIEW_DEC_CLASS(VDevice) @@ -110,7 +110,7 @@ void parseWifiListResult(const QString &vResult); void parseWifiInfoResult(const QString &vResult); void updateWifiList(); - MListModel* model () { return &_wifiModel; } + MListModel* wifiModel () { return &_wifiModel; } MListModel _wifiModel; bool isCompleteResponse(Model::MDeviceResponseBase::Data vData) { @@ -121,6 +121,6 @@ } signals: - void didModelChange(); + void didWifiModelChange(); }; } Index: sources/gui/qml/dialogs/ConfirmPasswordDialog.qml =================================================================== diff -u --- sources/gui/qml/dialogs/ConfirmPasswordDialog.qml (revision 0) +++ sources/gui/qml/dialogs/ConfirmPasswordDialog.qml (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -0,0 +1,50 @@ +// Qt +import QtQuick 2.15 + +// Qml imports +import "qrc:/globals" +import "qrc:/components" +import "qrc:/dialogs" + +ConfirmDialog { id: _root + property bool isPassword : false + property string ssid : "" + property string separator : "\n" + readonly property string spaceSeparator : " " + readonly property int passwordLength : _passwordItem.passwordCurrent.length + readonly property string password : _passwordItem.passwordCurrent + + height : Variables.completeDialogHeight - 130 // need to make room for keyboard + width : Variables.completeDialogWidth + y : 0 + titleText : isPassword ? qsTr("Join ") + ssid : + qsTr("Disconnect ") + ssid + messageText : isPassword ? qsTr("Password") : qsTr("Do you want to disconnect from `%1`?").arg(ssid) + messageTextPixel : Fonts.fontPixelTextRectExtra + footerBottomMargin : Variables.defaultMargin * 2 + + Item { id: _passwordItem + readonly property string passwordCurrent : _passwordEntry.textInput.text + visible : _root.isPassword + anchors.centerIn: parent + + TextEntry { id: _passwordEntry + clip : true + textInput .width : 450 + textInput.inputMethodHints : Qt.ImhNone + textInput.echoMode : TextInput.Password + anchors.horizontalCenter : parent.horizontalCenter + label.text : "" + label.width : 0 + lengthMax : 30 + + onTextChanged: { + // Replace non-ASCII characters as they are typed in + var filtered = text.replace(/[^\x00-\x7F]/g, "") + if (text !== filtered) { text = filtered } // revert invalid characters + } + } + + onVisibleChanged: if ( visible ) _passwordEntry.textInput.forceActiveFocus() + } +} Index: sources/gui/qml/globals/Variables.qml =================================================================== diff -u -rccea9f498ece7b6f75e97d85c9312e67b736f98a -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 --- sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision ccea9f498ece7b6f75e97d85c9312e67b736f98a) +++ sources/gui/qml/globals/Variables.qml (.../Variables.qml) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -343,6 +343,6 @@ readonly property string unitTextHeparinConcentration : qsTr("IU/mL") // - hepatitis readonly property string unitHepatitis : qsTr("HbsAg") - // - hepatitis + // - storage readonly property string unitStorage : qsTr("MB") } Index: sources/gui/qml/pages/settings/SettingsExportLogs.qml =================================================================== diff -u -r320972a712c31e94413056591634859b4b3d564e -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 --- sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 320972a712c31e94413056591634859b4b3d564e) +++ sources/gui/qml/pages/settings/SettingsExportLogs.qml (.../SettingsExportLogs.qml) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -226,7 +226,7 @@ Text { id : _HeaderNameText width : _contentRect.columnWidthFileName height : parent.height - text : qsTr("Log Name:") + text : qsTr("Log Name") color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra verticalAlignment : Text.AlignVCenter @@ -235,7 +235,7 @@ Text { id : _HeaderSizeText width : _contentRect.columnWidthFileSize height : parent.height - text : qsTr("Size:") + text : qsTr("Size") color : Colors.textMain font.pixelSize : Fonts.fontPixelTextRectExtra verticalAlignment : Text.AlignVCenter Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -r821a3aca35299635f623a94f737f59728b924e2a -r0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 821a3aca35299635f623a94f737f59728b924e2a) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 0ce9ad2246ce63e9fcb706c0025ccf2a6ee88199) @@ -143,6 +143,15 @@ enabled : vDevice.wifiListEnabled onPressed : vDevice.wifiList = "" + + + RotationAnimator on rotation { + running : ! _refreshIcon.enabled + from : 0 + to : 360 + loops : Animation.Infinite + duration: 7200 + } } } @@ -151,7 +160,7 @@ height : parent.height - _header.height ListView { id : _networkList - model : vDevice.model + model : vDevice.wifiModel clip : true width : parent.width height : parent.height @@ -245,53 +254,17 @@ } } - ConfirmDialog { id: _wifiConfirmDialog - property bool isPassword : false - property string ssid : "" - property string separator : "\n" - readonly property string spaceSeparator : " " - height : Variables.completeDialogHeight - 130 // need to make room for keyboard - width : Variables.completeDialogWidth - y : 0 - titleText : isPassword ? qsTr("Join ") + ssid : - qsTr("Disconnect ") + ssid - messageText : isPassword ? qsTr("Password") : qsTr("Do you want to disconnect from `%1`?").arg(ssid) - messageTextPixel : Fonts.fontPixelTextRectExtra - footerBottomMargin : Variables.defaultMargin * 2 + ConfirmPasswordDialog { id: _wifiConfirmDialog - Item { id: _passwordItem - readonly property string passwordCurrent : _passwordEntry.textInput.text - visible : _wifiConfirmDialog.isPassword - anchors.centerIn: parent - - TextEntry { id: _passwordEntry - clip : true - textInput .width : 450 - textInput.inputMethodHints : Qt.ImhNone - textInput.echoMode : TextInput.Password - anchors.horizontalCenter : parent.horizontalCenter - label.text : "" - label.width : 0 - lengthMax : 30 - - onTextChanged: { - // Replace non-ASCII characters as they are typed in - var filtered = text.replace(/[^\x00-\x7F]/g, "") - if (text !== filtered) { text = filtered } // revert invalid characters - } - } - - onVisibleChanged: if ( visible ) _passwordEntry.textInput.forceActiveFocus() - } - onAccepted : { if ( isPassword ) { - if( _passwordItem.passwordCurrent.length > 0 ) { - vDevice.doWifiConnect( true, ssid, _passwordItem.passwordCurrent ) + if( passwordLength > 0 ) { + vDevice.doWifiConnect( true, ssid, password ) } } else { vDevice.doWifiConnect( false, ssid, "" ) } } } + }