Index: sources/gui/qml/pages/settings/SettingsWiFi.qml =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -ra2a273600d25e863214833ead3324a63fb4759f1 --- sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/gui/qml/pages/settings/SettingsWiFi.qml (.../SettingsWiFi.qml) (revision a2a273600d25e863214833ead3324a63fb4759f1) @@ -54,99 +54,63 @@ 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 y : _root.topMargin anchors.left : parent.left anchors.leftMargin : _root.leftMargin + TextEntry { id : _ssid + nextInput : _ipAddress // helps user to tap on enter to go to the next entry, keyboard visibility is handled by TextEntry. + textInput.text : vDevice.ssid + label.text : qsTr("SSID") + textInput.width : entryWidth + label.width : labelWidth + hasCursor : false // set false for now to disable the static IP entry for phase 1 + } + 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 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) - } +// validator : ipValidator // Will fail the validor if there are more than 1 ip } } - Row { id : _ssidRow - anchors.top : _ipColumn.bottom - anchors.topMargin : 50 - anchors.left : parent.left - anchors.leftMargin : _root.leftMargin - Text { id : _ssidLabel - font.pixelSize : Fonts.fontPixelTextRectExtra - color : Colors.textMain - horizontalAlignment : TextInput.Alignleft - width : labelWidth - text : qsTr("SSID") - } - - Text { id : _ssidText - font.pixelSize : Fonts.fontPixelTextRectExtra - color : Colors.textMain - horizontalAlignment : TextInput.Alignleft - text : "" - width : entryWidth - } - } - TouchRect { id : _scanButton anchors.bottom : parent.bottom anchors.bottomMargin: Variables.mainMenuHeight * 2 + Variables.minVGap @@ -179,7 +143,7 @@ readonly property bool isConnected : wifiConnected onIsConnectedChanged: { if ( isConnected ) { - _ssidText.text = wifiSsid + vDevice.doInitWifiInfo() } } @@ -242,13 +206,11 @@ onConfirmClicked : { if ( isPassword ) { if( passwordCurrent.length > 0 ) { - // ===================== Device Controller: FIXME - // vNetwork.doJoinNetwork ( macAddress, passwordCurrent ) + vDevice.doWifiConnect( true, ssid, passwordCurrent ) pop() } } else { - // ===================== Device Controller: FIXME - // vNetwork.doDisconnectNetwork( macAddress ) + vDevice.doWifiConnect( false, ssid, "" ) pop() } }