mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-12-02 02:53:42 +00:00
add netctlgui.h
rewrited some functions
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user