KRootProp Class Reference
Access KDE desktop resources stored on the root window. More...
#include <krootprop.h>
Collaboration diagram for KRootProp:

Public Member Functions | |
KRootProp (const QString &rProp=QString::null) | |
~KRootProp () | |
void | setProp (const QString &rProp=QString()) |
QString | prop () const |
void | destroy () |
QString | readEntry (const QString &rKey, const QString &pDefault=QString::null) const |
int | readNumEntry (const QString &rKey, int nDefault=0) const |
QFont | readFontEntry (const QString &rKey, const QFont *pDefault=0) const |
QColor | readColorEntry (const QString &rKey, const QColor *pDefault=0) const |
QString | writeEntry (const QString &rKey, const QString &rValue) |
QString | writeEntry (const QString &rKey, int nValue) |
QString | writeEntry (const QString &rKey, const QFont &rFont) |
QString | writeEntry (const QString &rKey, const QColor &rColor) |
QString | removeEntry (const QString &rKey) |
QStringList | listEntries () const |
void | sync () |
Detailed Description
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".
- See also:
- KConfig::KConfig
- Author:
- Mark Donohoe (donohe@kde.org)
Definition at line 46 of file krootprop.h.
Constructor & Destructor Documentation
|
Constructs a KRootProp object for the property
Definition at line 35 of file krootprop.cpp. References KRootProp(), and setProp(). Referenced by KRootProp(). |
|
Destructs the KRootProp object. Writes back any dirty configuration entries. Definition at line 42 of file krootprop.cpp. References QMap< QString, QString >::clear(), and sync(). |
Member Function Documentation
|
Sets the property in which keys will be searched.
Definition at line 74 of file krootprop.cpp. References QString::find(), QMap< QString, QString >::insert(), QString::left(), QString::length(), QString::mid(), QString::remove(), setProp(), QString::simplifyWhiteSpace(), and sync(). Referenced by KRootProp(), and setProp(). |
|
Returns the name of the property under which keys are searched.
Definition at line 144 of file krootprop.cpp. |
|
Destroys the property completely. I.e. all entries will be cleared and the property will be removed from the root window. Definition at line 149 of file krootprop.cpp. References QMap< QString, QString >::clear(). |
|
Reads the value of an entry specified by
Definition at line 159 of file krootprop.cpp. References QMap< QString, QString >::contains(), and readEntry(). Referenced by readColorEntry(), readEntry(), readFontEntry(), and readNumEntry(). |
|
Reads a numerical value.
Reads the value of an entry specified by
Definition at line 168 of file krootprop.cpp. References QString::isNull(), readEntry(), readNumEntry(), and QString::toInt(). Referenced by readNumEntry(). |
|
Reads a QFont value.
Reads the value of an entry specified by
Definition at line 184 of file krootprop.cpp. References QFont::fromString(), QString::isNull(), readEntry(), and readFontEntry(). Referenced by readFontEntry(). |
|
Reads a QColor.
Reads the value of an entry specified by
Definition at line 204 of file krootprop.cpp. References QString::find(), QString::isNull(), QString::left(), QString::mid(), readColorEntry(), readEntry(), QColor::setNamedColor(), and QColor::setRgb(). Referenced by readColorEntry(). |
|
Writes a (key/value) pair. This is stored to the current property when destroying the config object or when calling sync().
Definition at line 245 of file krootprop.cpp. References QMap< QString, QString >::contains(), QMap< QString, QString >::insert(), QString::replace(), and writeEntry(). Referenced by writeEntry(). |
|
Writes the (key/value) pair. Same as above, but writes a numerical value.
Definition at line 259 of file krootprop.cpp. References QString::setNum(), and writeEntry(). |
|
Writes the (key/value) pair. Same as above, but writes a font.
Definition at line 268 of file krootprop.cpp. References QFont::toString(), and writeEntry(). |
|
Writes the (key/value) pair. Same as above, but writes a color.
Definition at line 273 of file krootprop.cpp. References QString::arg(), QColor::blue(), QColor::green(), QColor::red(), and writeEntry(). |
|
Removes an entry.
Definition at line 280 of file krootprop.cpp. References QMap< QString, QString >::contains(), QString::remove(), and removeEntry(). Referenced by removeEntry(). |
|
Returns a list of all keys.
Definition at line 291 of file krootprop.cpp. References QMap< QString, QString >::begin(), and QMap< QString, QString >::end(). |
|
Flushes the entry cache. Writes back dirty configuration entries to the current property, This is called automatically from the destructor. Definition at line 48 of file krootprop.cpp. References QString::arg(), QMap< QString, QString >::begin(), QMap< QString, QString >::end(), QMap< QString, QString >::isEmpty(), QString::length(), and QString::utf8(). Referenced by setProp(), and ~KRootProp(). |
The documentation for this class was generated from the following files: