| netctlgui 1.4.7 Qt library which interacts with netctl

- Main Page
- Classes
- Files

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

Public Member Functions | Static Public Member Functions | List of all members
NetctlProfile Class Reference

The NetctlProfile class interacts with netctl profiles. More...

Inheritance diagram for NetctlProfile:

## Public Member Functions
| NetctlProfile (const bool debugCmd=false, const QMap< QString, QString > settings=QMap< QString, QString >())
| NetctlProfile class constructor. More...
| ~NetctlProfile ()
| Netctl class destructor. More...
bool | copyProfile (const QString oldPath)
| method which copies temporary profile to PROFILE_DIR More...
QString | createProfile (const QString profile, const QMap< QString, QString > settings)
| method which creates temporary profile More...
QMap< QString, QString > | getSettingsFromProfile (const QString profile)
| method which reads settings from profile More...
QString | getValueFromProfile (const QString profile, const QString key)
| method which return value from profile by key More...
QStringList | getValuesFromProfile (const QString profile, const QStringList keys)
| method which return values from profile by keys More...
bool | removeProfile (const QString profile)
| method which removes profile 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 NetctlProfile class interacts with netctl profiles.

## Constructor & Destructor Documentation

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

NetctlProfile class constructor.

Parameters

  debugCmd | show debug messages
  settings | default settings. Needed keys are FORCE_SUDO (force to use sudo), PROFILE_DIR (path to directory which contains profiles), SUDO_PATH (path to sudo command)

NetctlProfile::~NetctlProfile | ( |  | ) |

Netctl class destructor.

## Member Function Documentation

bool NetctlProfile::copyProfile | ( | const QString | oldPath | ) |

method which copies temporary profile to PROFILE_DIR

Parameters

  oldPath | path to temprorary profile

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 NetctlProfile::createProfile | ( | const QString | profile,
|  | const QMap< QString, QString > | settings
| ) |  |

method which creates temporary profile

Parameters

  profile | profile name
  settings | profile configuration. All available keys will be printed to the profile

Returns
  temporary profile name

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

method which check system configuration and return recommended values to keys

Returns
  recommended parametrs

QMap<QString, QString> NetctlProfile::getSettingsFromProfile | ( | const QString | profile | ) |

method which reads settings from profile

Parameters

  profile | profile name

Returns
  settings from profile

QString NetctlProfile::getValueFromProfile | ( | const QString | profile,
|  | const QString | key
| ) |  |

method which return value from profile by key

Parameters

  profile | profile name
  key | required key

Returns
  value by key

QStringList NetctlProfile::getValuesFromProfile | ( | const QString | profile,
|  | const QStringList | keys
| ) |  |

method which return values from profile by keys

Parameters

  profile | profile name
  keys | required keys

Returns
  values by keys

bool NetctlProfile::removeProfile | ( | const QString | profile | ) |

method which removes 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:

- netctlprofile.h