mirror of
https://github.com/arcan1s/netctl-gui.git
synced 2025-07-14 14:25:52 +00:00
some library refactoring
This commit is contained in:
@ -39,25 +39,25 @@ NetctlAdaptor::~NetctlAdaptor()
|
||||
|
||||
|
||||
// netctlCommand
|
||||
QString NetctlAdaptor::ActiveProfile()
|
||||
QStringList NetctlAdaptor::ActiveProfile()
|
||||
{
|
||||
if (isNetctlAutoActive())
|
||||
return netctlCommand->autoGetActiveProfile();
|
||||
else
|
||||
return netctlCommand->getActiveProfile().join(QChar('|'));
|
||||
return netctlCommand->getActiveProfile();
|
||||
}
|
||||
|
||||
|
||||
QString NetctlAdaptor::ActiveProfileStatus()
|
||||
QStringList NetctlAdaptor::ActiveProfileStatus()
|
||||
{
|
||||
if (isNetctlAutoActive())
|
||||
return QString("netctl-auto");
|
||||
return QStringList() << QString("netctl-auto");
|
||||
else {
|
||||
QStringList status;
|
||||
QStringList profiles = ActiveProfile().split(QChar('|'));
|
||||
QStringList profiles = ActiveProfile();
|
||||
for (int i=0; i<profiles.count(); i++)
|
||||
status.append(netctlCommand->getProfileStatus(profiles[i]));
|
||||
return status.join(QChar('|'));
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,9 +108,9 @@ bool NetctlAdaptor::isProfileEnabled(const QString profile)
|
||||
}
|
||||
|
||||
|
||||
QString NetctlAdaptor::netctlActiveProfile()
|
||||
QStringList NetctlAdaptor::netctlActiveProfile()
|
||||
{
|
||||
return netctlCommand->getActiveProfile().join(QChar('|'));
|
||||
return netctlCommand->getActiveProfile();
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,8 +37,8 @@ public:
|
||||
|
||||
public slots:
|
||||
// netctlCommand
|
||||
QString ActiveProfile();
|
||||
QString ActiveProfileStatus();
|
||||
QStringList ActiveProfile();
|
||||
QStringList ActiveProfileStatus();
|
||||
bool autoIsProfileActive(const QString profile);
|
||||
bool autoIsProfileEnabled(const QString profile);
|
||||
QStringList Information();
|
||||
@ -46,7 +46,7 @@ public slots:
|
||||
bool isNetctlAutoEnabled();
|
||||
bool isProfileActive(const QString profile);
|
||||
bool isProfileEnabled(const QString profile);
|
||||
QString netctlActiveProfile();
|
||||
QStringList netctlActiveProfile();
|
||||
QStringList netctlProfileList();
|
||||
QStringList netctlVerboseProfileList();
|
||||
QStringList ProfileList();
|
||||
|
Reference in New Issue
Block a user