KConfigBase Class Reference

#include <kconfigbase.h>

Inheritance diagram for KConfigBase:

QObject KConfig KConfigGroup KDesktopFile KSharedConfig KSimpleConfig List of all members.

Detailed Description

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 a group name.
Author:
Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
See also:
KGlobal::config()

KConfig

KSimpleConfig

KSharedConfig

Definition at line 70 of file kconfigbase.h.


Public Types

 NoAccess
 ReadOnly
 ReadWrite
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, QStringentryMap (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

KConfigBackEndbackEnd
QCString mGroup
QCString aLocaleString
bool bDirty
bool bLocaleInitialized
bool bReadOnly
bool bExpand

Friends

class KConfigBackEnd
class KConfigINIBackEnd
class KConfigGroup

Member Enumeration Documentation

Possible return values for getConfigState().

See also:
getConfigState()

Definition at line 1804 of file kconfigbase.h.


Constructor & Destructor Documentation

KConfigBase::KConfigBase (  ) 

Construct a KConfigBase object.

Definition at line 50 of file kconfigbase.cpp.

KConfigBase::~KConfigBase (  )  [virtual]

Destructs the KConfigBase object.

Definition at line 57 of file kconfigbase.cpp.


Member Function Documentation

bool KConfigBase::checkConfigFilesWritable ( bool  warnUser  ) 

Check whether the config files are writable.

Parameters:
warnUser Warn the user if the configuration files are not writable.
Returns:
Indicates that all of the configuration files used are writable.
Since:
3.2

Definition at line 1844 of file kconfigbase.cpp.

void KConfigBase::deleteEntry ( const char *  pKey,
bool  bNLS = false,
bool  bGlobal = false 
)

Deletes the entry specified by pKey in the current group.

Parameters:
pKey The key to delete.
bGlobal If bGlobal is true, the pair is not removed from the application specific config file, but from the global KDE config file.
bNLS If bNLS is true, the key with the locale tag is removed.

Definition at line 1160 of file kconfigbase.cpp.

void KConfigBase::deleteEntry ( const QString pKey,
bool  bNLS = false,
bool  bGlobal = false 
)

Deletes the entry specified by pKey in the current group.

Parameters:
pKey The key to delete.
bGlobal If bGlobal is true, the pair is not removed from the application specific config file, but to the global KDE config file.
bNLS If bNLS is true, the key with the locale tag is removed.

Definition at line 1153 of file kconfigbase.cpp.

bool KConfigBase::deleteGroup ( const QString group,
bool  bDeep = true,
bool  bGlobal = false 
)

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.

Parameters:
group The name of the group
bDeep Specify whether non-empty groups should be completely deleted (including their entries).
bGlobal If bGlobal is true, the group is not removed from the application specific config file, but from the global KDE config file.
Returns:
If the group is not empty and bDeep is false, deleteGroup returns false.

Definition at line 1186 of file kconfigbase.cpp.

bool KConfigBase::entryIsImmutable ( const QString key  )  const

Checks whether it is possible to change the given entry.

Parameters:
key the key to check
Returns:
whether the entry key may be changed in the current group in this configuration file.

Definition at line 164 of file kconfigbase.cpp.

virtual QMap<QString, QString> KConfigBase::entryMap ( const QString group  )  const [pure virtual]

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.

Parameters:
group A group to get keys from.
Returns:
A map of entries in the group specified, indexed by key. The returned map may be empty if the group is not found.
See also:
QMap

Implemented in KConfig.

KConfigBase::ConfigState KConfigBase::getConfigState (  )  const

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).

See also:
ConfigState()
Returns:
the state of the app-config object

Definition at line 1689 of file kconfigbase.cpp.

QString KConfigBase::group (  )  const

Returns the name of the group in which we are searching for keys and from which we are retrieving entries.

Returns:
The current group.

Definition at line 100 of file kconfigbase.cpp.

bool KConfigBase::groupIsImmutable ( const QString group  )  const

Checks whether it is possible to change the given group.

Parameters:
group the group to check
Returns:
whether changes may be made to group in this configuration file.

