|
ssu
|
Public Member Functions | |
| void | setSettings (SsuSettings *settings) |
| SsuSettings * | settings () |
| QVariant | variable (const QString §ion, const QString &key) |
| void | variableSection (const QString §ion, QHash< QString, QString > *storageHash) |
Static Public Member Functions | |
| static QString | defaultSection (SsuSettings *settings, const QString §ion) |
| static QString | resolveString (const QString &pattern, QHash< QString, QString > *variables, int recursionDepth=0) |
| static QString | resolveVariable (const QString &variable, QHash< QString, QString > *variables) |
| static QVariant | variable (SsuSettings *settings, const QString §ion, const QString &key) |
| static void | variableSection (SsuSettings *settings, const QString §ion, QHash< QString, QString > *storageHash) |
Definition at line 16 of file ssuvariables_p.h.
| SsuVariables::SsuVariables | ( | ) |
Definition at line 17 of file ssuvariables.cpp.
|
static |
Return a default variable section, if exists, or an empty string.
To identify the default section the section name gets split at '-', and the first token (or second token for "var-" sections) replaced with "default". You should therefore avoid "-" in section names.
Definition at line 22 of file ssuvariables.cpp.
|
static |
Resolve a whole string, containing several variables. Variables inside variables are allowed
Definition at line 39 of file ssuvariables.cpp.
|
static |
Resolve variables; variable can be passed as %(var) or var
Definition at line 81 of file ssuvariables.cpp.
| void SsuVariables::setSettings | ( | SsuSettings * | settings | ) |
Set the settings object to use
Definition at line 139 of file ssuvariables.cpp.
| SsuSettings * SsuVariables::settings | ( | ) |
Definition at line 144 of file ssuvariables.cpp.
| QVariant SsuVariables::variable | ( | const QString & | section, |
| const QString & | key ) |
Return a variable from the given variable section. 'var'- is automatically prepended to the section name if not specified already. Recursive search through several variable sections (specified in the section) is supported, returned will be the last occurence of the variable.
Definition at line 150 of file ssuvariables.cpp.
|
static |
Definition at line 158 of file ssuvariables.cpp.
| void SsuVariables::variableSection | ( | const QString & | section, |
| QHash< QString, QString > * | storageHash ) |
Return the requested variable section, recursively looking up all variable sections referenced inside with the 'variable' keyword. 'var-' is automatically prepended to the section names of included variable sections, but not for the parent section.
Variables starting with _ are treated as local variables and are ignored. The special key 'local' may contain a section-specific stringlist with additional keys which should be treated local.
This function tries to identify a default configuration section, and merges the default section with the requested section.
Definition at line 173 of file ssuvariables.cpp.
|
static |
Definition at line 179 of file ssuvariables.cpp.