|
|
KConfigBaseData* |
[protected const]
Access to the configuration data.
Returns: a pointer to the configuration base data
void |
[protected]
Read the locale and put in the configuration data struct. Note: This should be done in the constructor, but this is not possible due to some mutual dependencies in KApplication::init()
void |
[protected pure virtual]
Parse all configuration files for a configuration object.
This method must be reimplemented by the derived classes. It should go through the list of appropriate files for a configuration object, open the files and call parseOneConfigFile() for each one of them.
void |
[protected virtual]
Parse one configuration file.
This method contains the actual configuration file parser. It can overridden by derived classes for specific parsing needs. For normal use, this should not be necessary.
Parameters:
rFile | The configuration file to parse |
bGlobal |
bool |
[protected pure virtual]
Write configuration file back.
This method must be reimplemented by derived classes. It should dump the data of the configuration object to the appropriate files.
Parameters:
rFile | The file to write |
bGlobal | Should the data be saved to a global file |
Returns: Whether some entries are left to be written to other files.
|
Construct a KConfigBase object.
~ |
[virtual]
Destructor.
Writes back any dirty configuration entries.
void |
Specify the group in which keys will be searched.
Switch back to the default group by passing an empty string.
Parameters:
pGroup | The name of the new group. |
const char* |
[const]
Retrieve the group where keys are currently searched in.
Returns: The current group
const char* |
[const]
Retrieve the group where keys are currently searched in. Note: this method is deprecated; use KConfigBase::group() instead.
Returns: The current group
const QString |
[const]
Read the value of an entry specified by rKey in the current group
Parameters:
pKey | The key to search for. |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or an empty string if no value was found.
int |
[const]
Read a list of strings.
Parameters:
pKey | The key to search for |
list | In this object, the read list will be returned. |
sep | The list separator (default ",") |
Returns: The number of entries in the list.
int |
[const]
Read a numerical value.
Read the value of an entry specified by rKey in the current group and interpret it numerically.
Parameters:
pKey | The key to search for. |
nDefault | A default value returned if the key was not found. |
Returns: The value for this key or 0 if no value was found.
unsigned int |
[const]
Read a numerical value.
Read the value of an entry specified by rKey in the current group and interpret it numerically.
Parameters:
pKey | The key to search for. |
nDefault | A default value returned if the key was not found. |
Returns: The value for this key or 0 if no value was found.
long |
[const]
Read a numerical value.
Read the value of an entry specified by rKey in the current group and interpret it numerically.
Parameters:
pKey | The key to search for. |
nDefault | A default value returned if the key was not found. |
Returns: The value for this key or 0 if no value was found.
unsigned long |
[const]
Read a numerical value.
Read the value of an entry specified by rKey in the current group and interpret it numerically.
Parameters:
pKey | The key to search for. |
nDefault | A default value returned if the key was not found. |
Returns: The value for this key or 0 if no value was found.
double |
[const]
Read a numerical value.
Read the value of an entry specified by rKey in the current group and interpret it numerically.
Parameters:
pKey | The key to search for. |
nDefault | A default value returned if the key was not found. |
Returns: The value for this key or 0 if no value was found.
QFont |
[const]
Read a QFont.
Read the value of an entry specified by rKey in the current group and interpret it as a font object.
Parameters:
pKey | The key to search for. |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default font if no value was found.
bool |
[const]
Read a boolean entry.
Read the value of an entry specified by pKey in the current group and interpret it as a boolean value. Currently "on" and "true" are accepted as true, everything else if false.
Parameters:
pKey | The key to search for |
bDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default value if no value was found.
QRect |
[const]
Read a rect entry.
Read the value of an entry specified by pKey in the current group and interpret it as a QRect object.
Parameters:
pKey | The key to search for |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default rectangle if no value was found.
QPoint |
[const]
Read a point entry.
Read the value of an entry specified by pKey in the current group and interpret it as a QPoint object.
Parameters:
pKey | The key to search for |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default point if no value was found.
QSize |
[const]
Read a size entry.
Read the value of an entry specified by pKey in the current group and interpret it as a QSize object.
Parameters:
pKey | The key to search for |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default point if no value was found.
QColor |
[const]
Read a QColor.
Read the value of an entry specified by rKey in the current group and interpret it as a color.
Parameters:
pKey | The key to search for. |
pDefault | A default value returned if the key was not found. |
Returns: The value for this key or a default color if no value was found.
const char* |
Write the key/value pair.
This is stored to the most specific config file when destroying the config object or when calling sync().
Parameters:
pKey | The key to write. |
pValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
writeEntry() overriden to accept a list of strings.
Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Parameters:
pKey | The key to write |
list | The list to write |
sep | The list separator |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
const char* |
Write the key value pair. Same as above, but write a numerical value.
Parameters:
pKey | The key to write. |
nValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write an unsigned numerical value.
Parameters:
pKey | The key to write. |
nValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write a long numerical value.
Parameters:
pKey | The key to write. |
nValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write an unsigned long numerical value.
Parameters:
pKey | The key to write. |
nValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write a floating-point value.
Parameters:
pKey | The key to write. |
nValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write a boolean value.
Parameters:
pKey | The key to write. |
bValue | The value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
const char* |
Write the key value pair. Same as above, but write a font
Parameters:
pKey | The key to write. |
rFont | The font value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
Write the key value pair. Same as above, but write a color
Parameters:
pKey | The key to write. |
rValue | The color value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
Write the key value pair. Same as above, but write a rectangle
Parameters:
pKey | The key to write. |
rValue | The rectangle value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
Write the key value pair. Same as above, but write a point
Parameters:
pKey | The key to write. |
rValue | The point value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
Write the key value pair. Same as above, but write a size
Parameters:
pKey | The key to write. |
rValue | The size value to write. |
bPersistent | If bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time. |
bGlobal | If bGlobal is true, the pair is not saved to the application specific config file, but to the global ~/.kderc |
bNLS | If bNLS is true, the locale tag is added to the key when writing it back. |
Returns: The old value for this key. If this key did not exist, a null string is returned.
void |
Turns on or off "dollar expansion" when reading config entries.
Parameters:
bExpand | if true, dollar expansion is turned on. |
bool |
[const]
Returns whether dollar expansion is on or off.
Returns: true if dollar expansion is on.
void |
[virtual]
Don't write dirty entries at destruction time. If bDeep is false, only the global dirty flag of the KConfig object gets cleared. If you then call writeEntry again, the global dirty flag is set again and all dirty entries will be written.
Parameters:
bDeep | if true, the dirty flags of all entries are cleared, as well as the global dirty flag. |
void |
[pure virtual]
Flush the entry cache. Write back dirty configuration entries to the most specific file. This is called automatically from the destructor. This method must be implemented by the derived classes.
bool |
[const]
Check if the key has an entry in the specified group Use this to determine if a key is not specified for the current group (HasKey returns false) or is specified but has no value ("key =EOL"; Has Key returns true, ReadEntry returns an empty string)
Parameters:
pKey | The key to search for. |
Returns: if true, the key is available
KGroupIterator* |
Returns an iterator on the list of groups
Returns: The group iterator. The caller is reponsable for deleting the iterator after using it.
KEntryIterator* |
Returns an iterator on the entries in the current group
Parameters:
pGroup | the group to provide an iterator for |
Returns: The iterator for the group or 0, if the group does not exist. The caller is responsible for deleting the iterator after using it.
void |
[virtual]
Reparses all configuration files. This is useful for programms which use standalone graphical configuration tools.
Generated by: prospector@porky.devel.redhat.com on Tue Aug 15 09:55:31 2000, using kdoc 2.0a36. |