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

tdecore

Public Member Functions | Protected Member Functions | List of all members
TDEConfigINIBackEnd Class Reference

#include <tdeconfigbackend.h>

Inheritance diagram for TDEConfigINIBackEnd:
TDEConfigBackEnd

Public Member Functions

 TDEConfigINIBackEnd (TDEConfigBase *_config, const TQString &_fileName, const char *_resType, bool _useKDEGlobals=true)
 
virtual ~TDEConfigINIBackEnd ()
 
bool parseConfigFiles ()
 
virtual void sync (bool bMerge=true)
 
- Public Member Functions inherited from TDEConfigBackEnd
 TDEConfigBackEnd (TDEConfigBase *_config, const TQString &_fileName, const char *_resType, bool _useKDEGlobals)
 
virtual ~TDEConfigBackEnd ()
 
virtual bool parseConfigFiles ()=0
 
virtual void sync (bool bMerge=true)=0
 
void changeFileName (const TQString &_fileName, const char *_resType, bool _useKDEGlobals)
 
virtual TDEConfigBase::ConfigState getConfigState () const
 
TQString fileName () const
 
const char * resource () const
 
void setLocaleString (const TQCString &_localeString)
 
void setFileWriteMode (int mode)
 
bool checkConfigFilesWritable (bool warnUser)
 
TDELockFile::Ptr lockFile (bool bGlobal=false)
 
TDE_DEPRECATED TQString filename () const
 

Protected Member Functions

void parseSingleConfigFile (TQFile &rFile, KEntryMap *pWriteBackMap=0L, bool bGlobal=false, bool bDefault=false)
 
void translateKey (TDELocale &locale, TQCString currentGroup, TQCString key)
 
bool writeConfigFile (TQString filename, bool bGlobal=false, bool bMerge=true)
 
bool getEntryMap (KEntryMap &map, bool bGlobal, TQFile *mergeFile)
 
void writeEntries (FILE *pStream, const KEntryMap &aTempMap)
 
virtual void virtual_hook (int id, void *data)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Protected Attributes inherited from TDEConfigBackEnd
TDEConfigBase * pConfig
 
TQString mfileName
 
TQCString resType
 
bool useKDEGlobals: 1
 
bool bFileImmutable: 1
 
TQCString localeString
 
TQString mLocalFileName
 
TQString mGlobalFileName
 
TDEConfigBase::ConfigState mConfigState
 
int mFileMode
 
TDEConfigBackEndPrivate * d
 

Detailed Description

Class for KDE INI-style configuration file loading/saving.

Author
Preston Brown pbrow.nosp@m.n@kd.nosp@m.e.org, Matthias Kalle Dalheimer kalle.nosp@m.@kde.nosp@m..org

Definition at line 191 of file tdeconfigbackend.h.

Constructor & Destructor Documentation

◆ TDEConfigINIBackEnd()

TDEConfigINIBackEnd::TDEConfigINIBackEnd ( TDEConfigBase *  _config,
const TQString &  _fileName,
const char *  _resType,
bool  _useKDEGlobals = true 
)
inline

Constructs an ini-style configuration back end.

Parameters
_configSpecifies the configuration object which values will be passed to as they are read, or from where values to be written to will be obtained from.
_fileNameThe name of the file in which config data is stored. All registered configuration directories will be looked in in order of decreasing relevance.
_resTypethe resource type of the fileName specified, if it is not an absolute path (otherwise this parameter is ignored).
_useKDEGlobalsIf true, the user's system-wide kdeglobals file will be imported into the config object. If false, only the filename specified will be dealt with.

Definition at line 210 of file tdeconfigbackend.h.

◆ ~TDEConfigINIBackEnd()

virtual TDEConfigINIBackEnd::~TDEConfigINIBackEnd ( )
inlinevirtual

Destructs the configuration backend.

Definition at line 217 of file tdeconfigbackend.h.

Member Function Documentation

◆ getEntryMap()

bool TDEConfigINIBackEnd::getEntryMap ( KEntryMap &  map,
bool  bGlobal,
TQFile *  mergeFile 
)
protected

Get the entry map.

Parameters
mapthe entries will be stored in this object.
bGlobalSpecifies whether to get only entries which are marked as belonging to the global KDE config file. If this is false, it skips those entries.
mergeFileif not null, the dirty entries for this file will be merged.
Returns
Whether there will be some entries left for writing to other files.

Definition at line 981 of file tdeconfigbackend.cpp.

◆ parseConfigFiles()

bool TDEConfigINIBackEnd::parseConfigFiles ( )
virtual

Parses all INI-style configuration files for a config object.

Returns
Whether or not parsing was successful.

Implements TDEConfigBackEnd.

Definition at line 320 of file tdeconfigbackend.cpp.

◆ parseSingleConfigFile()

void TDEConfigINIBackEnd::parseSingleConfigFile ( TQFile &  rFile,
KEntryMap *  pWriteBackMap = 0L,
bool  bGlobal = false,
bool  bDefault = false 
)
protected

Parses one configuration file.

Parameters
rFileThe configuration file to parse
pWriteBackMapIf specified, points to a KEntryMap where the data read from the file should be stored, instead of inserting them directly into the configuration object. Use this area as a "scratchpad" when you need to know what is on disk but don't want to effect the configuration object.
bGlobalSpecifies whether entries should be marked as belonging to the global KDE configuration file rather than the application-specific KDE configuration file(s).
bDefaultSpecifies whether entries should be marked as being default values.

Definition at line 450 of file tdeconfigbackend.cpp.

◆ sync()

void TDEConfigINIBackEnd::sync ( bool  bMerge = true)
virtual

Writes configuration data to file(s).

Parameters
bMergeSpecifies whether the old config file already on disk should be merged in with the data in memory. If true, data is read off the disk and merged. If false, the on-disk file is removed and only in-memory data is written out.

Implements TDEConfigBackEnd.

Definition at line 791 of file tdeconfigbackend.cpp.

◆ translateKey()

void TDEConfigINIBackEnd::translateKey ( TDELocale &  locale,
TQCString  currentGroup,
TQCString  key 
)
protected

Definition at line 775 of file tdeconfigbackend.cpp.

◆ virtual_hook()

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

Reimplemented from TDEConfigBackEnd.

Definition at line 1152 of file tdeconfigbackend.cpp.

◆ writeConfigFile()

bool TDEConfigINIBackEnd::writeConfigFile ( TQString  filename,
bool  bGlobal = false,
bool  bMerge = true 
)
protected

Writes configuration file back.

Parameters
filenameThe name of the file to write.
bGlobalSpecifies whether to write only entries which are marked as belonging to the global KDE config file. If this is false, it skips those entries.
bMergeSpecifies whether the old config file already on disk should be merged in with the data in memory. If true, data is read off the disk and merged. If false, the on-disk file is removed and only in-memory data is written out.
Returns
Whether some entries are left to be written to other files.

Definition at line 1035 of file tdeconfigbackend.cpp.

◆ writeEntries()

void TDEConfigINIBackEnd::writeEntries ( FILE *  pStream,
const KEntryMap &  aTempMap 
)
protected

Write the entries in aTempMap to the file stream.

Definition at line 1138 of file tdeconfigbackend.cpp.


The documentation for this class was generated from the following files:
  • tdeconfigbackend.h
  • tdeconfigbackend.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.