Definition at line 154 of file kconfigbase.cpp.

virtual QStringList KConfigBase::groupList (  )  const [pure virtual]

Returns a list of groups that are known about.

Returns:
The list of groups.

Implemented in KConfig.

bool KConfigBase::hasDefault ( const QString key  )  const

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.

Parameters:
key The key of the entry to check.
Since:
3.2

Definition at line 1744 of file kconfigbase.cpp.

bool KConfigBase::hasGroup ( const QString group  )  const

Returns true if the specified group is known about.

Parameters:
group The group to search for.
Returns:
true if the group exists.

Definition at line 134 of file kconfigbase.cpp.

bool KConfigBase::hasKey ( const QString key  )  const

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.

Parameters:
key The key to search for.
Returns:
If true, the key is available.

Definition at line 109 of file kconfigbase.cpp.

virtual KEntryMap KConfigBase::internalEntryMap (  )  const [protected, pure virtual]

Returns a map (tree) of the entries in the tree.

Do not use this function, the implementation / return type are subject to change.

Returns:
A map of the entries in the tree.

Implemented in KConfig.

virtual KEntryMap KConfigBase::internalEntryMap ( const QString pGroup  )  const [protected, pure virtual]

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.

Parameters:
pGroup The group to provide a KEntryMap for.
Returns:
The map of the entries in the group.

Implemented in KConfig.

bool KConfigBase::isDirty (  )  const [inline]

Checks whether the config file has any dirty (modified) entries.

Returns:
true if the config file has any dirty (modified) entries.

Definition at line 1722 of file kconfigbase.h.

bool KConfigBase::isDollarExpansion (  )  const [inline]

Returns whether dollar expansion is on or off.

It is initially OFF.

Returns:
true if dollar expansion is on.

Definition at line 1685 of file kconfigbase.h.

bool KConfigBase::isImmutable (  )  const

Checks whether this configuration file can be modified.

Returns:
whether changes may be made to this configuration file.

Definition at line 149 of file kconfigbase.cpp.

bool KConfigBase::isReadOnly (  )  const [inline]

Returns the read-only status of the config object.

Returns:
The read-only status.

Definition at line 1738 of file kconfigbase.h.

QString KConfigBase::locale (  )  const

Returns a the current locale.

Returns:
A string representing the current locale.

Definition at line 74 of file kconfigbase.cpp.

virtual KEntry KConfigBase::lookupData ( const KEntryKey _key  )  const [protected, pure virtual]

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.

Parameters:
_key The key to look up It contains information both on the group of the key and the entry's key itself.
Returns:
The KEntry value (data) found for the key. KEntry.aValue will be the null string if nothing was located.

Implemented in KConfig, and KConfigGroup.

void KConfigBase::parseConfigFiles (  )  [protected, virtual]

Parses all configuration files for a configuration object.

The actual parsing is done by the associated KConfigBackEnd.

Definition at line 1666 of file kconfigbase.cpp.

virtual void KConfigBase::putData ( const KEntryKey _key,
const KEntry _data,
bool  _checkGroup = true 
) [protected, pure virtual]

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.

Parameters:
_key The key to insert. It contains information both on the group of the key and the key itself. If the key already exists, the old value will be replaced.
_data the KEntry that is to be stored.
_checkGroup When false, assume that the group already exists.

Implemented in KConfig, and KConfigGroup.

bool KConfigBase::readBoolEntry ( const char *  pKey,
bool  bDefault = false 
) const

Reads a boolean entry.

Read the value of an entry specified by pKey in the current group and interpret it as a boolean value. Currently "on", "yes", "1" and "true" are accepted as true, everything else if false.

Parameters:
pKey The key to search for
bDefault A default value returned if the key was not found.
Returns:
The value for this key.

Definition at line 721 of file kconfigbase.cpp.

bool KConfigBase::readBoolEntry ( const QString pKey,
bool  bDefault = false 
) const

Reads a boolean entry.

Read the value of an entry specified by pKey in the current group and interpret it as a boolean value. Currently "on", "yes", "1" and "true" are accepted as true, everything else if false.

