IniSection Class Reference
INI section representation.
More...
#include <inisection.h>
List of all members.
Detailed Description
INI section representation.
Provides access to variables in specified INI file section.
Constructor & Destructor Documentation
IniSection::IniSection |
( |
Ini * |
pIni, |
|
|
const QString & |
sectionName | |
|
) |
| | |
Creates a valid IniSection object.
IniSection object will operate on specified Ini object and provide access to variables in specified section.
- Parameters:
-
| pIni | Pointer to Ini object on which this object will operate on. pIni is not deleted when this is deleted. pIni pointer is copied over when this is copied over. |
| sectionName | Name of the section for which the variables will be accessed. |
Member Function Documentation
IniVariable IniSection::createSetting |
( |
const QString & |
name, |
|
|
const QVariant & |
data | |
|
) |
| | |
Inits specified variable with specified data.
This method serves specifically for init purposes. If variable exists already exists, data will not be modified.
- Parameters:
-
| name | Name of the variable to init. If '/' character is used, a variable in subsection will be accessed. |
| data | Init data. This data will be assigned to variable if specified variable doesn't yet exist. |
- Returns:
- IniVariable object that wraps around specified variable. A valid IniVariable object is returned both if variable was just created or already existed when createSetting() was called. IniVariable object is created by a call to retrieveSetting(). Invalid IniVariable is created if name is empty.
void IniSection::deleteSetting |
( |
const QString & |
name |
) |
|
Deletes specified variable.
- Parameters:
-
| name | Name of the variable to init. If '/' character is used, a variable in subsection will be accessed. |
IniVariable IniSection::retrieveSetting |
( |
const QString & |
name |
) |
|
Gets a variable but only if it already exists.
- Parameters:
-
| name | Name of the variable to init. If '/' character is used, a variable in subsection will be accessed. |
- Returns:
- IniVariable object that wraps around the variable. May be invalid if name is empty.
IniVariable IniSection::setting |
( |
const QString & |
name |
) |
|
Gets a variable. Creates it first if it doesn't exist yet.
- Parameters:
-
| name | Name of the variable to init. If '/' character is used, a variable in subsection will be accessed. |
- Returns:
- IniVariable object that wraps around the variable. May be invalid if name is empty.
void IniSection::setValue |
( |
const QString & |
key, |
|
|
const QVariant & |
value | |
|
) |
| | |
Sets a variable directly. Omits the IniVariable system.
- Parameters:
-
| key | Path to the variable name. May include subsections by using '/' character. |
| value | New value for the variable. |
QVariant IniSection::value |
( |
const QString & |
key |
) |
const |
Retrieves a variable directly. Omits the IniVariable system.
- Returns:
- QVariant object that denotes the variable. May be invalid if variable is not defined.
The documentation for this class was generated from the following files: