KConfigIniBackend Class Reference
#include <kconfigini_p.h>

Classes | |
| class | BufferFragment |
Public Member Functions | |
| KConfigIniBackend () | |
| ~KConfigIniBackend () | |
| KConfigBase::AccessMode | accessMode () const |
| void | createEnclosing () |
| bool | isLocked () const |
| bool | isWritable () const |
| bool | lock (const KComponentData &componentData) |
| QString | nonWritableErrorMessage () const |
| ParseInfo | parseConfig (const QByteArray &locale, KEntryMap &entryMap, ParseOptions options, bool merging) |
| ParseInfo | parseConfig (const QByteArray &locale, KEntryMap &entryMap, ParseOptions options) |
| void | setFilePath (const QString &path) |
| void | unlock () |
| bool | writeConfig (const QByteArray &locale, KEntryMap &entryMap, WriteOptions options, const KComponentData &data) |
Protected Types | |
| enum | StringType { GroupString = 0, KeyString = 1, ValueString = 2 } |
Protected Member Functions | |
| void | writeEntries (const QByteArray &locale, QFile &file, const KEntryMap &map) |
| void | writeEntries (const QByteArray &locale, QFile &file, const KEntryMap &map, bool defaultGroup, bool &firstEntry) |
Static Protected Member Functions | |
| static char | charFromHex (const char *str, const QFile &file, int line) |
| static void | printableToString (BufferFragment *aString, const QFile &file, int line) |
| static QByteArray | stringToPrintable (const QByteArray &aString, StringType type) |
| static QString | warningProlog (const QFile &file, int line) |
Detailed Description
Definition at line 30 of file kconfigini_p.h.
Member Enumeration Documentation
enum KConfigIniBackend::StringType [protected] |
Definition at line 62 of file kconfigini_p.h.
Constructor & Destructor Documentation
| KConfigIniBackend::KConfigIniBackend | ( | ) |
Definition at line 53 of file kconfigini.cpp.
| KConfigIniBackend::~KConfigIniBackend | ( | ) |
Definition at line 58 of file kconfigini.cpp.
Member Function Documentation
| KConfigBase::AccessMode KConfigIniBackend::accessMode | ( | ) | const [virtual] |
- Returns:
- the read/write status of the configuration object
- See also:
- KConfigBase::AccessMode
Implements KConfigBackend.
Definition at line 558 of file kconfigini.cpp.
| char KConfigIniBackend::charFromHex | ( | const char * | str, |
| const QFile & | file, | ||
| int | line | ||
| ) | [static, protected] |
Definition at line 675 of file kconfigini.cpp.
| void KConfigIniBackend::createEnclosing | ( | ) | [virtual] |
Create the enclosing object of the configuration object.
For example, if the configuration object is a file, this should create the parent directory.
Implements KConfigBackend.
Definition at line 526 of file kconfigini.cpp.
| bool KConfigIniBackend::isLocked | ( | ) | const [virtual] |
- Returns:
trueif the file is locked,falseif it is not locked
Implements KConfigBackend.
Definition at line 588 of file kconfigini.cpp.
| bool KConfigIniBackend::isWritable | ( | ) | const [virtual] |
If isWritable() returns false, writeConfig() will always fail.
- Returns:
trueif the configuration is writable,falseif it is immutable
Implements KConfigBackend.
Definition at line 498 of file kconfigini.cpp.
| bool KConfigIniBackend::lock | ( | const KComponentData & | componentData | ) | [virtual] |
| QString KConfigIniBackend::nonWritableErrorMessage | ( | ) | const [virtual] |
When isWritable() returns false, return an error message to explain to the user why saving configuration will not work.
The return value when isWritable() returns true is undefined.
- Returns:
- a translated user-visible explanation for the configuration object not being writable
Implements KConfigBackend.
Definition at line 521 of file kconfigini.cpp.
| KConfigBackend::ParseInfo KConfigIniBackend::parseConfig | ( | const QByteArray & | locale, |
| KEntryMap & | entryMap, | ||
| ParseOptions | options, | ||
| bool | merging | ||
| ) |
Definition at line 70 of file kconfigini.cpp.
| KConfigBackend::ParseInfo KConfigIniBackend::parseConfig | ( | const QByteArray & | locale, |
| KEntryMap & | pWriteBackMap, | ||
| ParseOptions | options | ||
| ) | [virtual] |
Read persistent storage.
- Parameters:
-
locale the locale to read entries for (if the backend supports localized entries) pWriteBackMap the KEntryMap where the entries are placed options
- See also:
- ParseOptions
- Returns:
- See also:
- ParseInfo
Implements KConfigBackend.
Definition at line 63 of file kconfigini.cpp.
| void KConfigIniBackend::printableToString | ( | BufferFragment * | aString, |
| const QFile & | file, | ||
| int | line | ||
| ) | [static, protected] |
Definition at line 699 of file kconfigini.cpp.
| void KConfigIniBackend::setFilePath | ( | const QString & | path | ) | [virtual] |
Set the file path.
- Note:
pathMUST be absolute.
- Parameters:
-
path the absolute file path
Implements KConfigBackend.
Definition at line 537 of file kconfigini.cpp.
| QByteArray KConfigIniBackend::stringToPrintable | ( | const QByteArray & | aString, |
| StringType | type | ||
| ) | [static, protected] |
Definition at line 593 of file kconfigini.cpp.
| void KConfigIniBackend::unlock | ( | ) | [virtual] |
Release the lock on the file.
Implements KConfigBackend.
Definition at line 582 of file kconfigini.cpp.
Definition at line 47 of file kconfigini.cpp.
| bool KConfigIniBackend::writeConfig | ( | const QByteArray & | locale, |
| KEntryMap & | entryMap, | ||
| WriteOptions | options, | ||
| const KComponentData & | data | ||
| ) | [virtual] |
Write the dirty entries to permanent storage.
- Parameters:
-
locale the locale to write entries for (if the backend supports localized entries) entryMap the KEntryMap containing the config object's entries. options
- See also:
- WriteOptions
- Parameters:
-
data the component that requested the write
- Returns:
trueif the write was successful,falseif writing the configuration failed
Implements KConfigBackend.
Definition at line 365 of file kconfigini.cpp.
| void KConfigIniBackend::writeEntries | ( | const QByteArray & | locale, |
| QFile & | file, | ||
| const KEntryMap & | map | ||
| ) | [protected] |
Definition at line 354 of file kconfigini.cpp.
| void KConfigIniBackend::writeEntries | ( | const QByteArray & | locale, |
| QFile & | file, | ||
| const KEntryMap & | map, | ||
| bool | defaultGroup, | ||
| bool & | firstEntry | ||
| ) | [protected] |
Definition at line 267 of file kconfigini.cpp.
The documentation for this class was generated from the following files:
KDE 4.6 API Reference