Parameters:
pKey The key to search for
bDefault A default value returned if the key was not found.
Returns:
The value for this key.

Definition at line 716 of file kconfigbase.cpp.

QColor KConfigBase::readColorEntry ( const char *  pKey,
const QColor pDefault = 0L 
) const

Reads a QColor entry.

Read the value of an entry specified by pKey in the current group and interpret it as a color.

Parameters:
pKey The key to search for.
pDefault A default value (null QColor by default) returned if the key was not found or if the value cannot be interpreted.
Returns:
The value for this key.

Definition at line 921 of file kconfigbase.cpp.

QColor KConfigBase::readColorEntry ( const QString pKey,
const QColor pDefault = 0L 
) const

Reads a QColor entry.

Read the value of an entry specified by pKey in the current group and interpret it as a color.

Parameters:
pKey The key to search for.
pDefault A default value (null QColor by default) returned if the key was not found or if the value cannot be interpreted.
Returns:
The value for this key.

Definition at line 915 of file kconfigbase.cpp.

QDateTime KConfigBase::readDateTimeEntry ( const char *  pKey,
const QDateTime pDefault = 0L 
) const

Reads a QDateTime entry.

Read the value of an entry specified by pKey in the current group and interpret it as a date and time.

Parameters:
pKey The key to search for.
pDefault A default value ( currentDateTime() by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

Definition at line 987 of file kconfigbase.cpp.

QDateTime KConfigBase::readDateTimeEntry ( const QString pKey,
const QDateTime pDefault = 0L 
) const

Reads a QDateTime entry.

Read the value of an entry specified by pKey in the current group and interpret it as a date and time.

Parameters:
pKey The key to search for.
pDefault A default value ( currentDateTime() by default) returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

Definition at line 980 of file kconfigbase.cpp.

bool KConfigBase::readDefaults (  )  const

Returns:
true if all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference.
Since:
3.2

Definition at line 1712 of file kconfigbase.cpp.

double KConfigBase::readDoubleNumEntry ( const char *  pKey,
double  nDefault = 0.0 
) const

Reads a floating point value.

Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey The key to search for.
nDefault A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

Definition at line 702 of file kconfigbase.cpp.

double KConfigBase::readDoubleNumEntry ( const QString pKey,
double  nDefault = 0.0 
) const

Reads a floating point value.

Read the value of an entry specified by pKey in the current group and interpret it numerically.

Parameters:
pKey The key to search for.
nDefault A default value returned if the key was not found or if the read value cannot be interpreted.
Returns:
The value for this key.

Definition at line 697 of file kconfigbase.cpp.

QString KConfigBase::readEntry ( const char *  pKey,
const QString aDefault = QString::null 
) const

Reads the value of an entry specified by pKey in the current group.

Parameters:
pKey The key to search for.
aDefault A default value returned if the key was not found.
Returns:
The value for this key. Can be QString::null if aDefault is null.

Definition at line 209 of file kconfigbase.cpp.

QString KConfigBase::readEntry ( const QString pKey,
const QString aDefault = QString::null 
) const

Reads the value of an entry specified by pKey in the current group.

If you want to read a path, please use readPathEntry().

Parameters:
pKey The key to search for.
aDefault A default value returned if the key was not found.
Returns:
The value for this key. Can be QString::null if aDefault is null.

Definition at line 203 of file kconfigbase.cpp.

QString KConfigBase::readEntryUntranslated ( const char *  pKey,
const QString aDefault = QString::null 
) const

Reads the value of an entry specified by pKey in the current group.

The untranslated entry is returned, you normally do not need this.

Parameters:
pKey The key to search for.
aDefault A default value returned if the key was not found.
Returns:
The value for this key.

Definition at line 193 of file kconfigbase.cpp.

QString KConfigBase::readEntryUntranslated ( const QString pKey,
const QString aDefault = QString::null 
) const

Reads the value of an entry specified by pKey in the current group.

The untranslated entry is returned, you normally do not need this.

Parameters:
pKey The key to search for.
aDefault A default value returned if the key was not found.
Returns:
The value for this key.

Definition at line