Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -r59135abca5be03c9156d3847ccc1befa7132309e --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision 59135abca5be03c9156d3847ccc1befa7132309e) @@ -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 * @@ -53,14 +53,13 @@ confirmEnabled : isValid confirmVisible : false // since the static setting is done one by one seems confirm is not needed for now. firstFocusInput : _ipAddress - notificationText: vDevice.status + notificationText: vNetwork.status onConfirmClicked: { - // ===================== Device Controller: FIXME - // vNetwork.doConfirm( - // _ipAddress .textInput.text , - // _gateway .textInput.text , - // _subnetmask .textInput.text , - // _dns .textInput.text ) + vNetwork.doConfirm( + _ipAddress .textInput.text , + _gateway .textInput.text , + _subnetmask .textInput.text , + _dns .textInput.text ) } Column { id : _ipColumn @@ -71,56 +70,52 @@ 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 : vNetwork.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) + 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 : vNetwork.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 validator : ipValidator onEnterPressed : { - // ===================== Device Controller: FIXME - // vNetwork.doSetGateway(textInput.text) + 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 : vNetwork.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) + vNetwork.doSetSubnetMask(textInput.text) } } TextEntry { id : _dns - textInput.text : "dns" //TODO: Wifi + textInput.text : vNetwork.dns textInput.width : entryWidth 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) + vNetwork.doSetDNS(textInput.text) } } } @@ -155,15 +150,18 @@ text.text : qsTr("SCAN") width : 350 isDefault : true - enabled : vDevice.wifiListEnabled - onClicked : vDevice.wifiList = "" + // enabled : vDevice.wifiListEnabled + // onClicked : vDevice.wifiList = "" + enabled : !vNetwork.scanInProgress + onClicked : vNetwork.doScan() } ScrollBar { flickable : _networkList anchors.fill: _networkList } ListView { id : _networkList - model : vDevice + // model : vDevice + model : vNetwork clip : true spacing : 7 y : _root.topMargin @@ -236,19 +234,17 @@ property string macAddress : "" property string separator : "\n\n" readonly property string spaceSeparator : " " - notificationText : vDevice.status + notificationText : vNetwork.status message : qsTr("Do you want to disconnect from `%1`?").arg(ssid) title : isPassword ? qsTr("Join") + separator + ssid + spaceSeparator + qsTr("Password") : qsTr("Disconnect") + separator + ssid onConfirmClicked : { if ( isPassword ) { if( passwordCurrent.length > 0 ) { - // ===================== Device Controller: FIXME - // vNetwork.doJoinNetwork ( macAddress, passwordCurrent ) + vNetwork.doJoinNetwork ( macAddress, passwordCurrent ) pop() } } else { - // ===================== Device Controller: FIXME - // vNetwork.doDisconnectNetwork( macAddress ) + vNetwork.doDisconnectNetwork( macAddress ) pop() } }