KRootProp Class Reference

[kdecore Index] [kdecore Hierarchy] [Headers]


KDE Configuration Management class More...

#include <krootprop.h>

Public Members


Detailed Description

KDE desktop resources stored on the root window.

A companion to the KConfig class

The KRootProp class is used for reading and writing configuration entries to properties on the root window.

All configuration entries are of the form "key=value".

See Also: KConfig


KRootProp() [public]

Construct a KRootProp object.

~KRootProp() [public]

Destructor.

Writes back any dirty configuration entries.

void setProp(const QString& rProp="") [public]

Specify the property in which keys will be searched.

QString readEntry( const QString& rKey, const char* pDefault = 0 ) const [public]

Read the value of an entry specified by rKey in the current property

Parameters:
rKey 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 readNumEntry( const QString& rKey, int nDefault = 0 ) const [public]

Read a numerical value.

Read the value of an entry specified by rKey in the current property and interpret it numerically.

Parameters:
nDefault A default value returned if the key was not found.
rKey The key to search for.
Returns:
The value for this key or 0 if no value was found.

QFont readFontEntry( const QString& rKey, const QFont* pDefault = 0 ) const [public]

Read a QFont.

Read the value of an entry specified by rKey in the current property and interpret it as a font object.

Parameters:
rKey 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.

QColor readColorEntry( const QString& rKey, const QColor* pDefault = 0 ) const [public]

Read a QColor.

Read the value of an entry specified by rKey in the current property and interpret it as a color.

Parameters:
rKey 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.

QString writeEntry( const QString& rKey, const QString& rValue ) [public]

writeEntry() overridden to accept a const char * argument.

This is stored to the current property when destroying the config object or when calling Sync().

Parameters:
rKey The key to write.
rValue The value to write.
Returns:
The old value for this key. If this key did not exist, a null string is returned.
See Also:
writeEntry

QString writeEntry( const QString& rKey, int nValue ) [public]

Write the key value pair.Same as above, but write a numerical value.

Parameters:
nValue The value to write.
rKey The key to write.
Returns:
The old value for this key. If this key did not exist, a null string is returned.

QString writeEntry( const QString& rKey, const QFont& rFont ) [public]

Write the key value pair.Same as above, but write a font

Parameters:
rKey The key to write.
rValue The value to write.
Returns:
The old value for this key. If this key did not exist, a null string is returned.

QString writeEntry( const QString& rKey, const QColor& rColor ) [public]

Write the key value pair.Same as above, but write a color

Parameters:
rKey The key to write.
rValue The value to write.
Returns:
The old value for this key. If this key did not exist, a null string is returned.

void sync() [public]

Flush the entry cache.Write back dirty configuration entries to the current property, This is called automatically from the destructor.


  • Author: Mark Donohoe (donohe@kde.org)
  • Documentation generated by tasin@cd1 on Die Nov 30 17:31:35 CET 1999
Kdoc