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 { NoAccess, ReadOnly, ReadWrite } |
Public Member Functions | |
KConfigBase () | |
virtual | ~KConfigBase () |
void | setGroup (const QString &group) |
void | setDesktopGroup () |
QString | group () const |
bool | hasGroup (const QString &group) const |
virtual QStringList | groupList () const =0 |
QString | locale () const |
QString | readEntry (const QString &pKey, const QString &aDefault=QString::null) const |
QString | readEntry (const char *pKey, const QString &aDefault=QString::null) const |
QVariant | readPropertyEntry (const QString &pKey, QVariant::Type) const |
QVariant | readPropertyEntry (const char *pKey, QVariant::Type) const |
QVariant | readPropertyEntry (const QString &pKey, const QVariant &aDefault) const |
QVariant | readPropertyEntry (const char *pKey, const QVariant &aDefault) const |
int | readListEntry (const QString &pKey, QStrList &list, char sep= ',') const |
int | readListEntry (const char *pKey, QStrList &list, char sep= ',') const |
QStringList | readListEntry (const QString &pKey, char sep= ',') const |
QStringList | readListEntry (const char *pKey, char sep= ',') const |
QStringList | readListEntry (const char *pKey, const QStringList &aDefault, char sep= ',') const |
QValueList< int > | readIntListEntry (const QString &pKey) const |
QValueList< int > | readIntListEntry (const char *pKey) const |
QString | readPathEntry (const QString &pKey, const QString &aDefault=QString::null) const |
QString | readPathEntry (const char *pKey, const QString &aDefault=QString::null) const |
QStringList | readPathListEntry (const QString &pKey, char sep= ',') const |
QStringList | readPathListEntry (const char *pKey, char sep= ',') const |
int | readNumEntry (const QString &pKey, int nDefault=0) const |
int | readNumEntry (const char *pKey, int nDefault=0) const |
unsigned int | readUnsignedNumEntry (const QString &pKey, unsigned int nDefault=0) const |
unsigned int | readUnsignedNumEntry (const char *pKey, unsigned int nDefault=0) const |
long | readLongNumEntry (const QString &pKey, long nDefault=0) const |
long | readLongNumEntry (const char *pKey, long nDefault=0) const |
unsigned long | readUnsignedLongNumEntry (const QString &pKey, unsigned long nDefault=0) const |
unsigned long | readUnsignedLongNumEntry (const char *pKey, unsigned long nDefault=0) const |
Q_INT64 | readNum64Entry (const QString &pKey, Q_INT64 nDefault=0) const |
Q_INT64 | readNum64Entry (const char *pKey, Q_INT64 nDefault=0) const |
Q_UINT64 | readUnsignedNum64Entry (const QString &pKey, Q_UINT64 nDefault=0) const |
Q_UINT64 | readUnsignedNum64Entry (const char *pKey, Q_UINT64 nDefault=0) const |
double | readDoubleNumEntry (const QString &pKey, double nDefault=0.0) const |
double | readDoubleNumEntry (const char *pKey, double nDefault=0.0) const |
QFont | readFontEntry (const QString &pKey, const QFont *pDefault=0L) const |
QFont | readFontEntry (const char *pKey, const QFont *pDefault=0L) const |
bool | readBoolEntry (const QString &pKey, bool bDefault=false) const |
bool | readBoolEntry (const char *pKey, bool bDefault=false) const |
QRect | readRectEntry (const QString &pKey, const QRect *pDefault=0L) const |
QRect | readRectEntry (const char *pKey, const QRect *pDefault=0L) const |
QPoint | readPointEntry (const QString &pKey, const QPoint *pDefault=0L) const |
QPoint | readPointEntry (const char *pKey, const QPoint *pDefault=0L) const |
QSize | readSizeEntry (const QString &pKey, const QSize *pDefault=0L) const |
QSize | readSizeEntry (const char *pKey, const QSize *pDefault=0L) const |
QColor | readColorEntry (const QString &pKey, const QColor *pDefault=0L) const |
QColor | readColorEntry (const char *pKey, const QColor *pDefault=0L) const |
QDateTime | readDateTimeEntry (const QString &pKey, const QDateTime *pDefault=0L) const |
QDateTime | readDateTimeEntry (const char *pKey, const QDateTime *pDefault=0L) const |
QString | readEntryUntranslated (const QString &pKey, const QString &aDefault=QString::null) const |
QString | readEntryUntranslated (const char *pKey, const QString &aDefault=QString::null) const |
void | writeEntry (const QString &pKey, const QString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QStrList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QStrList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const char *pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, unsigned int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, unsigned int nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, unsigned long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, unsigned long nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, Q_INT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, Q_INT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, Q_UINT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, Q_UINT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, double nValue, bool bPersistent=true, bool bGlobal=false, char format= 'g', int precision=6, bool bNLS=false) |
void | writeEntry (const char *pKey, double nValue, bool bPersistent=true, bool bGlobal=false, char format= 'g', int precision=6, bool bNLS=false) |
void | writeEntry (const QString &pKey, bool bValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, bool bValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const QString &pKey, const QSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writeEntry (const char *pKey, const QSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writePathEntry (const QString &pKey, const QString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writePathEntry (const char *pKey, const QString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writePathEntry (const QString &pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | writePathEntry (const char *pKey, const QStringList &rValue, char sep= ',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false) |
void | deleteEntry (const QString &pKey, bool bNLS=false, bool bGlobal=false) |
void | deleteEntry (const char *pKey, bool bNLS=false, bool bGlobal=false) |
bool | deleteGroup (const QString &group, bool bDeep=true, bool bGlobal=false) |
void | setDollarExpansion (bool _bExpand=true) |
bool | isDollarExpansion () const |
virtual void | rollback (bool bDeep=true) |
virtual void | sync () |
bool | isDirty () const |
virtual void | setReadOnly (bool _ro) |
bool | isReadOnly () const |
bool | hasKey (const QString &key) const |
virtual QMap< QString, QString > | entryMap (const QString &group) const =0 |
virtual void | reparseConfiguration ()=0 |
bool | isImmutable () const |
bool | groupIsImmutable (const QString &group) const |
bool | entryIsImmutable (const QString &key) const |
ConfigState | getConfigState () const |
bool | checkConfigFilesWritable (bool warnUser) |
void | setReadDefaults (bool b) |
bool | readDefaults () const |
void | revertToDefault (const QString &key) |
bool | hasDefault (const QString &key) const |
void | setGroup (const QCString &pGroup) |
void | setGroup (const char *pGroup) |
bool | hasGroup (const QCString &_pGroup) const |
bool | hasGroup (const char *_pGroup) const |
bool | hasKey (const char *pKey) const |
Protected Member Functions | |
void | setLocale () |
virtual void | setDirty (bool _bDirty=true) |
virtual void | parseConfigFiles () |
virtual KEntryMap | internalEntryMap (const QString &pGroup) const =0 |
virtual KEntryMap | internalEntryMap () const =0 |
virtual void | putData (const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true)=0 |
virtual KEntry | lookupData (const KEntryKey &_key) const =0 |
virtual bool | internalHasGroup (const QCString &group) const =0 |
QCString | readEntryUtf8 (const char *pKey) const |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KConfigBackEnd * | backEnd |
QCString | mGroup |
QCString | aLocaleString |
bool | bDirty |
bool | bLocaleInitialized |
bool | bReadOnly |
bool | bExpand |
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>
- See also:
- KGlobal::config() KConfig KSimpleConfig
Definition at line 67 of file kconfigbase.h.
Member Enumeration Documentation
|
Possible return values for getConfigState().
Referenced by getConfigState(). |
Constructor & Destructor Documentation
|
Construct a KConfigBase object. Definition at line 50 of file kconfigbase.cpp. References backEnd, bDirty, and setGroup(). |
|
Destructs the KConfigBase object. Definition at line 57 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.
References mGroup. Referenced by KStandardDirs::addCustomized(), KConfig::checkUpdate(), KConfig::copyTo(), KNotifyClient::getDefaultFile(), KNotifyClient::getDefaultPresentation(), KNotifyClient::getFile(), KNotifyClient::getPresentation(), KIconEffect::init(), KApplication::invokeMailer(), KConfigBase(), KIconTheme::KIconTheme(), KLocale::languagesTwoAlpha(), KConfigSkeleton::ItemDouble::readConfig(), and KDesktopFile::setActionGroup(). |
|
Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc. Definition at line 104 of file kconfigbase.cpp. References mGroup. Referenced by KDesktopFile::copyTo(), and KDesktopFile::KDesktopFile(). |
|
Returns the name of the group in which we are searching for keys and from which we are retrieving entries.
References mGroup. Referenced by KStandardDirs::addCustomized(), and KConfig::checkUpdate(). |
|
Returns true if the specified group is known about.
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.
References aLocaleString. Referenced by hasDefault(), and revertToDefault(). |
|
|
Reads the value of an entry specified by
References KEntryKey::bDefault, KEntry::bExpand, KEntryKey::bLocal, KEntryKey::c_key, KStringHandler::from8Bit(), lookupData(), mGroup, KEntry::mValue, readDefaults(), 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.
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.
References 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.
References 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.
References hasKey(), readBoolEntry(), readColorEntry(), readDateTimeEntry(), readDoubleNumEntry(), readEntry(), readFontEntry(), readListEntry(), readNum64Entry(), readNumEntry(), readPointEntry(), readRectEntry(), readSizeEntry(), readUnsignedNum64Entry(), and readUnsignedNumEntry(). |
|
Reads a list of strings.
Referenced by KStandardDirs::addCustomized(), KConfig::checkUpdate(), KIconTheme::KIconTheme(), KLocale::languagesTwoAlpha(), KDesktopFile::readActions(), readDateTimeEntry(), readIntListEntry(), readListEntry(), readPathListEntry(), readPropertyEntry(), KDesktopFile::sortOrder(), and KDesktopFile::tryExec(). |
|
Reads a list of strings.
References hasKey(). |
|
Reads a list of strings.
References readListEntry(). |
|
Reads a list of strings.
References hasKey(), readEntry(), and KGlobal::staticQString(). |
|
Reads a list of strings, but returns a default if the key did not exist.
References hasKey(), and readListEntry(). |
|
Reads a list of Integers.
Referenced by KIconTheme::KIconTheme(). |
|
Reads a list of Integers.
References readListEntry(). |
|
Reads a path.
Read the value of an entry specified by
Referenced by KCharsets::codecForName(), KNotifyClient::getDefaultFile(), KNotifyClient::getFile(), KApplication::invokeMailer(), KIconTheme::KIconTheme(), KDesktopFile::readDocPath(), KDesktopFile::readPath(), KDesktopFile::readURL(), and KDesktopFile::tryExec(). |
|
Reads a path.
Read the value of an entry specified by
References readEntry(). |
|
Reads a list of string paths.
Read the value of an entry specified by
Referenced by KIconTheme::KIconTheme(). |
|
Reads a list of string paths.
Read the value of an entry specified by
References readListEntry(). |
|
Reads a numerical value.
Read the value of an entry specified by
Referenced by KGlobalSettings::autoSelectDelay(), KGlobalSettings::buttonLayout(), 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
|
|
Reads an unsigned numerical value.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Reads an unsigned numerical value.
Read the value of an entry specified by
|
|
Reads a numerical value.
Read the value of an entry specified by
|
|
Reads a numerical value.
Read the value of an entry specified by
|
|
Read an unsigned numerical value.
Read the value of an entry specified by
|
|
Read an unsigned numerical value.
Read the value of an entry specified by
|
|
Reads a 64-bit numerical value.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Reads a 64-bit numerical value.
Read the value of an entry specified by
References readEntry(). |
|
Read an 64-bit unsigned numerical value.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Read an 64-bit unsigned numerical value.
Read the value of an entry specified by
References readEntry(). |
|
Reads a floating point value.
Read the value of an entry specified by
Referenced by KIconEffect::init(), KConfigSkeleton::ItemDouble::readConfig(), and readPropertyEntry(). |
|
Reads a floating point value.
Read the value of an entry specified by
|
|
Reads a QFont value.
Read the value of an entry specified by
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
References readEntry(). |
|
Reads a boolean entry.
Read the value of an entry specified by
Referenced by KStandardDirs::addCustomized(), KApplication::authorize(), KApplication::authorizeControlModule(), KApplication::authorizeControlModules(), KGlobalSettings::changeCursorOverIcon(), KIconEffect::init(), KGlobalSettings::insertTearOffHandle(), KNotifyClient::Instance::Instance(), KApplication::invokeMailer(), KIconTheme::KIconTheme(), KGlobalSettings::opaqueResize(), readPropertyEntry(), KGlobalSettings::showContextMenusOnPress(), KGlobalSettings::showFilePreview(), KGlobalSettings::showIconsOnPushButtons(), KGlobalSettings::singleClick(), KDesktopFile::tryExec(), KGlobalSettings::visualActivate(), and KGlobalSettings::wheelMouseZooms(). |
|
Reads a boolean entry.
Read the value of an entry specified by
|
|
Reads a QRect entry. Read the value of an entry specified by pKey in the current group and interpret it as a QRect object.
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.
|
|
Reads a QPoint entry.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Reads a QPoint entry.
Read the value of an entry specified by
|
|
Reads a QSize entry.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Reads a QSize entry.
Read the value of an entry specified by
|
|
Reads a QColor entry.
Read the value of an entry specified by
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
References readEntry(). |
|
Reads a QDateTime entry.
Read the value of an entry specified by
Referenced by readPropertyEntry(). |
|
Reads a QDateTime entry.
Read the value of an entry specified by
References hasKey(), and readListEntry(). |
|
Reads the value of an entry specified by The untranslated entry is returned, you normally do not need this.
|
|
Reads the value of an entry specified by The untranslated entry is returned, you normally do not need this.
|
|
Writes a key/value pair. This is stored in the most specific config file when destroying the config object or when calling sync().
Referenced by KConfig::copyTo(), 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().
References KEntry::bDirty, KEntry::bGlobal, KEntryKey::bLocal, KEntry::bNLS, KGlobal::locale(), mGroup, KEntry::mValue, putData(), setDirty(), and setLocale(). |
|
writeEntry() Overridden to accept a property. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() Overridden to accept a property. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References KStringHandler::from8Bit(), and writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() overridden to accept a list of strings. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() overridden to accept a list of Integers. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
writeEntry() overridden to accept a list of Integers. Note: Unlike the other writeEntry() functions, the old value is _not_ returned here!
References writeEntry(). |
|
Write a (key/value) pair. This is stored to the most specific config file when destroying the config object or when calling sync().
References writeEntry(). |
|
Write a (key/value) pair. This is stored to the most specific config file when destroying the config object or when calling sync().
References writeEntry(). |
|
Write a (key/value) pair. Same as above, but writes a numerical value.
References writeEntry(). |
|
Write a (key/value) pair. Same as above, but writes a numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a long numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a long numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned long numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned long numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a 64-bit numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but write a long numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned 64-bit numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes an unsigned 64-bit numerical value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a floating-point value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a floating-point value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a boolean value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a boolean value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a font value.
References writeEntry(). |
|
Writes a (key/value) pair. Same as above, but writes a font value.
References 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!
References 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!
References 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!
References 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!
References 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!
References 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!
References 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!
References 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!
References 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!
References 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!
References 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()
Referenced by writePathEntry(). |
|
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()
References writeEntry(). |
|
writePathEntry() overridden to accept a list of paths (strings). It is checked whether the paths are located under $HOME. If so each of the paths are written out with the user's home-directory replaced with $HOME. The paths should be read back with readPathListEntry()
References writePathEntry(). |
|
writePathEntry() overridden to accept a list of paths (strings). It is checked whether the paths are located under $HOME. If so each of the paths are written out with the user's home-directory replaced with $HOME. The paths should be read back with readPathListEntry()
References writeEntry(). |
|
Deletes the entry specified by
Referenced by KShortcutList::writeSettings(). |
|
Deletes the entry specified by
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.
References internalEntryMap(), putData(), and setDirty(). Referenced by KConfigGroup::deleteGroup(), and KShortcutList::writeSettings(). |
|
Turns on or off "dollar expansion" (see KConfigBase introduction) when reading config entries. Dollar sign expansion is initially OFF.
|
|
Returns whether dollar expansion is on or off. It is initially OFF.
|
|
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 1678 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 KConfigGroup, and KSimpleConfig. Definition at line 1661 of file kconfigbase.cpp. References backEnd, bDirty, isReadOnly(), rollback(), and KConfigBackEnd::sync(). Referenced by KConfigGroup::sync(), KShortcutList::writeSettings(), and KConfig::~KConfig(). |
|
Checks whether the config file has any dirty (modified) entries.
References bDirty. Referenced by KSimpleConfig::sync(), and KConfigINIBackEnd::sync(). |
|
Sets the config object's read-only status.
Referenced by KConfig::copyTo(), KConfig::KConfig(), KDesktopFile::KDesktopFile(), and KSimpleConfig::KSimpleConfig(). |
|
Returns the read-only status of the config object.
Referenced by KConfigINIBackEnd::parseConfigFiles(), KConfig::reparseConfiguration(), 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.
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.
References getConfigState(). |
|
Checks whether it is possible to change the given group.
References KEntry::bImmutable, getConfigState(), and lookupData(). |
|
Checks whether it is possible to change the given entry.
References KEntry::bImmutable, KEntryKey::bLocal, KEntryKey::c_key, getConfigState(), lookupData(), and mGroup. Referenced by KConfigSkeletonItem::readImmutability(). |
|
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).
References backEnd, ConfigState, and KConfigBackEnd::getConfigState(). Referenced by entryIsImmutable(), groupIsImmutable(), and isImmutable(). |
|
Check whether the config files are writable.
References backEnd, and KConfigBackEnd::checkConfigFilesWritable(). |
|
When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference. This is off by default.
Referenced by KConfigGroup::KConfigGroup(). |
|
Referenced by KConfigGroup::KConfigGroup(), and readEntry(). |
|
Reverts the entry with key To revert entries in the global KDE config file, the global KDE config file should be opened explicitly in a separate config object.
References KEntry::bDeleted, KEntry::bDirty, locale(), lookupData(), mGroup, KEntry::mValue, putData(), and setDirty(). |
|
Returns whether a default is specified for an entry in either the system wide configuration file or the global KDE config file. If an application computes a default value at runtime for a certain entry, e.g. like: QColor computedDefault = kapp->palette().color(QPalette::Active, QColorGroup::Text) QColor color = config->readEntry(key, computedDefault); \encode Then it may wish to make the following check before writing back changes: \code if ( (value == computedDefault) && !config->hasDefault(key) ) config->revertToDefault(key) else config->writeEntry(key, value) This ensures that as long as the entry is not modified to differ from the computed default, the application will keep using the computed default and will follow changes the computed default makes over time.
References locale(), lookupData(), mGroup, and KEntry::mValue. |
|
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 62 of file kconfigbase.cpp. References aLocaleString, backEnd, KLocale::defaultLanguage(), KLocale::language(), KGlobal::locale(), and KConfigBackEnd::setLocaleString(). Referenced by deleteEntry(), parseConfigFiles(), readEntry(), and writeEntry(). |
|
Sets the global dirty flag of the config object.
Reimplemented in KConfigGroup. Definition at line 1892 of file kconfigbase.h. References bDirty. Referenced by deleteEntry(), deleteGroup(), revertToDefault(), KConfigGroup::setDirty(), and writeEntry(). |
|
Parses all configuration files for a configuration object. The actual parsing is done by the associated KConfigBackEnd. Definition at line 1649 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::getEntryMap(). |
|
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, and KConfigGroup.
Referenced by deleteEntry(), deleteGroup(), KConfigINIBackEnd::parseSingleConfigFile(), KConfigGroup::putData(), revertToDefault(), 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, and KConfigGroup.
Referenced by entryIsImmutable(), groupIsImmutable(), hasDefault(), KConfigGroup::lookupData(), KConfigINIBackEnd::parseSingleConfigFile(), readEntry(), and revertToDefault(). |
|
Overloaded public methods:. Definition at line 92 of file kconfigbase.cpp. References mGroup. |
Member Data Documentation
|
A back end for loading/saving to disk in a particular format. Definition at line 1969 of file kconfigbase.h. Referenced by checkConfigFilesWritable(), KConfig::copyTo(), getConfigState(), KConfigBase(), KConfigGroup::KConfigGroup(), parseConfigFiles(), setLocale(), and sync(). |
|
The currently selected group. Definition at line 1985 of file kconfigbase.h. Referenced by deleteEntry(), entryIsImmutable(), group(), hasDefault(), readEntry(), revertToDefault(), setDesktopGroup(), setGroup(), and writeEntry(). |
|
The locale to retrieve keys under if possible, i.e en_US or fr. Definition at line 1989 of file kconfigbase.h. Referenced by KConfigGroup::KConfigGroup(), 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 1994 of file kconfigbase.h. Referenced by isDirty(), KConfigBase(), rollback(), setDirty(), and sync(). |
The documentation for this class was generated from the following files: