| netctlgui 1.4.7 Qt library which interacts with netctl

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Slots | Public Member Functions | Static Public Member Functions | List of all members
Netctl Class Reference

The Netctl class interacts with netctl. More...

Inheritance diagram for Netctl:

## Public Slots
bool | enableProfile (const QString profile)
| method which sets profile disabled or enabled More...
bool | forceStartProfile (const QString profile)
| method which force starts profile More...
bool | forceStopProfile (const QString profile)
| method which force stops profile More...
bool | reenableProfile (const QString profile)
| method which reenables profile More...
bool | restartProfile (const QString profile)
| method which restarts profile More...
bool | startProfile (const QString profile)
| method which starts or stops profile More...
bool | stopAllProfiles ()
| method which stops all profiles More...
bool | switchToProfile (const QString profile)
| method which starts another profile More...
bool | autoDisableAllProfiles ()
| method which sets all profiles disabled (netctl-auto) More...
bool | autoEnableProfile (const QString profile)
| method which sets profile disabled or enabled (netctl-auto) More...
bool | autoEnableAllProfiles ()
| method which sets all profiles enabled (netctl-auto) More...
bool | autoStartProfile (const QString profile)
| method which switchs to profile (netctl-auto) More...
bool | autoEnableService ()
| method which sets netctl-auto service enabled or disabled More...
bool | autoRestartService ()
| method which restarted netctl-auto service More...
bool | autoStartService ()
| method which starts or stops netctl-auto service More...

## Public Member Functions
| Netctl (const bool debugCmd=false, const QMap< QString, QString > settings=QMap< QString, QString >())
| Netctl class constructor. More...
| ~Netctl ()
| Netctl class destructor. More...
QStringList | getActiveProfile ()
| method which returns active profile name More...
QString | autoGetActiveProfile ()
| method which returns active profile name from netctl-auto More...
QList< netctlProfileInfo > | getProfileList ()
| method which returns profile informations from netctl More...
QList< netctlProfileInfo > | getProfileListFromNetctlAuto ()
| method which returns profile informations from netctl-auto More...
Q_DECL_DEPRECATED QString | getProfileDescription (const QString profile)
| method which gets description from profile More...
QString | getProfileStatus (const QString profile)
| method which gets profile status More...
bool | isProfileActive (const QString profile)
| method which checks if profile is active More...
bool | isProfileEnabled (const QString profile)
| method which checks if profile is enabled More...
bool | autoIsProfileActive (const QString profile)
| method which checks if profile is active (netctl-auto) More...
bool | autoIsProfileEnabled (const QString profile)
| method which checks if profile is enabled (netctl-auto) More...
bool | isNetctlAutoEnabled ()
| method which checks netctl-auto autoload status More...
bool | isNetctlAutoRunning ()
| method which checks netctl-auto status More...
QStringList | getWirelessInterfaceList ()
| method which gets wireless interface list from PREFERED_IFACE and IFACE_DIR More...

## Static Public Member Functions
static QMap< QString, QString > | getRecommendedConfiguration ()
| method which check system configuration and return recommended values to keys More...

## Detailed Description

The Netctl class interacts with netctl.

## Constructor & Destructor Documentation

Netctl::Netctl | ( | const bool | debugCmd = `false`,
|  | const QMap< QString, QString > | settings = `QMap< QString, QString >()`
| ) |  |
| explicit

Netctl class constructor.

Parameters

  debugCmd | show debug messages
  settings | default settings. Needed keys are FORCE_SUDO (force to use sudo), IFACE_DIR (path to directory with interfaces), PREFERED_IFACE (prefered interface for WiFi), NETCTL_PATH (path to netctl command), NETCTLAUTO_PATH (path to netctl-auto command), NETCTLAUTO_SERVICE (netctl-auto service name), PROFILE_DIR (path to directory which contains profiles), SUDO_PATH (path to sudo command), SYSTEMCTL_PATH (path to systemctl command)

Netctl::~Netctl | ( |  | ) |

Netctl class destructor.

## Member Function Documentation

bool Netctl::autoDisableAllProfiles | ( |  | ) |
| slot

method which sets all profiles disabled (netctl-auto)

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::autoEnableAllProfiles | ( |  | ) |
| slot

