KDECore
KConfigBackend Class Reference
#include <KConfigBackEnd>

Detailed Description
Definition at line 43 of file kconfigbackend.h.
Public Types | |
enum | ParseInfo { ParseOk, ParseImmutable, ParseOpenError } |
enum | ParseOption { ParseGlobal = 1, ParseDefaults = 2, ParseExpansions = 4 } |
enum | WriteOption { WriteGlobal = 1 } |
Public Member Functions | |
virtual KConfigBase::AccessMode | accessMode () const =0 |
virtual void | createEnclosing ()=0 |
QString | filePath () const |
virtual bool | isLocked () const =0 |
virtual bool | isWritable () const =0 |
QDateTime | lastModified () const |
virtual bool | lock (const KComponentData &componentData)=0 |
virtual QString | nonWritableErrorMessage () const =0 |
virtual ParseInfo | parseConfig (const QByteArray &locale, KEntryMap &pWriteBackMap, ParseOptions options=ParseOptions())=0 |
virtual void | setFilePath (const QString &path)=0 |
qint64 | size () const |
virtual void | unlock ()=0 |
virtual bool | writeConfig (const QByteArray &locale, KEntryMap &entryMap, WriteOptions options, const KComponentData &data)=0 |
virtual | ~KConfigBackend () |
Static Public Member Functions | |
static KSharedPtr< KConfigBackend > | create (const KComponentData &componentData, const QString &fileName=QString(), const QString &system=QString()) |
static void | registerMappings (const KEntryMap &entryMap) |
Protected Member Functions | |
KConfigBackend () | |
void | setLastModified (const QDateTime &dt) |
void | setLocalFilePath (const QString &file) |
void | setSize (qint64 sz) |
Member Enumeration Documentation
Return value from parseConfig.
- Enumerator:
-
ParseOk ParseImmutable object opened read/write ParseOpenError object is immutable there was an error opening object
Definition at line 85 of file kconfigbackend.h.
options passed to parseConfig.
- Enumerator:
-
ParseGlobal ParseDefaults entries should be marked as global ParseExpansions entries should be marked as default
Definition at line 69 of file kconfigbackend.h.
Constructor & Destructor Documentation
KConfigBackend::~KConfigBackend | ( | ) | [virtual] |
KConfigBackend::KConfigBackend | ( | ) | [protected] |
Definition at line 92 of file kconfigbackend.cpp.
Member Function Documentation
virtual KConfigBase::AccessMode KConfigBackend::accessMode | ( | ) | const [pure virtual] |
get the read/write status of the configuration object.
- Note:
- This function MUST be implemented by sub-classes.
BackendPtr KConfigBackend::create | ( | const KComponentData & | componentData, | |
const QString & | fileName = QString() , |
|||
const QString & | system = QString() | |||
) | [static] |
returns a KConfigBackend object to be used with KConfig
- Parameters:
-
fileName the absolute file name system the configuration system to use. if the given system is not found or an empty string is passed in, then it tries to determine the correct backend to return.
Definition at line 64 of file kconfigbackend.cpp.
virtual void KConfigBackend::createEnclosing | ( | ) | [pure virtual] |
create the enclosing object of this object.
- Note:
- This function MUST be implemented by sub-classes.
QString KConfigBackend::filePath | ( | ) | const |
virtual bool KConfigBackend::isLocked | ( | ) | const [pure virtual] |
virtual bool KConfigBackend::isWritable | ( | ) | const [pure virtual] |
is this object writable?
- Note:
- This function MUST be implemented by sub-classes.
QDateTime KConfigBackend::lastModified | ( | ) | const |
when was the object last modified?
- Returns:
- the date/time when the object was last modified.
Definition at line 102 of file kconfigbackend.cpp.
virtual bool KConfigBackend::lock | ( | const KComponentData & | componentData | ) | [pure virtual] |
lock the file
virtual QString KConfigBackend::nonWritableErrorMessage | ( | ) | const [pure virtual] |
When isWritable returns false, return an error message to explain to the user why saving configuration will not work.
virtual ParseInfo KConfigBackend::parseConfig | ( | const QByteArray & | locale, | |
KEntryMap & | pWriteBackMap, | |||
ParseOptions | options = ParseOptions() | |||
) | [pure virtual] |
void KConfigBackend::registerMappings | ( | const KEntryMap & | entryMap | ) | [static] |
registers mappings from directory/file to configuration system
- Parameters:
-
entryMap the KEntryMap to build the mappings from
Definition at line 60 of file kconfigbackend.cpp.
virtual void KConfigBackend::setFilePath | ( | const QString & | path | ) | [pure virtual] |
Set the file path.
- Parameters:
-
path the absolute file path.
- Note:
path
MUST be absolute.This function MUST be implemented by sub-classes.
void KConfigBackend::setLastModified | ( | const QDateTime & | dt | ) | [protected] |
Definition at line 107 of file kconfigbackend.cpp.
void KConfigBackend::setLocalFilePath | ( | const QString & | file | ) | [protected] |
Definition at line 127 of file kconfigbackend.cpp.
void KConfigBackend::setSize | ( | qint64 | sz | ) | [protected] |
Definition at line 117 of file kconfigbackend.cpp.
qint64 KConfigBackend::size | ( | ) | const |
virtual void KConfigBackend::unlock | ( | ) | [pure virtual] |
virtual bool KConfigBackend::writeConfig | ( | const QByteArray & | locale, | |
KEntryMap & | entryMap, | |||
WriteOptions | options, | |||
const KComponentData & | data | |||
) | [pure virtual] |
Write the dirty entries to permanent storage.
- Parameters:
-
entryMap the KEntryMap containing the config object's entries. options
- See also:
- WriteOptions
The documentation for this class was generated from the following files: