org.kde.koala

Class KRootProp

public class KRootProp extends Object implements QtSupport

Access 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".

Author: Mark Donohoe (donohe@kde.org)

See Also: KConfig

UNKNOWN: Access KDE desktop resources stored on the root window.

Constructor Summary
protected KRootProp(Class dummy)
KRootProp(String rProp)
Constructs a KRootProp object for the property rProp.
KRootProp()
Method Summary
voiddestroy()
Destroys the property completely.
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
ArrayListlistEntries()
Returns a list of all keys.
Stringprop()
Returns the name of the property under which keys are searched.
QColorreadColorEntry(String rKey, QColor pDefault)
Reads a QColor.
QColorreadColorEntry(String rKey)
StringreadEntry(String rKey, String pDefault)
Reads the value of an entry specified by rKey in the current property.
StringreadEntry(String rKey)
QFontreadFontEntry(String rKey, QFont pDefault)
Reads a QFont value.
QFontreadFontEntry(String rKey)
intreadNumEntry(String rKey, int nDefault)
Reads a numerical value.
intreadNumEntry(String rKey)
StringremoveEntry(String rKey)
Removes an entry.
voidsetProp(String rProp)
Sets the property in which keys will be searched.
voidsetProp()
voidsync()
Flushes the entry cache.
StringwriteEntry(String rKey, String rValue)
Writes a (key/value) pair.
StringwriteEntry(String rKey, int nValue)
Writes the (key/value) pair.
StringwriteEntry(String rKey, QFont rFont)
Writes the (key/value) pair.
StringwriteEntry(String rKey, QColor rColor)
Writes the (key/value) pair.

Constructor Detail

KRootProp

protected KRootProp(Class dummy)

KRootProp

public KRootProp(String rProp)
Constructs a KRootProp object for the property rProp.

Parameters: rProp the property that will be searched, null to do nothing

See Also: KRootProp

UNKNOWN: Constructs a KRootProp object for the property rProp.

KRootProp

public KRootProp()

Method Detail

destroy

public void destroy()
Destroys the property completely. I.e. all entries will be cleared and the property will be removed from the root window.

UNKNOWN: Destroys the property completely.

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

listEntries

public ArrayList listEntries()
Returns a list of all keys.

Returns: An ArrayList containing all the keys.

UNKNOWN: Returns a list of all keys.

prop

public String prop()
Returns the name of the property under which keys are searched.

Returns: the property that will be searched

UNKNOWN: Returns the name of the property under which keys are searched.

readColorEntry

public QColor readColorEntry(String rKey, QColor pDefault)
Reads a QColor. Reads the value of an entry specified by rKey in the current property and interprets 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.

UNKNOWN: Reads a QColor.

readColorEntry

public QColor readColorEntry(String rKey)

readEntry

public String readEntry(String rKey, String pDefault)
Reads 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 the default if no value was found.

UNKNOWN: Reads the value of an entry specified by rKey in the current property.

readEntry

public String readEntry(String rKey)

readFontEntry

public QFont readFontEntry(String rKey, QFont pDefault)
Reads a QFont value. Reads 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.

UNKNOWN: Reads a QFont value.

readFontEntry

public QFont readFontEntry(String rKey)

readNumEntry

public int readNumEntry(String rKey, int nDefault)
Reads a numerical value. Reads the value of an entry specified by rKey in the current property and interprets it numerically.

Parameters: rKey The key to search for. nDefault A default value returned if the key was not found.

Returns: The value for this key or the default if no value was found.

UNKNOWN: Reads a numerical value.

readNumEntry

public int readNumEntry(String rKey)

removeEntry

public String removeEntry(String rKey)
Removes an entry.

Parameters: rKey The key to remove.

Returns: The old value for this key. If this key did not exist, a null string is returned.

UNKNOWN: Removes an entry.

setProp

public void setProp(String rProp)
Sets the property in which keys will be searched.

Parameters: rProp the property that will be searched

UNKNOWN: Sets the property in which keys will be searched.

setProp

public void setProp()

sync

public void sync()
Flushes the entry cache. Writes back dirty configuration entries to the current property, This is called automatically from the destructor.

UNKNOWN: Flushes the entry cache.

writeEntry

public String writeEntry(String rKey, String rValue)
Writes a (key/value) pair. 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.

UNKNOWN: Writes a (key/value) pair.

writeEntry

public String writeEntry(String rKey, int nValue)
Writes the (key/value) pair. Same as above, but writes a numerical value.

Parameters: rKey The key to write. nValue The value to write.

Returns: The old value for this key. If this key did not exist, a null string is returned.

UNKNOWN: Writes the (key/value) pair.

writeEntry

public String writeEntry(String rKey, QFont rFont)
Writes the (key/value) pair. Same as above, but writes a font.

Parameters: rKey The key to write. rFont The font to write.

Returns: The old value for this key. If this key did not exist, a null string is returned.

UNKNOWN: Writes the (key/value) pair.

writeEntry

public String writeEntry(String rKey, QColor rColor)
Writes the (key/value) pair. Same as above, but writes a color.

Parameters: rKey The key to write. rColor The color to write.

Returns: The old value for this key. If this key did not exist, a null string is returned.

UNKNOWN: Writes the (key/value) pair.