.TH "KRootProp" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KRootProp \- Access \fBKDE\fP desktop resources stored on the root window.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <krootprop.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKRootProp\fP (const \fBQString\fP &rProp=QString::null)"
.br
.ti -1c
.RI "\fB~KRootProp\fP ()"
.br
.ti -1c
.RI "void \fBsetProp\fP (const \fBQString\fP &rProp=\fBQString\fP())"
.br
.ti -1c
.RI "\fBQString\fP \fBprop\fP () const "
.br
.ti -1c
.RI "void \fBdestroy\fP ()"
.br
.ti -1c
.RI "\fBQString\fP \fBreadEntry\fP (const \fBQString\fP &rKey, const \fBQString\fP &pDefault=QString::null) const "
.br
.ti -1c
.RI "int \fBreadNumEntry\fP (const \fBQString\fP &rKey, int nDefault=0) const "
.br
.ti -1c
.RI "\fBQFont\fP \fBreadFontEntry\fP (const \fBQString\fP &rKey, const \fBQFont\fP *pDefault=0) const "
.br
.ti -1c
.RI "\fBQColor\fP \fBreadColorEntry\fP (const \fBQString\fP &rKey, const \fBQColor\fP *pDefault=0) const "
.br
.ti -1c
.RI "\fBQString\fP \fBwriteEntry\fP (const \fBQString\fP &rKey, const \fBQString\fP &rValue)"
.br
.ti -1c
.RI "\fBQString\fP \fBwriteEntry\fP (const \fBQString\fP &rKey, int nValue)"
.br
.ti -1c
.RI "\fBQString\fP \fBwriteEntry\fP (const \fBQString\fP &rKey, const \fBQFont\fP &rFont)"
.br
.ti -1c
.RI "\fBQString\fP \fBwriteEntry\fP (const \fBQString\fP &rKey, const \fBQColor\fP &rColor)"
.br
.ti -1c
.RI "\fBQString\fP \fBremoveEntry\fP (const \fBQString\fP &rKey)"
.br
.ti -1c
.RI "\fBQStringList\fP \fBlistEntries\fP () const "
.br
.ti -1c
.RI "void \fBsync\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Access \fBKDE\fP desktop resources stored on the root window. 

A companion to the \fBKConfig\fP class.
.PP
The KRootProp class is used for reading and writing configuration entries to properties on the root window.
.PP
All configuration entries are of the form 'key=value'.
.PP
\fBSee also:\fP
.RS 4
\fBKConfig::KConfig\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Mark Donohoe (donohe@kde.org) 
.RE
.PP

.PP
Definition at line 46 of file krootprop.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KRootProp::KRootProp (const \fBQString\fP & rProp = \fCQString::null\fP)"
.PP
Constructs a KRootProp object for the property \fCrProp\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIrProp\fP the property that will be searched, null to do nothing 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetProp()\fP 
.RE
.PP

.PP
Definition at line 35 of file krootprop.cpp.
.PP
References setProp().
.SS "KRootProp::~\fBKRootProp\fP ()"
.PP
Destructs the KRootProp object. 
.PP
Writes back any dirty configuration entries. 
.PP
Definition at line 42 of file krootprop.cpp.
.PP
References QMap::clear(), and sync().
.SH "Member Function Documentation"
.PP 
.SS "void KRootProp::setProp (const \fBQString\fP & rProp = \fC\fBQString\fP()\fP)"
.PP
Sets the property in which keys will be searched. 
.PP
\fBParameters:\fP
.RS 4
\fIrProp\fP the property that will be searched 
.RE
.PP

.PP
Definition at line 74 of file krootprop.cpp.
.PP
References QString::find(), QString::fromUtf8(), QMap::insert(), QString::left(), QString::length(), QString::mid(), QString::remove(), QString::simplifyWhiteSpace(), and sync().
.PP
Referenced by KRootProp().
.SS "\fBQString\fP KRootProp::prop () const"
.PP
Returns the name of the property under which keys are searched. 
.PP
\fBReturns:\fP
.RS 4
the property that will be searched 
.RE
.PP

.PP
Definition at line 144 of file krootprop.cpp.
.SS "void KRootProp::destroy ()"
.PP
Destroys the property completely. 
.PP
I.e. all entries will be cleared and the property will be removed from the root window. 
.PP
Definition at line 149 of file krootprop.cpp.
.PP
References QMap::clear().
.SS "\fBQString\fP KRootProp::readEntry (const \fBQString\fP & rKey, const \fBQString\fP & pDefault = \fCQString::null\fP) const"
.PP
Reads the value of an entry specified by \fCrKey\fP in the current property. 
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to search for. 
.br
\fIpDefault\fP A default value returned if the key was not found. 
.RE
.PP
\fBReturns:\fP
.RS 4
The value for this key or the default if no value was found. 
.RE
.PP

.PP
Definition at line 159 of file krootprop.cpp.
.PP
References QMap::contains().
.PP
Referenced by readColorEntry(), readFontEntry(), and readNumEntry().
.SS "int KRootProp::readNumEntry (const \fBQString\fP & rKey, int nDefault = \fC0\fP) const"
.PP
Reads a numerical value. 
.PP
Reads the value of an entry specified by \fCrKey\fP in the current property and interprets it numerically.
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to search for. 
.br
\fInDefault\fP A default value returned if the key was not found. 
.RE
.PP
\fBReturns:\fP
.RS 4
The value for this key or the default if no value was found. 
.RE
.PP

