Index: sources/device/DeviceView.h =================================================================== diff -u -ra5760947d3ed0d2748ba023a1c25e3c6aa0b1de1 -rfb5fdd155c1c6ea42fe1d308f2eed71094f10e5b --- sources/device/DeviceView.h (.../DeviceView.h) (revision a5760947d3ed0d2748ba023a1c25e3c6aa0b1de1) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision fb5fdd155c1c6ea42fe1d308f2eed71094f10e5b) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file DeviceView.h - * \author (last) Behrouz NematiPour - * \date (last) 10-Sep-2023 + * \author (last) Nico Ramirez + * \date (last) 23-June-2025 * \author (original) Behrouz NematiPour * \date (original) 03-Jun-2021 * @@ -47,6 +47,11 @@ eRole_WifiSignalLevel , eRole_WifiSupported , eRole_WifiConnected , + eRole_WifiIpAddress , + eRole_WifiGateway , + eRole_WifiSubnetMask , + eRole_WifiDns , + // ----- Bluetooth eRole_BLE_UNUSED , }; @@ -59,6 +64,10 @@ { eRole_WifiSignalLevel , "wifiSignalLevel" }, { eRole_WifiSupported , "wifiSupported" }, { eRole_WifiConnected , "wifiConnected" }, + { eRole_WifiIpAddress , "wifiIpAddress" }, + { eRole_WifiGateway , "wifiGateway" }, + { eRole_WifiSubnetMask , "wifiSubnetMask" }, + { eRole_WifiDns , "wifiDns" }, // ----- Bluetooth }; @@ -70,6 +79,11 @@ qint16 mWifiSignalLevel ; bool mWifiSupported = false ; bool mWifiConnected = false ; + QString mWifiIpAddress ; + QString mWifiGateway ; + QString mWifiSubnetMask ; + QString mWifiDns ; + // ----- Bluetooth QString mBle_Unused ; }; @@ -112,14 +126,27 @@ ATTRIBUTE ( QStringList , wifiList , {}, WifiList ) READONLY ( bool , wifiListEnabled , true ) + ATTRIBUTE ( QStringList , wifiInfo , {}, WifiInfo ) + READONLY ( QString , ipAddress , "" ) + READONLY ( QString , gateway , "" ) + READONLY ( QString , subnetMask , "" ) + READONLY ( QString , dns , "" ) + ATTRIBUTE ( bool , connectWifi , false, ConnectWifi ) VIEW_DEC_CLASS_EX(VDevice, QAbstractListModel) +public slots: + void doConnectWifi(const bool &vConnect, const QString &vSsid, const QString &vPassword); + private slots: void onPOSTOSVersionData (const QString &vOSVersion); +signals: + void didGetWifiInfo (); + private: void parseWifiListResult(const QString &vResult); + void parseWifiInfoResult(const QString &vResult); bool isCompleteResponse(Model::MDeviceResponseBase::Data vData) { // Either the script exited successfully or the script failed and the reason is provided // There are situations that the script is using the attribute response to update the UI