KConfigBase Class Reference
Abstract base class for KDE configuration entries. KDE Configuration Management abstract base class. More...
#include <kconfigbase.h>
Inheritance diagram for KConfigBase:

Public Types | |
enum | ConfigState |
Possible return values for getConfigState(). More... | |
Public Methods | |
KConfigBase () | |
Construct a KConfigBase object. | |
virtual | ~KConfigBase () |
Destructs the KConfigBase object. | |
void | setGroup (const QString &group) |
Specifies the group in which keys will be read and written. | |
void | setDesktopGroup () |
Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc. | |
QString | group () const |
Returns the name of the group in which we are searching for keys and from which we are retrieving entries. | |
bool | hasGroup (const QString &group) const |
Returns true if the specified group is known about. | |
virtual QStringList | groupList () const=0 |
Returns a list of groups that are known about. | |
QString | locale () const |
Returns a the current locale. | |
QString | readEntry (const QString &pKey, const QString &aDefault=QString::null) const |
Reads the value of an entry specified by pKey in the current group. | |
QString | readEntry (const char *pKey, const QString &aDefault=QString::null) const |
Reads the value of an entry specified by pKey in the current group. | |
QVariant | readPropertyEntry (const QString &pKey, QVariant::Type) const |
Reads the value of an entry specified by pKey in the current group. | |
QVariant | readPropertyEntry (const char *pKey, QVariant::Type) const |
Reads the value of an entry specified by pKey in the current group. | |
QVariant | readPropertyEntry (const QString &pKey, const QVariant &adefault) const |
Reads the value of an entry specified by pKey in the current group. | |
QVariant | readPropertyEntry (const char *pKey, const QVariant &aDefault) const |
Reads the value of an entry specified by pKey in the current group. | |
int | readListEntry (const QString &pKey, QStrList &list, char sep= ',') const |
Reads a list of strings. | |
int | readListEntry (const char *pKey, QStrList &list, char sep= ',') const |
Reads a list of strings. | |
QStringList | readListEntry (const QString &pKey, char sep= ',') const |
Reads a list of strings. | |
QStringList | readListEntry (const char *pKey, char sep= ',') const |
Reads a list of strings. | |
QValueList< int > | readIntListEntry (const QString &pKey) const |
Reads a list of Integers. | |
QValueList< int > | readIntListEntry (const char *pKey) const |
Reads a list of Integers. | |
QString | readPathEntry (const QString &pKey, const QString &aDefault=QString::null) const |
Reads a path. | |
QString | readPathEntry (const char *pKey, const QString &aDefault=QString::null) const |
Reads a path. | |
int | readNumEntry (const QString &pKey, int nDefault=0) const |
Reads a numerical value. | |
int | readNumEntry (const char *pKey, int nDefault=0) const |
Reads a numerical value. | |
unsigned int | readUnsignedNumEntry (const QString &pKey, unsigned int nDefault=0) const |
Reads an unsigned numerical value. | |
unsigned int | readUnsignedNumEntry (const char *pKey, unsigned int nDefault=0) const |
Reads an unsigned numerical value. | |
long | readLongNumEntry (const QString &pKey, long nDefault=0) const |
Reads a numerical value. | |
long | readLongNumEntry (const char *pKey, long nDefault=0) const |
Reads a numerical value. | |
unsigned long | readUnsignedLongNumEntry (const QString &pKey, unsigned long nDefault=0) const |
Read an unsigned numerical value. | |
unsigned long | readUnsignedLongNumEntry (const char *pKey, unsigned long nDefault=0) const |
Read an unsigned numerical value. | |
double | readDoubleNumEntry (const QString &pKey, double nDefault=0.0) const |
Reads a floating point value. | |
double | readDoubleNumEntry (const char *pKey, double nDefault=0.0) const |
Reads a floating point value. | |
QFont | readFontEntry (const QString &pKey, const QFont *pDefault=0L) const |
Reads a QFont value. | |
QFont | readFontEntry (const char *pKey, const QFont *pDefault=0L) const |
Reads a QFont value. | |
bool | readBoolEntry (const QString &pKey, const bool bDefault=false) const |
Reads a boolean entry. | |
bool | readBoolEntry (const char *pKey, const bool bDefault=false) const |
Reads a boolean entry. | |
QRect | readRectEntry (const QString &pKey, const QRect *pDefault=0L) const |
Reads a QRect entry. | |
QRect | readRectEntry (const char *pKey, const QRect *pDefault=0L) const |
Reads a QRect entry. | |
QPoint | readPointEntry (const QString &pKey, const QPoint *pDefault=0L) const |
Reads a QPoint entry. | |
QPoint | readPointEntry (const char *pKey, const QPoint *pDefault=0L) const |
Reads a QPoint entry. | |
QSize | readSizeEntry (const QString &pKey, const QSize *pDefault=0L) const |
Reads a QSize entry. | |
QSize | readSizeEntry (const char *pKey, const QSize *pDefault=0L) const |
Reads a QSize entry. | |
QColor | readColorEntry (const QString &pKey, const QColor *pDefault=0L) const |
Reads a QColor entry. | |
QColor | readColorEntry (const char *pKey, const QColor *pDefault=0L) const |
Reads a QColor entry. | |
QDateTime | readDateTimeEntry (const QString &pKey, const QDateTime *pDefault=0L) const |
Reads a QDateTime entry. | |
QDateTime | readDateTimeEntry (const char *pKey, const QDateTime *pDefault=0L) const |
Reads a QDateTime entry. | |
QString | readEntryUntranslated (const QString &pKey, const QString &aDefault=QString::null) const |
Reads the value of an entry specified by pKey in the current group. | |
QString | readEntryUntranslated (const char *pKey, const QString &aDefault=QString::null) const |
Reads the value of an entry specified by pKey in the current group. | |
void | writeEntry (const QString &pKey, const QString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a key/value pair. | |
void | writeEntry (const char *pKey, const QString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a key/value pair. | |
void | writeEntry (const QString &pKey, const QVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() Overridden to accept a property. | |
void | writeEntry (const char *pKey, const QVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() Overridden to accept a property. | |
void | writeEntry (const QString &pKey, const QStrList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of strings. | |
void | writeEntry (const char *pKey, const QStrList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of strings. | |
void | writeEntry (const QString &pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of strings. | |
void | writeEntry (const char *pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of strings. | |
void | writeEntry (const QString &pKey, const QValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of Integers. | |
void | writeEntry (const char *pKey, const QValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
writeEntry() overridden to accept a list of Integers. | |
void | writeEntry (const QString &pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Write a (key/value) pair. | |
void | writeEntry (const char *pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Write a (key/value) pair. | |
void | writeEntry (const QString &pKey, int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Write a (key/value) pair. | |
void | writeEntry (const char *pKey, int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Write a (key/value) pair. | |
void | writeEntry (const QString &pKey, unsigned int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, unsigned int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, unsigned long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, unsigned long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, double nValue, bool bPersistent=true, bool bGlobal=false, char format= 'g', int precision=6, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, double nValue, bool bPersistent=true, bool bGlobal=false, char format= 'g', int precision=6, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, bool bValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, bool bValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const QString &pKey, const QSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writeEntry (const char *pKey, const QSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a (key/value) pair. | |
void | writePathEntry (const QString &pKey, const QString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a file path. | |
void | writePathEntry (const char *pKey, const QString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
Writes a file path. | |
void | deleteEntry (const QString &pKey, bool bNLS=false, bool bGlobal=false) |
Deletes the entry specified by pKey in the current group. | |
void | deleteEntry (const char *pKey, bool bNLS=false, bool bGlobal=false) |
Deletes the entry specified by pKey in the current group. | |
bool | deleteGroup (const QString &group, bool bDeep=true, bool bGlobal=false) |
Deletes a configuration entry group. | |
void | setDollarExpansion (bool _bExpand=true) |
Turns on or off "dollar expansion" (see KConfigBase introduction) when reading config entries. | |
bool | isDollarExpansion () const |
Returns whether dollar expansion is on or off. | |
virtual void | rollback (bool bDeep=true) |
Mark the config object as "clean," i.e. | |
virtual void | sync () |
Flushes all changes that currently reside only in memory back to disk / permanent storage. | |
bool | isDirty () const |
Checks whether the config file has any dirty (modified) entries. | |
virtual void | setReadOnly (bool _ro) |
Sets the config object's read-only status. | |
bool | isReadOnly () const |
Returns the read-only status of the config object. | |
bool | hasKey (const QString &key) const |
Checks whether the key has an entry in the currently active group. | |
virtual QMap< QString, QString > | entryMap (const QString &group) const=0 |
Returns a map (tree) of entries for all entries in a particular group. | |
virtual void | reparseConfiguration ()=0 |
Reparses all configuration files. | |
bool | isImmutable () const |
Checks whether this configuration file can be modified. | |
bool | groupIsImmutable (const QString &group) const |
Checks whether it is possible to change the given group. | |
bool | entryIsImmutable (const QString &key) const |
Checks whether it is possible to change the given entry. | |
ConfigState | getConfigState () const |
Returns the state of the app-config object. | |
void | setGroup (const QCString &pGroup) |
Overloaded public methods:. | |
Protected Methods | |
void | setLocale () |
Reads the locale and put in the configuration data struct. | |
virtual void | setDirty (bool _bDirty=true) |
Sets the global dirty flag of the config object. | |
virtual void | parseConfigFiles () |
Parses all configuration files for a configuration object. | |
virtual KEntryMap | internalEntryMap (const QString &pGroup) const=0 |
Returns a map (tree) of the entries in the specified group. | |
virtual KEntryMap | internalEntryMap () const=0 |
Returns a map (tree) of the entries in the tree. | |
virtual void | putData (const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true)=0 |
Inserts a (key/value) pair into the internal storage mechanism of the configuration object. | |
virtual KEntry | lookupData (const KEntryKey &_key) const=0 |
Looks up an entry in the config object's internal structure. | |
Protected Attributes | |
KConfigBackEnd * | backEnd |
A back end for loading/saving to disk in a particular format. | |
QCString | mGroup |
The currently selected group. | |
QCString | aLocaleString |
The locale to retrieve keys under if possible, i.e en_US or fr. | |
bool | bDirty |
Indicates whether there are any dirty entries in the config object that need to be written back to disk. |
Detailed Description
Abstract base class for KDE configuration entries. KDE Configuration Management abstract base class.This class forms the base for all KDE configuration. It is an abstract base class, meaning that you cannot directly instantiate objects of this class. Either use KConfig (for usual KDE configuration) or KSimpleConfig (for special needs as in ksamba), or even KSharedConfig (stores values in shared memory).
All configuration entries are key, value pairs. Each entry also belongs to a specific group of related entries. All configuration entries that do not explicitly specify which group they are in are in a special group called the default group.
If there is a $ character in an entry, KConfigBase tries to expand environment variable and uses its value instead of its name. You can avoid this feature by having two consecutive $ characters in your config file which get expanded to one.
Note: the '=' char is not allowed in keys and the ']' char is not allowed in group name.
- Author:
- Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
- Version:
- Id:
- kconfigbase.h,v 1.83 2002/09/08 14:55:41 tjansen Exp
- See also:
- KGlobal::config() KConfig KSimpleConfig
Definition at line 70 of file kconfigbase.h.
Member Enumeration Documentation
|
Possible return values for getConfigState().
Definition at line 1583 of file kconfigbase.h. Referenced by getConfigState(), and KConfigBackEnd::getConfigState(). |
Constructor & Destructor Documentation
|
Construct a KConfigBase object.
Definition at line 122 of file kconfigbase.cpp. References setGroup(). |
|
Destructs the KConfigBase object.
Definition at line 129 of file kconfigbase.cpp. |
Member Function Documentation
|
Specifies the group in which keys will be read and written. Subsequent calls to readEntry() and writeEntry() will be aplied only in the activated group. Switch back to the default group by passing a null string.
Definition at line 150 of file kconfigbase.cpp. References QString::isNull(), mGroup, and QString::utf8(). Referenced by KStandardDirs::addCustomized(), KConfig::checkUpdate(), KInstance::config(), KNotifyClient::getDefaultFile(), KNotifyClient::getDefaultPresentation(), KNotifyClient::getFile(), KNotifyClient::getPresentation(), KIconEffect::init(), KApplication::invokeMailer(), KConfigBase(), KConfigGroupSaver::KConfigGroupSaver(), KIconTheme::KIconTheme(), KLocale::languagesTwoAlpha(), KDesktopFile::setActionGroup(), and KLocale::twoAlphaToCountryName(). |
|
Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc.
Definition at line 175 of file kconfigbase.cpp. References mGroup. Referenced by KDesktopFile::KDesktopFile(). |
|
Returns the name of the group in which we are searching for keys and from which we are retrieving entries.
Definition at line 171 of file kconfigbase.cpp. References QString::fromUtf8(), and mGroup. Referenced by KStandardDirs::addCustomized(), KConfig::checkUpdate(), and KConfig::groupList(). |
|
Returns true if the specified group is known about.
Definition at line 204 of file kconfigbase.cpp. References QString::utf8(). Referenced by KDesktopFile::hasActionGroup(), KShortcutList::readSettings(), and KShortcutList::writeSettings(). |
|
Returns a list of groups that are known about.
Implemented in KConfig. |
|
Returns a the current locale.
Definition at line 145 of file kconfigbase.cpp. References aLocaleString, and QString::fromUtf8(). |
|
|
Reads the value of an entry specified by
Definition at line 278 of file kconfigbase.cpp. References QString::ascii(), KEntry::bExpand, KEntryKey::bLocal, KEntryKey::c_key, QFile::encodeName(), QString::find(), QString::fromLocal8Bit(), QString::fromUtf8(), QString::isEmpty(), QString::isNull(), QCString::isNull(), QString::length(), lookupData(), mGroup, QString::mid(), KEntry::mValue, QTextStream::read(), QString::remove(), QString::replace(), setLocale(), and KGlobal::staticQString(). |
|
Reads the value of an entry specified by The value is treated as if it is of the given type. Note that only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.
Definition at line 416 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads the value of an entry specified by The value is treated as if it is of the given type. Note that only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.
Definition at line 422 of file kconfigbase.cpp. References QVariant::cast(), hasKey(), and readPropertyEntry(). |
|
Reads the value of an entry specified by The value is treated as if it is of the type of the given default value. Note that only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.
Definition at line 431 of file kconfigbase.cpp. References readPropertyEntry(), and QString::utf8(). |
|
Reads the value of an entry specified by The value is treated as if it is of the type of the given default value. Note that only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.
Definition at line 437 of file kconfigbase.cpp. References QValueList::append(), QVariant::asColor(), QVariant::asDateTime(), QVariant::asFont(), QVariant::asPoint(), QVariant::asRect(), QVariant::asSize(), QDateTime::date(), KStdAccel::end(), hasKey(), readBoolEntry(), readColorEntry(), readDateTimeEntry(), readDoubleNumEntry(), readEntry(), readFontEntry(), readListEntry(), readNumEntry(), readPointEntry(), readRectEntry(), readSizeEntry(), readUnsignedNumEntry(), QVariant::toBool(), QVariant::toDouble(), QVariant::toInt(), QVariant::toString(), QVariant::toUInt(), and QVariant::type(). |
|
Reads a list of strings.
Definition at line 512 of file kconfigbase.cpp. References QString::utf8(). Referenced by KStandardDirs::addCustomized(), KConfig::checkUpdate(), KIconTheme::KIconTheme(), KLocale::languagesTwoAlpha(), KDesktopFile::readActions(), readDateTimeEntry(), readIntListEntry(), readListEntry(), readPropertyEntry(), KDesktopFile::sortOrder(), and KDesktopFile::tryExec(). |
|
Reads a list of strings.
Definition at line 518 of file kconfigbase.cpp. References hasKey(), QCString::isEmpty(), QCString::length(), and QCString::truncate(). |
|
Reads a list of strings.
Definition at line 556 of file kconfigbase.cpp. References readListEntry(), and QString::utf8(). |
|
Reads a list of strings.
Definition at line 561 of file kconfigbase.cpp. References hasKey(), QString::isEmpty(), QString::length(), readEntry(), and QString::truncate(). |
|
Reads a list of Integers.
Definition at line 592 of file kconfigbase.cpp. References QString::utf8(). Referenced by KIconTheme::KIconTheme(). |
|
Reads a list of Integers.
Definition at line 597 of file kconfigbase.cpp. References readListEntry(). |
|
Reads a path.
Read the value of an entry specified by
Definition at line 609 of file kconfigbase.cpp. References QString::utf8(). |
|
Reads a path.
Read the value of an entry specified by
Definition at line 614 of file kconfigbase.cpp. References readEntry(). |
|
Reads a numerical value.
Read the value of an entry specified by
Definition at line 623 of file kconfigbase.cpp. References QString::utf8(). Referenced by KGlobalSettings::autoSelectDelay(), KGlobalSettings::completionMode(), KGlobalSettings::contrast(), KGlobalSettings::dndEventDelay(), KNotifyClient::getDefaultPresentation(), KNotifyClient::getPresentation(), KGlobalSettings::insertTearOffHandle(), KIconTheme::KIconTheme(), readPropertyEntry(), and KGlobalSettings::visualActivateSpeed(). |
|
Reads a numerical value.
Read the value of an entry specified by
Definition at line 628 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toInt(). |
|
Reads an unsigned numerical value.
Read the value of an entry specified by
Definition at line 644 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads an unsigned numerical value.
Read the value of an entry specified by
Definition at line 649 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toUInt(). |
|
Reads a numerical value.
Read the value of an entry specified by
Definition at line 663 of file kconfigbase.cpp. References QString::utf8(). |
|
Reads a numerical value.
Read the value of an entry specified by
Definition at line 668 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toLong(). |
|
Read an unsigned numerical value.
Read the value of an entry specified by
Definition at line 682 of file kconfigbase.cpp. References QString::utf8(). |
|
Read an unsigned numerical value.
Read the value of an entry specified by
Definition at line 687 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toULong(). |
|
Reads a floating point value.
Read the value of an entry specified by
Definition at line 700 of file kconfigbase.cpp. References QString::utf8(). Referenced by KIconEffect::init(), and readPropertyEntry(). |
|
Reads a floating point value.
Read the value of an entry specified by
Definition at line 705 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toDouble(). |
|
Reads a QFont value.
Read the value of an entry specified by
Definition at line 746 of file kconfigbase.cpp. References QString::utf8(). Referenced by KGlobalSettings::fixedFont(), KGlobalSettings::generalFont(), KGlobalSettings::menuFont(), readPropertyEntry(), KGlobalSettings::taskbarFont(), KGlobalSettings::toolBarFont(), and KGlobalSettings::windowTitleFont(). |
|
Reads a QFont value.
Read the value of an entry specified by
Definition at line 751 of file kconfigbase.cpp. References QString::contains(), QString::find(), QFont::fromString(), QString::isNull(), QString::left(), QString::length(), QString::mid(), readEntry(), QString::right(), QFont::setFamily(), QFont::setFixedPitch(), QFont::setItalic(), QFont::setPointSize(), QFont::setRawMode(), QFont::setStrikeOut(), QFont::setStyleHint(), QFont::setUnderline(), and QFont::setWeight(). |
|
Reads a boolean entry.
Read the value of an entry specified by
Definition at line 719 of file kconfigbase.cpp. References QString::utf8(). Referenced by KStandardDirs::addCustomized(), KApplication::authorize(), KGlobalSettings::changeCursorOverIcon(), KInstance::config(), KIconEffect::init(), KNotifyClient::Instance::Instance(), KApplication::invokeMailer(), KIconTheme::KIconTheme(), readPropertyEntry(), KGlobalSettings::showContextMenusOnPress(), KGlobalSettings::singleClick(), KDesktopFile::tryExec(), KGlobalSettings::visualActivate(), and KGlobalSettings::wheelMouseZooms(). |
|
Reads a boolean entry.
Read the value of an entry specified by
Definition at line 724 of file kconfigbase.cpp. References QCString::isNull(), and QCString::toInt(). |
|
Reads a QRect entry. Read the value of an entry specified by pKey in the current group and interpret it as a QRect object.
Definition at line 843 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads a QRect entry. Read the value of an entry specified by pKey in the current group and interpret it as a QRect object.
Definition at line 848 of file kconfigbase.cpp. References QCString::isEmpty(). |
|
Reads a QPoint entry.
Read the value of an entry specified by
Definition at line 867 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads a QPoint entry.
Read the value of an entry specified by
Definition at line 873 of file kconfigbase.cpp. References QCString::isEmpty(). |
|
Reads a QSize entry.
Read the value of an entry specified by
Definition at line 892 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads a QSize entry.
Read the value of an entry specified by
Definition at line 898 of file kconfigbase.cpp. References QCString::isEmpty(). |
|
Reads a QColor entry.
Read the value of an entry specified by
Definition at line 918 of file kconfigbase.cpp. References QString::utf8(). Referenced by KGlobalSettings::activeTextColor(), KGlobalSettings::activeTitleColor(), KGlobalSettings::alternateBackgroundColor(), KGlobalSettings::baseColor(), KGlobalSettings::highlightColor(), KGlobalSettings::highlightedTextColor(), KGlobalSettings::inactiveTextColor(), KGlobalSettings::inactiveTitleColor(), KIconEffect::init(), KGlobalSettings::linkColor(), readPropertyEntry(), KGlobalSettings::textColor(), KGlobalSettings::toolBarHighlightColor(), and KGlobalSettings::visitedLinkColor(). |
|
Reads a QColor entry.
Read the value of an entry specified by
Definition at line 924 of file kconfigbase.cpp. References QString::at(), QString::find(), QString::isEmpty(), QString::left(), QString::length(), QString::mid(), readEntry(), QString::right(), QColor::setNamedColor(), and QColor::setRgb(). |
|
Reads a QDateTime entry.
Read the value of an entry specified by
Definition at line 983 of file kconfigbase.cpp. References QString::utf8(). Referenced by readPropertyEntry(). |
|
Reads a QDateTime entry.
Read the value of an entry specified by
Definition at line 990 of file kconfigbase.cpp. References QDateTime::currentDateTime(), hasKey(), and readListEntry(). |
|
Reads the value of an entry specified by The untranslated entry is returned, you normally do not need this.
Definition at line 255 of file kconfigbase.cpp. References QString::utf8(). |
|
Reads the value of an entry specified by The untranslated entry is returned, you normally do not need this.
Definition at line 262 of file kconfigbase.cpp. References QString::fromUtf8(), and QCString::isNull(). |
|
Writes a key/value pair. This is stored in the most specific config file when destroying the config object or when calling sync().
Definition at line 1015 of file kconfigbase.cpp. References QString::utf8(). Referenced by writeEntry(), writePathEntry(), and KShortcutList::writeSettings(). |
|
Writes a key/value pair. This is stored in the most specific config file when destroying the config object or when calling sync().
Definition at line 1023 of file kconfigbase.cpp. References KEntry::bDirty, KEntry::bGlobal, KEntryKey::bLocal, KEntry::bNLS, KGlobal::locale(), mGroup, KEntry::mValue, putData(), setDirty(), setLocale(), and QString::utf8(). |
|
writeEntry() Overridden to accept a property. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1140 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
writeEntry() Overridden to accept a property. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1147 of file kconfigbase.cpp. References QValueList::begin(), QValueList::end(), KStdAccel::end(), QVariant::toBool(), QVariant::toColor(), QVariant::toDate(), QVariant::toDateTime(), QVariant::toDouble(), QVariant::toFont(), QVariant::toInt(), QVariant::toList(), QVariant::toPoint(), QVariant::toRect(), QVariant::toSize(), QVariant::toString(), QVariant::toStringList(), QVariant::toUInt(), QVariant::type(), and writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1233 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1240 of file kconfigbase.cpp. References QString::at(), QString::fromLatin1(), QString::fromLocal8Bit(), QString::fromUtf8(), QString::length(), QString::truncate(), and writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1275 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1282 of file kconfigbase.cpp. References QString::at(), QString::fromLatin1(), QString::length(), QString::truncate(), and writeEntry(). |
|
writeEntry() overridden to accept a list of Integers. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1310 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
writeEntry() overridden to accept a list of Integers. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1316 of file kconfigbase.cpp. References QValueList::begin(), QValueList::end(), KStdAccel::end(), QString::number(), and writeEntry(). |
|
Write a (key/value) pair. This is stored to the most specific config file when destroying the config object or when calling sync().
Definition at line 878 of file kconfigbase.h. References QString::fromLatin1(), and writeEntry(). |
|
Write a (key/value) pair. This is stored to the most specific config file when destroying the config object or when calling sync().
Definition at line 899 of file kconfigbase.h. References QString::fromLatin1(), and writeEntry(). |
|
Write a (key/value) pair. Same as above, but writes a numerical value.
Definition at line 1326 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Write a (key/value) pair. Same as above, but writes a numerical value.
Definition at line 1333 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned numerical value.
Definition at line 1341 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned numerical value.
Definition at line 1348 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a long numerical value.
Definition at line 1356 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a long numerical value.
Definition at line 1363 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned long numerical value.
Definition at line 1371 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned long numerical value.
Definition at line 1378 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a floating-point value.
Definition at line 1386 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a floating-point value.
Definition at line 1395 of file kconfigbase.cpp. References QString::number(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a boolean value.
Definition at line 1405 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a boolean value.
Definition at line 1413 of file kconfigbase.cpp. References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a font value.
Definition at line 1429 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a font value.
Definition at line 1436 of file kconfigbase.cpp. References QFont::toString(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a color entry. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1505 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a color entry. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1513 of file kconfigbase.cpp. References QColor::blue(), QColor::green(), QColor::isValid(), QColor::red(), QString::sprintf(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a date and time entry. Note: Unlike the other writeEntry() functions, the old value is not returned here!
Definition at line 1527 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a date and time entry. Note: Unlike the other writeEntry() functions, the old value is not returned here!
Definition at line 1534 of file kconfigbase.cpp. References QDateTime::date(), QDate::day(), QTime::hour(), QTime::minute(), QDate::month(), QTime::second(), QCString::setNum(), QDateTime::time(), writeEntry(), and QDate::year(). |
|
Writes a (key/value) pair. Same as above, but writes a rectangle. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1444 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a rectangle. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1451 of file kconfigbase.cpp. References QRect::height(), QRect::left(), QCString::setNum(), QRect::top(), QRect::width(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a point. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1466 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a point. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1473 of file kconfigbase.cpp. References QCString::setNum(), writeEntry(), QPoint::x(), and QPoint::y(). |
|
Writes a (key/value) pair. Same as above, but writes a size. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1486 of file kconfigbase.cpp. References QString::utf8(), and writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a size. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
Definition at line 1493 of file kconfigbase.cpp. References QSize::height(), QCString::setNum(), QSize::width(), and writeEntry(). |
|
Writes a file path. It is checked whether the path is located under $HOME. If so the path is written out with the user's home-directory replaced with $HOME. The path should be read back with readPathEntry()
Definition at line 1054 of file kconfigbase.cpp. References QString::utf8(). |
|
Writes a file path. It is checked whether the path is located under $HOME. If so the path is written out with the user's home-directory replaced with $HOME. The path should be read back with readPathEntry()
Definition at line 1061 of file kconfigbase.cpp. References KGlobal::dirs(), QString::isEmpty(), KStandardDirs::relativeLocation(), and writeEntry(). |
|
Deletes the entry specified by
Definition at line 1076 of file kconfigbase.cpp. References QString::utf8(). Referenced by KShortcutList::writeSettings(). |
|
Deletes the entry specified by
Definition at line 1083 of file kconfigbase.cpp. References KEntry::bDeleted, KEntry::bDirty, KEntry::bGlobal, KEntry::bNLS, KGlobal::locale(), mGroup, putData(), setDirty(), and setLocale(). |
|
Deletes a configuration entry group. If the group is not empty and bDeep is false, nothing gets deleted and false is returned. If this group is the current group and it is deleted, the current group is undefined and should be set with setGroup() before the next operation on the configuration object.
Definition at line 1109 of file kconfigbase.cpp. References QMap< KEntryKey, KEntry >::begin(), QMap< KEntryKey, KEntry >::end(), internalEntryMap(), QMap::isEmpty(), QMap< KEntryKey, KEntry >::isEmpty(), putData(), and setDirty(). Referenced by KShortcutList::writeSettings(). |
|
Turns on or off "dollar expansion" (see KConfigBase introduction) when reading config entries. Dollar sign expansion is initially OFF.
Definition at line 1457 of file kconfigbase.h. |
|
Returns whether dollar expansion is on or off. It is initially OFF.
Definition at line 1464 of file kconfigbase.h. |
|
Mark the config object as "clean," i.e.
don't write dirty entries at destruction time. If Classes that derive from KConfigBase should override this method and implement storage-specific behavior, as well as calling the KConfigBase::rollback() explicitly in the initializer.
Reimplemented in KConfig. Definition at line 1584 of file kconfigbase.cpp. References bDirty. Referenced by KConfig::rollback(), and sync(). |
|
Flushes all changes that currently reside only in memory back to disk / permanent storage. Dirty configuration entries are written to the most specific file available.
Asks the back end to flush out all pending writes, and then calls rollback(). No changes are made if the object has You should call this from your destructor in derivative classes.
Reimplemented in KSimpleConfig. Definition at line 1567 of file kconfigbase.cpp. References backEnd, isReadOnly(), rollback(), and KConfigBackEnd::sync(). Referenced by KShortcutList::writeSettings(), and KConfig::~KConfig(). |
|
Checks whether the config file has any dirty (modified) entries.
Definition at line 1501 of file kconfigbase.h. References bDirty. Referenced by KSimpleConfig::sync(), and KConfigINIBackEnd::sync(). |
|
Sets the config object's read-only status.
Definition at line 1510 of file kconfigbase.h. Referenced by KConfig::KConfig(), KDesktopFile::KDesktopFile(), and KSimpleConfig::KSimpleConfig(). |
|
Returns the read-only status of the config object.
Definition at line 1517 of file kconfigbase.h. Referenced by KConfigINIBackEnd::parseConfigFiles(), KSimpleConfig::sync(), sync(), and KConfigINIBackEnd::writeConfigFile(). |
|
Checks whether the key has an entry in the currently active group. Use this to determine whether a key is not specified for the current group (hasKey() returns false). Keys with null data are considered nonexistent.
Definition at line 180 of file kconfigbase.cpp. References KStdAccel::key(), and QString::utf8(). Referenced by KLocale::languagesTwoAlpha(), readDateTimeEntry(), readListEntry(), and readPropertyEntry(). |
|
Returns a map (tree) of entries for all entries in a particular group. Only the actual entry string is returned, none of the other internal data should be included.
Implemented in KConfig. |
|
Reparses all configuration files. This is useful for programs that use stand alone graphical configuration tools. The base method implemented here only clears the group list and then appends the default group. Derivative classes should clear any internal data structures and then simply call parseConfigFiles() when implementing this method.
Implemented in KConfig. |
|
Checks whether this configuration file can be modified.
Definition at line 219 of file kconfigbase.cpp. References getConfigState(). |
|
Checks whether it is possible to change the given group.
Definition at line 224 of file kconfigbase.cpp. References KEntry::bImmutable, getConfigState(), lookupData(), and QString::utf8(). |
|
Checks whether it is possible to change the given entry.
Definition at line 234 of file kconfigbase.cpp. References KEntry::bImmutable, KEntryKey::bLocal, KEntryKey::c_key, getConfigState(), KStdAccel::key(), lookupData(), mGroup, and QString::utf8(). |
|
Returns the state of the app-config object. Possible return values are NoAccess (the application-specific config file could not be opened neither read-write nor read-only), ReadOnly (the application-specific config file is opened read-only, but not read-write) and ReadWrite (the application-specific config file is opened read-write).
Definition at line 1578 of file kconfigbase.cpp. References backEnd, ConfigState, and KConfigBackEnd::getConfigState(). Referenced by entryIsImmutable(), groupIsImmutable(), and isImmutable(). |
|
Reads the locale and put in the configuration data struct. Note that this should be done in the constructor, but this is not possible due to some mutual dependencies in KApplication::init() Definition at line 133 of file kconfigbase.cpp. References aLocaleString, backEnd, KLocale::defaultLanguage(), KLocale::language(), KGlobal::locale(), KConfigBackEnd::setLocaleString(), and QString::utf8(). Referenced by deleteEntry(), parseConfigFiles(), readEntry(), and writeEntry(). |
|
Sets the global dirty flag of the config object.
Definition at line 1613 of file kconfigbase.h. References bDirty. Referenced by deleteEntry(), deleteGroup(), and writeEntry(). |
|
Parses all configuration files for a configuration object. The actual parsing is done by the associated KConfigBackEnd. Definition at line 1555 of file kconfigbase.cpp. References backEnd, KConfigBackEnd::getConfigState(), KConfigBackEnd::parseConfigFiles(), and setLocale(). Referenced by KConfig::reparseConfiguration(). |
|
Returns a map (tree) of the entries in the specified group. This may or may not return all entries that belong to the config object. The only guarantee that you are given is that any entries that are dirty (i.e. modified and not yet written back to the disk) will be contained in the map. Some derivative classes may choose to return everything. Do not use this function, the implementation / return type are subject to change.
Implemented in KConfig. Referenced by KConfigINIBackEnd::writeConfigFile(). |
|
Returns a map (tree) of the entries in the tree. Do not use this function, the implementation / return type are subject to change.
Implemented in KConfig. Referenced by deleteGroup(). |
|
Inserts a (key/value) pair into the internal storage mechanism of the configuration object. Classes that derive from KConfigBase will need to implement this method in a storage-specific manner. Do not use this function, the implementation / return type are subject to change.
Implemented in KConfig. Referenced by deleteEntry(), deleteGroup(), KConfigINIBackEnd::parseSingleConfigFile(), and writeEntry(). |
|
Looks up an entry in the config object's internal structure. Classes that derive from KConfigBase will need to implement this method in a storage-specific manner. Do not use this function, the implementation and return type are subject to change.
Implemented in KConfig. Referenced by entryIsImmutable(), groupIsImmutable(), KConfigINIBackEnd::parseSingleConfigFile(), and readEntry(). |
|
Overloaded public methods:.
Definition at line 163 of file kconfigbase.cpp. References QCString::isEmpty(), and mGroup. |
Member Data Documentation
|
A back end for loading/saving to disk in a particular format.
Definition at line 1690 of file kconfigbase.h. Referenced by KDesktopFile::fileName(), getConfigState(), KConfig::KConfig(), KDesktopFile::KDesktopFile(), KSimpleConfig::KSimpleConfig(), parseConfigFiles(), KDesktopFile::resource(), KConfig::setFileWriteMode(), setLocale(), KSimpleConfig::sync(), sync(), and KConfig::~KConfig(). |
|
The currently selected group.
Definition at line 1706 of file kconfigbase.h. Referenced by deleteEntry(), entryIsImmutable(), group(), readEntry(), setDesktopGroup(), setGroup(), and writeEntry(). |
|
The locale to retrieve keys under if possible, i.e en_US or fr.
Definition at line 1710 of file kconfigbase.h. Referenced by locale(), and setLocale(). |
|
Indicates whether there are any dirty entries in the config object that need to be written back to disk.
Definition at line 1715 of file kconfigbase.h. Referenced by isDirty(), rollback(), and setDirty(). |
The documentation for this class was generated from the following files: