Index: sources/device/DeviceView.h =================================================================== diff -u -rf0c8b8720a2e314268445a4a20fe701292026f6f -ra2a273600d25e863214833ead3324a63fb4759f1 --- sources/device/DeviceView.h (.../DeviceView.h) (revision f0c8b8720a2e314268445a4a20fe701292026f6f) +++ sources/device/DeviceView.h (.../DeviceView.h) (revision a2a273600d25e863214833ead3324a63fb4759f1) @@ -96,6 +96,8 @@ QVariant data (const QModelIndex &vIndex , int vRole = Qt::DisplayRole ) const override ; void dataAppend (const DataModel &vData , bool vFirst , bool vSecond); void dataClear ( ); + bool setData (const QModelIndex &vIndex, const QVariant& vValue, int vRole = Qt::EditRole) override; + QModelIndex index (int vRow, int vColumn, const QModelIndex &vParent = QModelIndex()) const override; private: @@ -126,25 +128,30 @@ ATTRIBUTE ( QStringList , wifiList , {}, WifiList ) READONLY ( bool , wifiListEnabled , true ) + ATTRIBUTE ( QStringList , wifiInfo , {}, WifiInfo ) + + ATTRIBUTE ( bool , wifiConnect , false, WifiConnect ) + READONLY ( QString , ssid , "" ) 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); + void doWifiConnect(bool vConnect, const QString &vSsid, const QString &vPassword); private slots: void onPOSTOSVersionData (const QString &vOSVersion); private: void parseWifiListResult(const QString &vResult); void parseWifiInfoResult(const QString &vResult); + void updateWifiList(); + 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