• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
TDEConfigBase Class Referenceabstract

#include <tdeconfigbase.h>

Inheritance diagram for TDEConfigBase:
TDEConfig TDEConfigGroup KDesktopFile KSimpleConfig TDESharedConfig

Public Types

enum  ConfigState { NoAccess , ReadOnly , ReadWrite }
 

Public Member Functions

 TDEConfigBase ()
 
virtual ~TDEConfigBase ()
 
void setGroup (const TQString &group)
 
void setDesktopGroup ()
 
TQString group () const
 
bool hasGroup (const TQString &group) const
 
virtual TQStringList groupList () const =0
 
TQString locale () const
 
TQString readEntry (const TQString &pKey, const TQString &aDefault=TQString::null) const
 
TQString readEntry (const char *pKey, const TQString &aDefault=TQString::null) const
 
TQVariant readPropertyEntry (const TQString &pKey, TQVariant::Type) const
 
TQVariant readPropertyEntry (const char *pKey, TQVariant::Type) const
 
TQVariant readPropertyEntry (const TQString &pKey, const TQVariant &aDefault) const
 
TQVariant readPropertyEntry (const char *pKey, const TQVariant &aDefault) const
 
int readListEntry (const TQString &pKey, TQStrList &list, char sep=',') const
 
int readListEntry (const char *pKey, TQStrList &list, char sep=',') const
 
TQStringList readListEntry (const TQString &pKey, char sep=',') const
 
TQStringList readListEntry (const char *pKey, char sep=',') const
 
TQStringList readListEntry (const char *pKey, const TQStringList &aDefault, char sep=',') const
 
TQValueList< int > readIntListEntry (const TQString &pKey) const
 
TQValueList< int > readIntListEntry (const char *pKey) const
 
TQString readPathEntry (const TQString &pKey, const TQString &aDefault=TQString::null) const
 
TQString readPathEntry (const char *pKey, const TQString &aDefault=TQString::null) const
 
TQStringList readPathListEntry (const TQString &pKey, char sep=',') const
 
TQStringList readPathListEntry (const char *pKey, char sep=',') const
 
int readNumEntry (const TQString &pKey, int nDefault=0) const
 
int readNumEntry (const char *pKey, int nDefault=0) const
 
unsigned int readUnsignedNumEntry (const TQString &pKey, unsigned int nDefault=0) const
 
unsigned int readUnsignedNumEntry (const char *pKey, unsigned int nDefault=0) const
 
long readLongNumEntry (const TQString &pKey, long nDefault=0) const
 
long readLongNumEntry (const char *pKey, long nDefault=0) const
 
unsigned long readUnsignedLongNumEntry (const TQString &pKey, unsigned long nDefault=0) const
 
unsigned long readUnsignedLongNumEntry (const char *pKey, unsigned long nDefault=0) const
 
TQ_INT64 readNum64Entry (const TQString &pKey, TQ_INT64 nDefault=0) const
 
TQ_INT64 readNum64Entry (const char *pKey, TQ_INT64 nDefault=0) const
 
TQ_UINT64 readUnsignedNum64Entry (const TQString &pKey, TQ_UINT64 nDefault=0) const
 
TQ_UINT64 readUnsignedNum64Entry (const char *pKey, TQ_UINT64 nDefault=0) const
 
double readDoubleNumEntry (const TQString &pKey, double nDefault=0.0) const
 
double readDoubleNumEntry (const char *pKey, double nDefault=0.0) const
 
TQFont readFontEntry (const TQString &pKey, const TQFont *pDefault=0L) const
 
TQFont readFontEntry (const char *pKey, const TQFont *pDefault=0L) const
 
bool readBoolEntry (const TQString &pKey, bool bDefault=false) const
 
bool readBoolEntry (const char *pKey, bool bDefault=false) const
 
TQRect readRectEntry (const TQString &pKey, const TQRect *pDefault=0L) const
 
TQRect readRectEntry (const char *pKey, const TQRect *pDefault=0L) const
 
TQPoint readPointEntry (const TQString &pKey, const TQPoint *pDefault=0L) const
 
TQPoint readPointEntry (const char *pKey, const TQPoint *pDefault=0L) const
 
TQSize readSizeEntry (const TQString &pKey, const TQSize *pDefault=0L) const
 
TQSize readSizeEntry (const char *pKey, const TQSize *pDefault=0L) const
 
TQColor readColorEntry (const TQString &pKey, const TQColor *pDefault=0L) const
 
TQColor readColorEntry (const char *pKey, const TQColor *pDefault=0L) const
 
TQDateTime readDateTimeEntry (const TQString &pKey, const TQDateTime *pDefault=0L) const
 
TQDateTime readDateTimeEntry (const char *pKey, const TQDateTime *pDefault=0L) const
 
TQString readEntryUntranslated (const TQString &pKey, const TQString &aDefault=TQString::null) const
 
TQString readEntryUntranslated (const char *pKey, const TQString &aDefault=TQString::null) const
 