.PP
Definition at line 168 of file krootprop.cpp.
.PP
References QString::isNull(), readEntry(), and QString::toInt().
.SS "\fBQFont\fP KRootProp::readFontEntry (const \fBQString\fP & rKey, const \fBQFont\fP * pDefault = \fC0\fP) const"
.PP
Reads a \fBQFont\fP value. 
.PP
Reads the value of an entry specified by \fCrKey\fP in the current property and interpret it as a font object.
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to search for. 
.br
\fIpDefault\fP A default value returned if the key was not found. 
.RE
.PP
\fBReturns:\fP
.RS 4
The value for this key or a default font if no value was found. 
.RE
.PP

.PP
Definition at line 184 of file krootprop.cpp.
.PP
References QFont::fromString(), QString::isNull(), and readEntry().
.SS "\fBQColor\fP KRootProp::readColorEntry (const \fBQString\fP & rKey, const \fBQColor\fP * pDefault = \fC0\fP) const"
.PP
Reads a \fBQColor\fP. 
.PP
Reads the value of an entry specified by \fCrKey\fP in the current property and interprets it as a color.
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to search for. 
.br
\fIpDefault\fP A default value returned if the key was not found. 
.RE
.PP
\fBReturns:\fP
.RS 4
The value for this key or a default color if no value was found. 
.RE
.PP

.PP
Definition at line 204 of file krootprop.cpp.
.PP
References QString::find(), QString::isNull(), QString::left(), QString::mid(), readEntry(), QColor::setNamedColor(), QColor::setRgb(), and QString::toInt().
.SS "\fBQString\fP KRootProp::writeEntry (const \fBQString\fP & rKey, const \fBQString\fP & rValue)"
.PP
Writes a (key/value) pair. 
.PP
This is stored to the current property when destroying the config object or when calling \fBsync()\fP.
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to write. 
.br
\fIrValue\fP The value to write. 
.RE
.PP
\fBReturns:\fP
.RS 4
The old value for this key. If this key did not exist, a null string is returned. 
.RE
.PP

.PP
Definition at line 245 of file krootprop.cpp.
.PP
References QMap::contains(), QMap::insert(), and QMap::replace().
.PP
Referenced by writeEntry().
.SS "\fBQString\fP KRootProp::writeEntry (const \fBQString\fP & rKey, int nValue)"
.PP
Writes the (key/value) pair. 
.PP
Same as above, but writes a numerical value. 
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to write. 
.br
\fInValue\fP The value to write. 
.RE
.PP
\fBReturns:\fP
.RS 4
The old value for this key. If this key did not exist, a null string is returned. 
.RE
.PP

.PP
Definition at line 259 of file krootprop.cpp.
.PP
References QString::setNum(), and writeEntry().
.SS "\fBQString\fP KRootProp::writeEntry (const \fBQString\fP & rKey, const \fBQFont\fP & rFont)"
.PP
Writes the (key/value) pair. 
.PP
Same as above, but writes a font. 
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to write. 
.br
\fIrFont\fP The font to write. 
.RE
.PP
\fBReturns:\fP
.RS 4
The old value for this key. If this key did not exist, a null string is returned. 
.RE
.PP

.PP
Definition at line 268 of file krootprop.cpp.
.PP
References writeEntry().
.SS "\fBQString\fP KRootProp::writeEntry (const \fBQString\fP & rKey, const \fBQColor\fP & rColor)"
.PP
Writes the (key/value) pair. 
.PP
Same as above, but writes a color. 
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to write. 
.br
\fIrColor\fP The color to write. 
.RE
.PP
\fBReturns:\fP
.RS 4
The old value for this key. If this key did not exist, a null string is returned. 
.RE
.PP

.PP
Definition at line 273 of file krootprop.cpp.
.PP
References QString::arg(), and writeEntry().
.SS "\fBQString\fP KRootProp::removeEntry (const \fBQString\fP & rKey)"
.PP
Removes an entry. 
.PP
\fBParameters:\fP
.RS 4
\fIrKey\fP The key to remove. 
.RE
.PP
\fBReturns:\fP
.RS 4
The old value for this key. If this key did not exist, a null string is returned. 
.RE
.PP

.PP
Definition at line 280 of file krootprop.cpp.
.PP
References QMap::contains(), and QMap::remove().
.SS "\fBQStringList\fP KRootProp::listEntries () const"
.PP
Returns a list of all keys. 
.PP
\fBReturns:\fP
.RS 4
A \fBQStringList\fP containing all the keys. 
.RE
.PP

.PP
Definition at line 291 of file krootprop.cpp.
.PP
References QMap::begin(), and QMap::end().
.SS "void KRootProp::sync ()"
.PP
Flushes the entry cache. 
.PP
Writes back dirty configuration entries to the current property, This is called automatically from the destructor. 
.PP
Definition at line 48 of file krootprop.cpp.
.PP
References QString::arg(), QMap::begin(), QMap::end(), QMap::isEmpty(), QString::length(), and QString::utf8().
.PP
Referenced by setProp(), and ~KRootProp().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
