add netctlgui.h

rewrited some functions
This commit is contained in:
arcan1s
2014-07-21 10:25:10 +04:00
parent 79e7aa1926
commit 4600aae8bc
10 changed files with 138 additions and 154 deletions

View File

@ -29,7 +29,7 @@
#include <QProcess>
#include <QTextStream>
#include <netctlgui/netctlprofile.h>
#include <netctlgui/netctlgui.h>
/**
@ -186,6 +186,24 @@ QMap<QString, QString> NetctlProfile::getSettingsFromProfile(const QString profi
}
/**
* @fn ValueFromProfile
*/
QString NetctlProfile::getValueFromProfile(const QString profile, const QString key)
{
if (debug) qDebug() << "[NetctlProfile]" << "[getValueFromProfile]";
if (debug) qDebug() << "[NetctlProfile]" << "[getValueFromProfile]" << ":" << "Profile" << profile;
if (debug) qDebug() << "[NetctlProfile]" << "[getValueFromProfile]" << ":" << "Key" << key;
QMap<QString, QString> settings = getSettingsFromProfile(profile);
if (settings.contains(key))
return settings[key];
else
return QString("");
}
/**
* @fn removeProfile
*/