void writeEntry (const TQString &pKey, const TQString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQString &pValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQVariant &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQStrList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQStrList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQStringList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQStringList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQValueList< int > &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &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 TQString &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 TQString &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 TQString &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 TQString &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 TQString &pKey, TQ_INT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, TQ_INT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, TQ_UINT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, TQ_UINT64 nValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &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 TQString &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 TQString &pKey, const TQFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQFont &rFont, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQColor &rColor, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQDateTime &rDateTime, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQRect &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQPoint &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const TQString &pKey, const TQSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writeEntry (const char *pKey, const TQSize &rValue, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writePathEntry (const TQString &pKey, const TQString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writePathEntry (const char *pKey, const TQString &path, bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writePathEntry (const char *pKey, const TQString &path, bool bPersistent, bool bGlobal, bool bNLS, bool expand)
 
void writePathEntry (const TQString &pKey, const TQStringList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void writePathEntry (const char *pKey, const TQStringList &rValue, char sep=',', bool bPersistent=true, bool bGlobal=false, bool bNLS=false)
 
void deleteEntry (const TQString &pKey, bool bNLS=false, bool bGlobal=false)
 
void deleteEntry (const char *pKey, bool bNLS=false, bool bGlobal=false)
 
bool deleteGroup (const TQString &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 TQString &key) const
 
virtual TQMap< TQString, TQString > entryMap (const TQString &group) const =0
 
virtual void reparseConfiguration ()=0
 
bool isImmutable () const
 
bool groupIsImmutable (const TQString &group) const
 
bool entryIsImmutable (const TQString &key) const
 
ConfigState getConfigState () const
 
bool checkConfigFilesWritable (bool warnUser)
 
void setReadDefaults (bool b)
 
bool readDefaults () const
 
void revertToDefault (const TQString &key)
 
bool hasDefault (const TQString &key) const
 
void setGroup (const TQCString &pGroup)
 
void setGroup (const char *pGroup)
 
bool hasGroup (const TQCString &_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 TQString &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 TQCString &group) const =0
 
TQCString readEntryUtf8 (const char *pKey) const
 
bool hasTranslatedKey (const char *pKey) const
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

TDEConfigBackEnd * backEnd
 
TQCString mGroup
 
TQCString aLocaleString
 
bool bDirty
 
bool bLocaleInitialized
 
bool bReadOnly
 
bool bExpand
 

Friends

class TDEConfigBackEnd
 
class TDEConfigINIBackEnd
 
class TDEConfigGroup
 

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 TDEConfig (for usual KDE configuration) or KSimpleConfig (for special needs as in ksamba), or even TDESharedConfig (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, TDEConfigBase 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.nosp@m.@kde.nosp@m..org, Preston Brown pbrow.nosp@m.n@kd.nosp@m.e.org
See also
TDEGlobal::config()
TDEConfig
KSimpleConfig
TDESharedConfig

Definition at line 70 of file tdeconfigbase.h.

Member Enumeration Documentation

◆ ConfigState

enum TDEConfigBase::ConfigState

Possible return values for getConfigState().

See also
getConfigState()

Definition at line 1828 of file tdeconfigbase.h.

Constructor & Destructor Documentation

◆ TDEConfigBase()

TDEConfigBase::TDEConfigBase ( )

Construct a TDEConfigBase object.

Definition at line 50 of file tdeconfigbase.cpp.

◆ ~TDEConfigBase()

TDEConfigBase::~TDEConfigBase ( )
virtual

Destructs the TDEConfigBase object.

Definition at line 57 of file tdeconfigbase.cpp.

Member Function Documentation

◆ checkConfigFilesWritable()

bool TDEConfigBase::checkConfigFilesWritable ( bool  warnUser)

Check whether the config files are writable.

Parameters
warnUserWarn 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 1904 of file tdeconfigbase.cpp.

◆ deleteEntry() [1/2]

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

Deletes the entry specified by pKey in the current group.

Parameters
pKeyThe key to delete.
bGlobalIf bGlobal is true, the pair is not removed from the application specific config file, but from the global KDE config file.
bNLSIf bNLS is true, the key with the locale tag is removed.

Definition at line 1211 of file tdeconfigbase.cpp.

◆ deleteEntry() [2/2]

void TDEConfigBase::deleteEntry ( const TQString &  pKey,
bool  bNLS = false,
bool  bGlobal = false 
)

Deletes the entry specified by pKey in the current group.

Parameters
pKeyThe key to delete.
bGlobalIf bGlobal is true, the pair is not removed from the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the key with the locale tag is removed.

Definition at line 1204 of file tdeconfigbase.cpp.

◆ deleteGroup()

bool TDEConfigBase::deleteGroup ( const TQString &  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
groupThe name of the group
bDeepSpecify whether non-empty groups should be completely deleted (including their entries).
bGlobalIf 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 1237 of file tdeconfigbase.cpp.

◆ entryIsImmutable()

bool TDEConfigBase::entryIsImmutable ( const TQString &  key) const

Checks whether it is possible to change the given entry.

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

Definition at line 182 of file tdeconfigbase.cpp.

◆ entryMap()

virtual TQMap< TQString, TQString > TDEConfigBase::entryMap ( const TQString &  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
groupA 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 TDEConfig.

◆ getConfigState()

TDEConfigBase::ConfigState TDEConfigBase::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 1749 of file tdeconfigbase.cpp.

◆ group()

TQString TDEConfigBase::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 tdeconfigbase.cpp.

◆ groupIsImmutable()

bool TDEConfigBase::groupIsImmutable ( const TQString &  group) const

Checks whether it is possible to change the given group.

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

Definition at line 172 of file tdeconfigbase.cpp.

◆ groupList()

virtual TQStringList TDEConfigBase::groupList ( ) const
pure virtual

Returns a list of groups that are known about.

Returns
The list of groups.

Implemented in TDEConfig.

◆ hasDefault()

bool TDEConfigBase::hasDefault ( const TQString &  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:

TQColor computedDefault = tdeApp->palette().color(TQPalette::Active, TQColorGroup::Text)
TQColor 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
keyThe key of the entry to check.
Since
3.2

Definition at line 1804 of file tdeconfigbase.cpp.

◆ hasGroup() [1/3]

bool TDEConfigBase::hasGroup ( const char *  _pGroup) const

Definition at line 157 of file tdeconfigbase.cpp.

◆ hasGroup() [2/3]

bool TDEConfigBase::hasGroup ( const TQCString &  _pGroup) const

Definition at line 162 of file tdeconfigbase.cpp.

◆ hasGroup() [3/3]

bool TDEConfigBase::hasGroup ( const TQString &  group) const

Returns true if the specified group is known about.

Parameters
groupThe group to search for.
Returns
true if the group exists.

Definition at line 152 of file tdeconfigbase.cpp.

◆ hasKey() [1/2]

bool TDEConfigBase::hasKey ( const char *  pKey) const

Definition at line 114 of file tdeconfigbase.cpp.

◆ hasKey() [2/2]

bool TDEConfigBase::hasKey ( const TQString &  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
keyThe key to search for.
Returns
If true, the key is available.

Definition at line 109 of file tdeconfigbase.cpp.

◆ hasTranslatedKey()

bool TDEConfigBase::hasTranslatedKey ( const char *  pKey) const
protected

Definition at line 134 of file tdeconfigbase.cpp.

◆ internalEntryMap() [1/2]

virtual KEntryMap TDEConfigBase::internalEntryMap ( ) const
protectedpure 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 TDEConfig.

◆ internalEntryMap() [2/2]

virtual KEntryMap TDEConfigBase::internalEntryMap ( const TQString &  pGroup) const
protectedpure 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
pGroupThe group to provide a KEntryMap for.
Returns
The map of the entries in the group.

Implemented in TDEConfig.

◆ internalHasGroup()

virtual bool TDEConfigBase::internalHasGroup ( const TQCString &  group) const
protectedpure virtual

Implemented in TDEConfig.

◆ isDirty()

bool TDEConfigBase::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 1746 of file tdeconfigbase.h.

◆ isDollarExpansion()

bool TDEConfigBase::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 1709 of file tdeconfigbase.h.

◆ isImmutable()

bool TDEConfigBase::isImmutable ( ) const

Checks whether this configuration file can be modified.

Returns
whether changes may be made to this configuration file.

Definition at line 167 of file tdeconfigbase.cpp.

◆ isReadOnly()

bool TDEConfigBase::isReadOnly ( ) const
inline

Returns the read-only status of the config object.

Returns
The read-only status.

Definition at line 1762 of file tdeconfigbase.h.

◆ locale()

TQString TDEConfigBase::locale ( ) const

Returns a the current locale.

Returns
A string representing the current locale.

Definition at line 74 of file tdeconfigbase.cpp.

◆ lookupData()

virtual KEntry TDEConfigBase::lookupData ( const KEntryKey &  _key) const
protectedpure virtual

Looks up an entry in the config object's internal structure.

Classes that derive from TDEConfigBase 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
_keyThe 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 TDEConfig, and TDEConfigGroup.

◆ parseConfigFiles()

void TDEConfigBase::parseConfigFiles ( )
protectedvirtual

Parses all configuration files for a configuration object.

The actual parsing is done by the associated TDEConfigBackEnd.

Definition at line 1726 of file tdeconfigbase.cpp.

◆ putData()

virtual void TDEConfigBase::putData ( const KEntryKey &  _key,
const KEntry &  _data,
bool  _checkGroup = true 
)
protectedpure virtual

Inserts a (key/value) pair into the internal storage mechanism of the configuration object.

Classes that derive from TDEConfigBase 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
_keyThe 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.
_datathe KEntry that is to be stored.
_checkGroupWhen false, assume that the group already exists.

Implemented in TDEConfig, and TDEConfigGroup.

◆ readBoolEntry() [1/2]

bool TDEConfigBase::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
pKeyThe key to search for
bDefaultA default value returned if the key was not found.
Returns
The value for this key.

Definition at line 753 of file tdeconfigbase.cpp.

◆ readBoolEntry() [2/2]

bool TDEConfigBase::readBoolEntry ( const TQString &  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
pKeyThe key to search for
bDefaultA default value returned if the key was not found.
Returns
The value for this key.

Definition at line 748 of file tdeconfigbase.cpp.

◆ readColorEntry() [1/2]

TQColor TDEConfigBase::readColorEntry ( const char *  pKey,
const TQColor *  pDefault = 0L 
) const

Reads a TQColor entry.

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

Parameters
pKeyThe key to search for.
pDefaultA default value (null TQColor 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 953 of file tdeconfigbase.cpp.

◆ readColorEntry() [2/2]

TQColor TDEConfigBase::readColorEntry ( const TQString &  pKey,
const TQColor *  pDefault = 0L 
) const

Reads a TQColor entry.

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

Parameters
pKeyThe key to search for.
pDefaultA default value (null TQColor 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 947 of file tdeconfigbase.cpp.

◆ readDateTimeEntry() [1/2]

TQDateTime TDEConfigBase::readDateTimeEntry ( const char *  pKey,
const TQDateTime *  pDefault = 0L 
) const

Reads a TQDateTime entry.

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

Parameters
pKeyThe key to search for.
pDefaultA 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 1019 of file tdeconfigbase.cpp.

◆ readDateTimeEntry() [2/2]

TQDateTime TDEConfigBase::readDateTimeEntry ( const TQString &  pKey,
const TQDateTime *  pDefault = 0L 
) const

Reads a TQDateTime entry.

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

Parameters
pKeyThe key to search for.
pDefaultA 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 1012 of file tdeconfigbase.cpp.

◆ readDefaults()

bool TDEConfigBase::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 1772 of file tdeconfigbase.cpp.

◆ readDoubleNumEntry() [1/2]

double TDEConfigBase::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
pKeyThe key to search for.
nDefaultA 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 734 of file tdeconfigbase.cpp.

◆ readDoubleNumEntry() [2/2]

double TDEConfigBase::readDoubleNumEntry ( const TQString &  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
pKeyThe key to search for.
nDefaultA 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 729 of file tdeconfigbase.cpp.

◆ readEntry() [1/2]

TQString TDEConfigBase::readEntry ( const char *  pKey,
const TQString &  aDefault = TQString::null 
) const

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

Parameters
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key. Can be TQString::null if aDefault is null.

Definition at line 227 of file tdeconfigbase.cpp.

◆ readEntry() [2/2]

TQString TDEConfigBase::readEntry ( const TQString &  pKey,
const TQString &  aDefault = TQString::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
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key. Can be TQString::null if aDefault is null.

Definition at line 221 of file tdeconfigbase.cpp.

◆ readEntryUntranslated() [1/2]

TQString TDEConfigBase::readEntryUntranslated ( const char *  pKey,
const TQString &  aDefault = TQString::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
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key.

Definition at line 211 of file tdeconfigbase.cpp.

◆ readEntryUntranslated() [2/2]

TQString TDEConfigBase::readEntryUntranslated ( const TQString &  pKey,
const TQString &  aDefault = TQString::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
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key.

Definition at line 204 of file tdeconfigbase.cpp.

◆ readEntryUtf8()

TQCString TDEConfigBase::readEntryUtf8 ( const char *  pKey) const
protected

Definition at line 350 of file tdeconfigbase.cpp.

◆ readFontEntry() [1/2]

TQFont TDEConfigBase::readFontEntry ( const char *  pKey,
const TQFont *  pDefault = 0L 
) const

Reads a TQFont value.

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

Parameters
pKeyThe key to search for.
pDefaultA default value (null TQFont 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 780 of file tdeconfigbase.cpp.

◆ readFontEntry() [2/2]

TQFont TDEConfigBase::readFontEntry ( const TQString &  pKey,
const TQFont *  pDefault = 0L 
) const

Reads a TQFont value.

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

Parameters
pKeyThe key to search for.
pDefaultA default value (null TQFont 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 775 of file tdeconfigbase.cpp.

◆ readIntListEntry() [1/2]

TQValueList< int > TDEConfigBase::readIntListEntry ( const char *  pKey) const

Reads a list of Integers.

Parameters
pKeyThe key to search for.
Returns
The list. Empty if the entry does not exist.

Definition at line 572 of file tdeconfigbase.cpp.

◆ readIntListEntry() [2/2]

TQValueList< int > TDEConfigBase::readIntListEntry ( const TQString &  pKey) const

Reads a list of Integers.

Parameters
pKeyThe key to search for.
Returns
The list. Empty if the entry does not exist.

Definition at line 567 of file tdeconfigbase.cpp.

◆ readListEntry() [1/5]

TQStringList TDEConfigBase::readListEntry ( const char *  pKey,
char  sep = ',' 
) const

Reads a list of strings.

Parameters
pKeyThe key to search for.
sepThe list separator (default is ",").
Returns
The list. Empty if the entry does not exist.

Definition at line 517 of file tdeconfigbase.cpp.

◆ readListEntry() [2/5]

TQStringList TDEConfigBase::readListEntry ( const char *  pKey,
const TQStringList &  aDefault,
char  sep = ',' 
) const

Reads a list of strings, but returns a default if the key did not exist.

Parameters
pKeyThe key to search for.
aDefaultThe default value to use if the key does not exist.
sepThe list separator (default is ",").
Returns
The list. Contains aDefault if the Key does not exist.
Since
3.3

Definition at line 558 of file tdeconfigbase.cpp.

◆ readListEntry() [3/5]

int TDEConfigBase::readListEntry ( const char *  pKey,
TQStrList &  list,
char  sep = ',' 
) const

Reads a list of strings.

Deprecated:
Parameters
pKeyThe key to search for
listIn this object, the read list will be returned.
sepThe list separator (default ",")
Returns
The number of entries in the list.

Definition at line 473 of file tdeconfigbase.cpp.

◆ readListEntry() [4/5]

TQStringList TDEConfigBase::readListEntry ( const TQString &  pKey,
char  sep = ',' 
) const

Reads a list of strings.

Parameters
pKeyThe key to search for.
sepThe list separator (default is ",").
Returns
The list. Empty if the entry does not exist.

Definition at line 512 of file tdeconfigbase.cpp.

◆ readListEntry() [5/5]

int TDEConfigBase::readListEntry ( const TQString &  pKey,
TQStrList &  list,
char  sep = ',' 
) const

Reads a list of strings.

Deprecated:
Parameters
pKeyThe key to search for
listIn this object, the read list will be returned.
sepThe list separator (default ",")
Returns
The number of entries in the list.

Definition at line 467 of file tdeconfigbase.cpp.

◆ readLongNumEntry() [1/2]

long TDEConfigBase::readLongNumEntry ( const char *  pKey,
long  nDefault = 0 
) const

Reads a numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 658 of file tdeconfigbase.cpp.

◆ readLongNumEntry() [2/2]

long TDEConfigBase::readLongNumEntry ( const TQString &  pKey,
long  nDefault = 0 
) const

Reads a numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 653 of file tdeconfigbase.cpp.

◆ readNum64Entry() [1/2]

TQ_INT64 TDEConfigBase::readNum64Entry ( const char *  pKey,
TQ_INT64  nDefault = 0 
) const

Reads a 64-bit numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 695 of file tdeconfigbase.cpp.

◆ readNum64Entry() [2/2]

TQ_INT64 TDEConfigBase::readNum64Entry ( const TQString &  pKey,
TQ_INT64  nDefault = 0 
) const

Reads a 64-bit numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 690 of file tdeconfigbase.cpp.

◆ readNumEntry() [1/2]

int TDEConfigBase::readNumEntry ( const char *  pKey,
int  nDefault = 0 
) const

Reads a numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 618 of file tdeconfigbase.cpp.

◆ readNumEntry() [2/2]

int TDEConfigBase::readNumEntry ( const TQString &  pKey,
int  nDefault = 0 
) const

Reads a numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 613 of file tdeconfigbase.cpp.

◆ readPathEntry() [1/2]

TQString TDEConfigBase::readPathEntry ( const char *  pKey,
const TQString &  aDefault = TQString::null 
) const

Reads a path.

Read the value of an entry specified by pKey in the current group and interpret it as a path. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key. Can be TQString::null if aDefault is null.

Definition at line 590 of file tdeconfigbase.cpp.

◆ readPathEntry() [2/2]

TQString TDEConfigBase::readPathEntry ( const TQString &  pKey,
const TQString &  aDefault = TQString::null 
) const

Reads a path.

Read the value of an entry specified by pKey in the current group and interpret it as a path. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters
pKeyThe key to search for.
aDefaultA default value returned if the key was not found.
Returns
The value for this key. Can be TQString::null if aDefault is null.

Definition at line 585 of file tdeconfigbase.cpp.

◆ readPathListEntry() [1/2]

TQStringList TDEConfigBase::readPathListEntry ( const char *  pKey,
char  sep = ',' 
) const

Reads a list of string paths.

Read the value of an entry specified by pKey in the current group and interpret it as a list of paths. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters
pKeyThe key to search for.
sepThe list separator (default is ",").
Returns
The list. Empty if the entry does not exist.
Since
3.1.3

Definition at line 604 of file tdeconfigbase.cpp.

◆ readPathListEntry() [2/2]

TQStringList TDEConfigBase::readPathListEntry ( const TQString &  pKey,
char  sep = ',' 
) const

Reads a list of string paths.

Read the value of an entry specified by pKey in the current group and interpret it as a list of paths. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.

Parameters
pKeyThe key to search for.
sepThe list separator (default is ",").
Returns
The list. Empty if the entry does not exist.
Since
3.1.3

Definition at line 599 of file tdeconfigbase.cpp.

◆ readPointEntry() [1/2]

TQPoint TDEConfigBase::readPointEntry ( const char *  pKey,
const TQPoint *  pDefault = 0L 
) const

Reads a TQPoint entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQPoint 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 902 of file tdeconfigbase.cpp.

◆ readPointEntry() [2/2]

TQPoint TDEConfigBase::readPointEntry ( const TQString &  pKey,
const TQPoint *  pDefault = 0L 
) const

Reads a TQPoint entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQPoint 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 896 of file tdeconfigbase.cpp.

◆ readPropertyEntry() [1/4]

TQVariant TDEConfigBase::readPropertyEntry ( const char *  pKey,
const TQVariant &  aDefault 
) const

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

The value is treated as if it is of the type of the given default value.

Note that only the following TQVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.

Parameters
pKeyThe key to search for.
aDefaultA default value returned if the key was not found or if the read value cannot be converted to the TQVariant::Type.
Returns
The value for the key or the default value if the key was not found.

Definition at line 386 of file tdeconfigbase.cpp.

◆ readPropertyEntry() [2/4]

TQVariant TDEConfigBase::readPropertyEntry ( const char *  pKey,
TQVariant::Type  type 
) const

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

The value is treated as if it is of the given type.

Note that only the following TQVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.

Deprecated:
Parameters
pKeyThe key to search for.
Returns
An invalid TQVariant if the key was not found or if the read value cannot be converted to the given TQVariant::Type.

Definition at line 371 of file tdeconfigbase.cpp.

◆ readPropertyEntry() [3/4]

TQVariant TDEConfigBase::readPropertyEntry ( const TQString &  pKey,
const TQVariant &  aDefault 
) const

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

The value is treated as if it is of the type of the given default value.

Note that only the following TQVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.

Parameters
pKeyThe key to search for.
aDefaultA default value returned if the key was not found or if the read value cannot be converted to the TQVariant::Type.
Returns
The value for the key or the default value if the key was not found.

Definition at line 380 of file tdeconfigbase.cpp.

◆ readPropertyEntry() [4/4]

TQVariant TDEConfigBase::readPropertyEntry ( const TQString &  pKey,
TQVariant::Type  type 
) const

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

The value is treated as if it is of the given type.

Note that only the following TQVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, DateTime and Date.

Deprecated:
Parameters
pKeyThe key to search for.
Returns
An invalid TQVariant if the key was not found or if the read value cannot be converted to the given TQVariant::Type.

Definition at line 365 of file tdeconfigbase.cpp.

◆ readRectEntry() [1/2]

TQRect TDEConfigBase::readRectEntry ( const char *  pKey,
const TQRect *  pDefault = 0L 
) const

Reads a TQRect entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQRect 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 877 of file tdeconfigbase.cpp.

◆ readRectEntry() [2/2]

TQRect TDEConfigBase::readRectEntry ( const TQString &  pKey,
const TQRect *  pDefault = 0L 
) const

Reads a TQRect entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQRect 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 872 of file tdeconfigbase.cpp.

◆ readSizeEntry() [1/2]

TQSize TDEConfigBase::readSizeEntry ( const char *  pKey,
const TQSize *  pDefault = 0L 
) const

Reads a TQSize entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQSize 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 927 of file tdeconfigbase.cpp.

◆ readSizeEntry() [2/2]

TQSize TDEConfigBase::readSizeEntry ( const TQString &  pKey,
const TQSize *  pDefault = 0L 
) const

Reads a TQSize entry.

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

Parameters
pKeyThe key to search for
pDefaultA default value (null TQSize 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 921 of file tdeconfigbase.cpp.

◆ readUnsignedLongNumEntry() [1/2]

unsigned long TDEConfigBase::readUnsignedLongNumEntry ( const char *  pKey,
unsigned long  nDefault = 0 
) const

Read an unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 677 of file tdeconfigbase.cpp.

◆ readUnsignedLongNumEntry() [2/2]

unsigned long TDEConfigBase::readUnsignedLongNumEntry ( const TQString &  pKey,
unsigned long  nDefault = 0 
) const

Read an unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 672 of file tdeconfigbase.cpp.

◆ readUnsignedNum64Entry() [1/2]

TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry ( const char *  pKey,
TQ_UINT64  nDefault = 0 
) const

Read an 64-bit unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 715 of file tdeconfigbase.cpp.

◆ readUnsignedNum64Entry() [2/2]

TQ_UINT64 TDEConfigBase::readUnsignedNum64Entry ( const TQString &  pKey,
TQ_UINT64  nDefault = 0 
) const

Read an 64-bit unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 710 of file tdeconfigbase.cpp.

◆ readUnsignedNumEntry() [1/2]

unsigned int TDEConfigBase::readUnsignedNumEntry ( const char *  pKey,
unsigned int  nDefault = 0 
) const

Reads an unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 639 of file tdeconfigbase.cpp.

◆ readUnsignedNumEntry() [2/2]

unsigned int TDEConfigBase::readUnsignedNumEntry ( const TQString &  pKey,
unsigned int  nDefault = 0 
) const

Reads an unsigned numerical value.

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

Parameters
pKeyThe key to search for.
nDefaultA 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 634 of file tdeconfigbase.cpp.

◆ reparseConfiguration()

virtual void TDEConfigBase::reparseConfiguration ( )
pure virtual

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.

See also
parseConfigFiles()

Implemented in TDEConfig.

◆ revertToDefault()

void TDEConfigBase::revertToDefault ( const TQString &  key)

Reverts the entry with key key in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file.

To revert entries in the global KDE config file, the global KDE config file should be opened explicitly in a separate config object.

Parameters
keyThe key of the entry to revert.
Since
3.2

Definition at line 1777 of file tdeconfigbase.cpp.

◆ rollback()

void TDEConfigBase::rollback ( bool  bDeep = true)
virtual

Mark the config object as "clean," i.e.

don't write dirty entries at destruction time. If bDeep is false, only the global dirty flag of the TDEConfig object gets cleared. If you then call writeEntry() again, the global dirty flag is set again and all dirty entries will be written at a subsequent sync() call.

Classes that derive from TDEConfigBase should override this method and implement storage-specific behavior, as well as calling the TDEConfigBase::rollback() explicitly in the initializer.

Parameters
bDeepIf true, the dirty flags of all entries are cleared, as well as the global dirty flag.

Reimplemented in TDEConfig.

Definition at line 1755 of file tdeconfigbase.cpp.

◆ setDesktopGroup()

void TDEConfigBase::setDesktopGroup ( )

Sets the group to the "Desktop Entry" group used for desktop configuration files for applications, mime types, etc.

Definition at line 104 of file tdeconfigbase.cpp.

◆ setDirty()

virtual void TDEConfigBase::setDirty ( bool  _bDirty = true)
inlineprotectedvirtual

Sets the global dirty flag of the config object.

Parameters
_bDirtyHow to mark the object's dirty status

Reimplemented in TDEConfigGroup.

Definition at line 1922 of file tdeconfigbase.h.

◆ setDollarExpansion()

void TDEConfigBase::setDollarExpansion ( bool  _bExpand = true)
inline

Turns on or off "dollar expansion" (see TDEConfigBase introduction) when reading config entries.

Dollar sign expansion is initially OFF.

Parameters
_bExpandTf true, dollar expansion is turned on.

Definition at line 1702 of file tdeconfigbase.h.

◆ setGroup() [1/3]

void TDEConfigBase::setGroup ( const char *  pGroup)

Definition at line 87 of file tdeconfigbase.cpp.

◆ setGroup() [2/3]

void TDEConfigBase::setGroup ( const TQCString &  pGroup)

Overloaded public methods:

Definition at line 92 of file tdeconfigbase.cpp.

◆ setGroup() [3/3]

void TDEConfigBase::setGroup ( const TQString &  group)

Specifies the group in which keys will be read and written.

Subsequent calls to readEntry() and writeEntry() will be applied only in the activated group.

Switch back to the default group by passing a null string.

Parameters
groupThe name of the new group.

Definition at line 79 of file tdeconfigbase.cpp.

◆ setLocale()

void TDEConfigBase::setLocale ( )
protected

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 TDEApplication::init()

Definition at line 62 of file tdeconfigbase.cpp.

◆ setReadDefaults()

void TDEConfigBase::setReadDefaults ( bool  b)

When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference.

This is off by default.

Since
3.2

Definition at line 1761 of file tdeconfigbase.cpp.

◆ setReadOnly()

virtual void TDEConfigBase::setReadOnly ( bool  _ro)
inlinevirtual

Sets the config object's read-only status.

Parameters
_roIf true, the config object will not write out any changes to disk even if it is destroyed or sync() is called.

Definition at line 1755 of file tdeconfigbase.h.

◆ sync()

void TDEConfigBase::sync ( )
virtual

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 readOnly status.

You should call this from your destructor in derivative classes.

See also
rollback(), isReadOnly()

Reimplemented in KSimpleConfig, and TDEConfigGroup.

Definition at line 1738 of file tdeconfigbase.cpp.

◆ virtual_hook()

void TDEConfigBase::virtual_hook ( int  id,
void *  data 
)
protectedvirtual

Definition at line 1898 of file tdeconfigbase.cpp.

◆ writeEntry() [1/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
bool  bValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes a boolean value.

Parameters
pKeyThe key to write.
bValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1584 of file tdeconfigbase.cpp.

◆ writeEntry() [2/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const char *  pValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)
inline

Write a (key/value) pair.

This is stored to the most specific config file when destroying the config object or when calling sync().

Parameters
pKeyThe key to write.
pValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1000 of file tdeconfigbase.h.

◆ writeEntry() [3/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQColor &  rColor,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rColorThe color value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1684 of file tdeconfigbase.cpp.

◆ writeEntry() [4/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQDateTime &  rDateTime,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rDateTimeThe date and time value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1705 of file tdeconfigbase.cpp.

◆ writeEntry() [5/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQFont &  rFont,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes a font value.

Parameters
pKeyThe key to write.
rFontThe font value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1607 of file tdeconfigbase.cpp.

◆ writeEntry() [6/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQPoint &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe point value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1644 of file tdeconfigbase.cpp.

◆ writeEntry() [7/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQRect &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe rectangle value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1622 of file tdeconfigbase.cpp.

◆ writeEntry() [8/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQSize &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe size value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1664 of file tdeconfigbase.cpp.

◆ writeEntry() [9/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQString &  pValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a key/value pair.

This is stored in the most specific config file when destroying the config object or when calling sync().

Parameters
pKeyThe key to write.
pValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1052 of file tdeconfigbase.cpp.

◆ writeEntry() [10/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQStringList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of strings.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1416 of file tdeconfigbase.cpp.

◆ writeEntry() [11/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQStrList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of strings.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1376 of file tdeconfigbase.cpp.

◆ writeEntry() [12/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQValueList< int > &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of Integers.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1459 of file tdeconfigbase.cpp.

◆ writeEntry() [13/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
const TQVariant &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() Overridden to accept a property.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe property to write
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1275 of file tdeconfigbase.cpp.

◆ writeEntry() [14/40]

void TDEConfigBase::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.

Same as above, but writes a floating-point value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
formatformat determines the format to which the value is converted. Default is 'g'.
precisionprecision sets the precision with which the value is converted. Default is 6 as in TQString.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1566 of file tdeconfigbase.cpp.

◆ writeEntry() [15/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
int  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Write a (key/value) pair.

Same as above, but writes a numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1476 of file tdeconfigbase.cpp.

◆ writeEntry() [16/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
long  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but write a long numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1506 of file tdeconfigbase.cpp.

◆ writeEntry() [17/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
TQ_INT64  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but write a long numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1535 of file tdeconfigbase.cpp.

◆ writeEntry() [18/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
TQ_UINT64  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned 64-bit numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1550 of file tdeconfigbase.cpp.

◆ writeEntry() [19/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
unsigned int  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1491 of file tdeconfigbase.cpp.

◆ writeEntry() [20/40]

void TDEConfigBase::writeEntry ( const char *  pKey,
unsigned long  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned long numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1521 of file tdeconfigbase.cpp.

◆ writeEntry() [21/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
bool  bValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes a boolean value.

Parameters
pKeyThe key to write.
bValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1576 of file tdeconfigbase.cpp.

◆ writeEntry() [22/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const char *  pValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)
inline

Write a (key/value) pair.

This is stored to the most specific config file when destroying the config object or when calling sync().

Parameters
pKeyThe key to write.
pValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 979 of file tdeconfigbase.h.

◆ writeEntry() [23/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQColor &  rColor,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rColorThe color value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1676 of file tdeconfigbase.cpp.

◆ writeEntry() [24/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQDateTime &  rDateTime,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rDateTimeThe date and time value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1698 of file tdeconfigbase.cpp.

◆ writeEntry() [25/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQFont &  rFont,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes a font value.

Parameters
pKeyThe key to write.
rFontThe font value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1600 of file tdeconfigbase.cpp.

◆ writeEntry() [26/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQPoint &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe point value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1637 of file tdeconfigbase.cpp.

◆ writeEntry() [27/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQRect &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe rectangle value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1615 of file tdeconfigbase.cpp.

◆ writeEntry() [28/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQSize &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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!

Parameters
pKeyThe key to write.
rValueThe size value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1657 of file tdeconfigbase.cpp.

◆ writeEntry() [29/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQString &  pValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a key/value pair.

This is stored in the most specific config file when destroying the config object or when calling sync().

If you want to write a path, please use writePathEntry().

Parameters
pKeyThe key to write.
pValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1044 of file tdeconfigbase.cpp.

◆ writeEntry() [30/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQStringList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of strings.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1409 of file tdeconfigbase.cpp.

◆ writeEntry() [31/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQStrList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of strings.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1369 of file tdeconfigbase.cpp.

◆ writeEntry() [32/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQValueList< int > &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() overridden to accept a list of Integers.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe list to write
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1453 of file tdeconfigbase.cpp.

◆ writeEntry() [33/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
const TQVariant &  rValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

writeEntry() Overridden to accept a property.

Note: Unlike the other writeEntry() functions, the old value is not returned here!

Parameters
pKeyThe key to write
rValueThe property to write
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writeEntry()

Definition at line 1268 of file tdeconfigbase.cpp.

◆ writeEntry() [34/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
double  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
char  format = 'g',
int  precision = 6,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes a floating-point value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
formatformat determines the format to which the value is converted. Default is 'g'.
precisionprecision sets the precision with which the value is converted. Default is 6 as in TQString.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1557 of file tdeconfigbase.cpp.

◆ writeEntry() [35/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
int  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Write a (key/value) pair.

Same as above, but writes a numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1469 of file tdeconfigbase.cpp.

◆ writeEntry() [36/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
long  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but write a long numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1499 of file tdeconfigbase.cpp.

◆ writeEntry() [37/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
TQ_INT64  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but write a 64-bit numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1528 of file tdeconfigbase.cpp.

◆ writeEntry() [38/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
TQ_UINT64  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned 64-bit numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1543 of file tdeconfigbase.cpp.

◆ writeEntry() [39/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
unsigned int  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1484 of file tdeconfigbase.cpp.

◆ writeEntry() [40/40]

void TDEConfigBase::writeEntry ( const TQString &  pKey,
unsigned long  nValue,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

Writes a (key/value) pair.

Same as above, but writes an unsigned long numerical value.

Parameters
pKeyThe key to write.
nValueThe value to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1514 of file tdeconfigbase.cpp.

◆ writePathEntry() [1/5]

void TDEConfigBase::writePathEntry ( const char *  pKey,
const TQString &  path,
bool  bPersistent,
bool  bGlobal,
bool  bNLS,
bool  expand 
)

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

Parameters
pKeyThe key to write.
pathThe path to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
expandIf expand is true, environment variables will be expanded on read.

Definition at line 1171 of file tdeconfigbase.cpp.

◆ writePathEntry() [2/5]

void TDEConfigBase::writePathEntry ( const char *  pKey,
const TQString &  path,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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

Parameters
pKeyThe key to write.
pathThe path to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1164 of file tdeconfigbase.cpp.

◆ writePathEntry() [3/5]

void TDEConfigBase::writePathEntry ( const char *  pKey,
const TQStringList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writePathEntry()
readPathListEntry()
Since
3.1.3

Definition at line 1185 of file tdeconfigbase.cpp.

◆ writePathEntry() [4/5]

void TDEConfigBase::writePathEntry ( const TQString &  pKey,
const TQString &  path,
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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

Parameters
pKeyThe key to write.
pathThe path to write.
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.

Definition at line 1093 of file tdeconfigbase.cpp.

◆ writePathEntry() [5/5]

void TDEConfigBase::writePathEntry ( const TQString &  pKey,
const TQStringList &  rValue,
char  sep = ',',
bool  bPersistent = true,
bool  bGlobal = false,
bool  bNLS = false 
)

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

Parameters
pKeyThe key to write
rValueThe list to write
sepThe list separator (default is ",").
bPersistentIf bPersistent is false, the entry's dirty flag will not be set and thus the entry will not be written to disk at deletion time.
bGlobalIf bGlobal is true, the pair is not saved to the application specific config file, but to the global KDE config file.
bNLSIf bNLS is true, the locale tag is added to the key when writing it back.
See also
writePathEntry()
readPathListEntry()
Since
3.1.3

Definition at line 1178 of file tdeconfigbase.cpp.

Friends And Related Function Documentation

◆ TDEConfigBackEnd

friend class TDEConfigBackEnd
friend

Definition at line 75 of file tdeconfigbase.h.

◆ TDEConfigGroup

friend class TDEConfigGroup
friend

Definition at line 77 of file tdeconfigbase.h.

◆ TDEConfigINIBackEnd

friend class TDEConfigINIBackEnd
friend

Definition at line 76 of file tdeconfigbase.h.

Member Data Documentation

◆ aLocaleString

TQCString TDEConfigBase::aLocaleString
protected

The locale to retrieve keys under if possible, i.e en_US or fr.


Definition at line 2020 of file tdeconfigbase.h.

◆ backEnd

TDEConfigBackEnd* TDEConfigBase::backEnd
protected

A back end for loading/saving to disk in a particular format.

Definition at line 1999 of file tdeconfigbase.h.

◆ bDirty

bool TDEConfigBase::bDirty
protected

Indicates whether there are any dirty entries in the config object that need to be written back to disk.

Definition at line 2025 of file tdeconfigbase.h.

◆ bExpand

bool TDEConfigBase::bExpand
mutableprotected

Definition at line 2029 of file tdeconfigbase.h.

◆ bLocaleInitialized

bool TDEConfigBase::bLocaleInitialized
protected

Definition at line 2027 of file tdeconfigbase.h.

◆ bReadOnly

bool TDEConfigBase::bReadOnly
protected

Definition at line 2028 of file tdeconfigbase.h.

◆ mGroup

TQCString TDEConfigBase::mGroup
protected

The currently selected group.

Definition at line 2016 of file tdeconfigbase.h.


The documentation for this class was generated from the following files:
  • tdeconfigbase.h
  • tdeconfigbase.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.