method which sets all profiles enabled (netctl-auto)

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::autoEnableProfile | ( | const QString | profile | ) |
| slot

method which sets profile disabled or enabled (netctl-auto)

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::autoEnableService | ( |  | ) |
| slot

method which sets netctl-auto service enabled or disabled

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

QString Netctl::autoGetActiveProfile | ( |  | ) |

method which returns active profile name from netctl-auto

Returns
  profile name or ""

bool Netctl::autoIsProfileActive | ( | const QString | profile | ) |

method which checks if profile is active (netctl-auto)

Parameters

  profile | profile name

Returns
  false if profile is inactive
  true if profile is active

bool Netctl::autoIsProfileEnabled | ( | const QString | profile | ) |

method which checks if profile is enabled (netctl-auto)

Parameters

  profile | profile name

Returns
  false if profile is disabled
  true if profile is enabled

bool Netctl::autoRestartService | ( |  | ) |
| slot

method which restarted netctl-auto service

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::autoStartProfile | ( | const QString | profile | ) |
| slot

method which switchs to profile (netctl-auto)

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::autoStartService | ( |  | ) |
| slot

method which starts or stops netctl-auto service

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::enableProfile | ( | const QString | profile | ) |
| slot

method which sets profile disabled or enabled

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::forceStartProfile | ( | const QString | profile | ) |
| slot

method which force starts profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::forceStopProfile | ( | const QString | profile | ) |
| slot

method which force stops profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

QStringList Netctl::getActiveProfile | ( |  | ) |

method which returns active profile name

Returns
  profile name or ""

Q_DECL_DEPRECATED QString Netctl::getProfileDescription | ( | const QString | profile | ) |

method which gets description from profile

Parameters

  profile | profile name

Returns
  profile description or ""

QList<netctlProfileInfo> Netctl::getProfileList | ( |  | ) |

method which returns profile informations from netctl

Returns
  list of profiles

QList<netctlProfileInfo> Netctl::getProfileListFromNetctlAuto | ( |  | ) |

method which returns profile informations from netctl-auto

Returns
  list of profiles from netctl-auto

QString Netctl::getProfileStatus | ( | const QString | profile | ) |

method which gets profile status

Parameters

  profile | profile name

Returns
  profile status. It may be "active (enabled)", "active (static)", "inactive (enabled)", "inactive (static)"

static QMap<QString, QString> Netctl::getRecommendedConfiguration | ( |  | ) |
| static

method which check system configuration and return recommended values to keys

Returns
  recommended parametrs

QStringList Netctl::getWirelessInterfaceList | ( |  | ) |

method which gets wireless interface list from PREFERED_IFACE and IFACE_DIR

Returns
  interface list. If PREFERED_IFACE is not empty it will be first element

bool Netctl::isNetctlAutoEnabled | ( |  | ) |

method which checks netctl-auto autoload status

Returns
  false if netctl-auto is disabled
  true if netctl-auto is enabled

bool Netctl::isNetctlAutoRunning | ( |  | ) |

method which checks netctl-auto status

Returns
  false if netctl-auto is inactive
  true if netctl-auto is active

bool Netctl::isProfileActive | ( | const QString | profile | ) |

method which checks if profile is active

Parameters

  profile | profile name

Returns
  false if profile is inactive
  true if profile is active

bool Netctl::isProfileEnabled | ( | const QString | profile | ) |

method which checks if profile is enabled

Parameters

  profile | profile name

Returns
  false if profile is disabled
  true if profile is enabled

bool Netctl::reenableProfile | ( | const QString | profile | ) |
| slot

method which reenables profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::restartProfile | ( | const QString | profile | ) |
| slot

method which restarts profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::startProfile | ( | const QString | profile | ) |
| slot

method which starts or stops profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::stopAllProfiles | ( |  | ) |
| slot

method which stops all profiles

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

bool Netctl::switchToProfile | ( | const QString | profile | ) |
| slot

method which starts another profile

Parameters

  profile | profile name

Returns
  false if components are not found or command exit code is not equal to 0
  true if the method was completed without errors

The documentation for this class was generated from the following file:

- netctlinteract.h