* edit WiFi and ProfileList calls

* optimization of WifiMenu
* small refactoring
This commit is contained in:
arcan1s
2015-03-07 17:12:33 +03:00
parent 9993fee336
commit 2cf876cf32
26 changed files with 207 additions and 153 deletions

View File

@ -40,6 +40,8 @@ class NetctlProfile;
* profile name
* @var netctlProfileInfo::description
* profile description
* @var netctlProfileInfo::essid
* ESSID if any
* @var netctlProfileInfo::active
* whether profile is active
* @var netctlProfileInfo::enabled
@ -49,6 +51,7 @@ typedef struct
{
QString name;
QString description;
QString essid;
bool active;
bool enabled;
} netctlProfileInfo;

View File

@ -85,6 +85,13 @@ public:
* @return value by key
*/
QString getValueFromProfile(const QString profile, const QString key);
/**
* @brief method which return values from profile by keys
* @param profile profile name
* @param keys required keys
* @return values by keys
*/
QStringList getValuesFromProfile(const QString profile, const QStringList keys);
/**
* @brief method which removes profile
* @param profile profile name

View File

@ -43,6 +43,10 @@ class NetctlProfile;
* may be "WPA2", "WEP", "WEP", "none"
* @var netctlWifiInfo::signal
* Wifi point signal
* @var netctlWifiInfo::macs
* point MAC addresses
* @var netctlWifiInfo::frequencies
* point frequencies
* @var netctlWifiInfo::active
* whether associated profile is active
* @var netctlWifiInfo::exists
@ -50,9 +54,11 @@ class NetctlProfile;
*/
typedef struct
{
QStringList frequencies;
QStringList macs;
QString name;
QString security;
QString signal;
int signal;
bool active;
bool exists;
} netctlWifiInfo;