Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r4738eb7857cb8fe9c49a9be4e211edc11e764a33 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 4738eb7857cb8fe9c49a9be4e211edc11e764a33) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file SettingsWiFi.qml - * \author (last) Behrouz NematiPour - * \date (last) 18-Jul-2023 + * \author (last) Nico Ramirez + * \date (last) 13-June-2025 * \author (original) Behrouz NematiPour * \date (original) 06-May-2021 * @@ -54,14 +54,6 @@ confirmVisible : false // since the static setting is done one by one seems confirm is not needed for now. firstFocusInput : _ipAddress notificationText: vDevice.status - onConfirmClicked: { - // ===================== Device Controller: FIXME - // vNetwork.doConfirm( - // _ipAddress .textInput.text , - // _gateway .textInput.text , - // _subnetmask .textInput.text , - // _dns .textInput.text ) - } Column { id : _ipColumn spacing : _root.spacing @@ -71,57 +63,42 @@ TextEntry { id : _ipAddress nextInput : _gateway // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "ipAddress" //TODO: Wifi + textInput.text : vDevice.ipAddress label.text : qsTr("IP Address") textInput.width : entryWidth label.width : labelWidth hasCursor : false // set false for now to disable the static IP entry for phase 1 validator : ipValidator - onEnterPressed : { - // ===================== Device Controller: FIXME - // vNetwork.doSetIPAddress(textInput.text) - } } TextEntry { id : _gateway nextInput : _subnetmask // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "gateway" //TODO: Wifi + textInput.text : vDevice.gateway textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Gateway") - hasCursor : false // set false for now to disable the static IP entry for phase 1 + hasCursor : false // set false for now to disable the static IP entry for phase 1 validator : ipValidator - onEnterPressed : { - // ===================== Device Controller: FIXME - // vNetwork.doSetGateway(textInput.text) - } } TextEntry { id : _subnetmask nextInput : _dns // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. - textInput.text : "subnetMask" //TODO: Wifi + textInput.text : vDevice.subnetMask textInput.width : entryWidth label.width : labelWidth label.text : qsTr("Subnet Mask") hasCursor : false // set false for now to disable the static IP entry for phase 1 validator : ipValidator - onEnterPressed : { - // ===================== Device Controller: FIXME - // vNetwork.doSetSubnetMask(textInput.text) - } } TextEntry { id : _dns - textInput.text : "dns" //TODO: Wifi + textInput.text : vDevice.dns textInput.width : entryWidth + textInput.wrapMode : Text.WordWrap label.width : labelWidth label.text : qsTr("DNS") hasCursor : false // set false for now to disable the static IP entry for phase 1 validator : ipValidator - onEnterPressed : { - // ===================== Device Controller: FIXME - // vNetwork.doSetDNS(textInput.text) - } } } @@ -180,6 +157,7 @@ onIsConnectedChanged: { if ( isConnected ) { _ssidText.text = wifiSsid + vDevice.status = "WiFi Connected to " + wifiSsid } } @@ -242,15 +220,22 @@ onConfirmClicked : { if ( isPassword ) { if( passwordCurrent.length > 0 ) { - // ===================== Device Controller: FIXME - // vNetwork.doJoinNetwork ( macAddress, passwordCurrent ) + vDevice.doConnectWifi( true, ssid, passwordCurrent ) pop() } } else { - // ===================== Device Controller: FIXME - // vNetwork.doDisconnectNetwork( macAddress ) + vDevice.doConnectWifi( false, ssid, "" ) pop() } } } + + Connections { target: vDevice + // slot to clear SSID when wifi list scan starts + function onWifiListEnabledChanged ( vValue ) { + if (!vValue) { + _ssidText.text = "" + } + } + } }