#include </home/clem/local/src/opie/noncore/apps/tinykate/libkate/kateconfig.h>
Collaboration diagram for KateConfig:

Public Types | |
| typedef QMap< QString, QString > | KateConfigGroup |
| enum | Domain { File, User } |
Public Member Functions | |
| KateConfig (const QString &name, Domain domain=User) | |
| ~KateConfig () | |
| bool | operator== (const KateConfig &other) const |
| bool | operator!= (const KateConfig &other) const |
| bool | isValid () const |
| bool | hasKey (const QString &key) const |
| bool | hasGroup (const QString &gname) const |
| QStringList | groupList () const |
| void | setGroup (const QString &gname) |
| void | writeEntry (const QString &key, const char *value) |
| void | writeEntry (const QString &key, const QString &value) |
| void | writeEntryCrypt (const QString &key, const QString &value) |
| void | writeEntry (const QString &key, int num) |
| void | writeEntry (const QString &key, unsigned int num) |
| void | writeEntry (const QString &key, const QStringList &lst, const QChar &sep) |
| void | writeEntry (const QString &key, const QColor &) |
| void | writeEntry (const QString &key, const QFont &) |
| void | removeEntry (const QString &key) |
| QString | readEntry (const QString &key, const QString &deflt=QString::null) const |
| QString | readEntryCrypt (const QString &key, const QString &deflt=QString::null) const |
| QString | readEntryDirect (const QString &key, const QString &deflt=QString::null) const |
| int | readNumEntry (const QString &key, int deflt=-1) const |
| bool | readBoolEntry (const QString &key, bool deflt=FALSE) const |
| QStringList | readListEntry (const QString &key, const QChar &sep) const |
| QColor | readColorEntry (const QString &, const QColor &) const |
| QFont | readFontEntry (const QString &, const QFont &) const |
| QValueList< int > | readIntListEntry (const QString &key) const |
| QString | readEntry (const QString &key, const QString &deflt) |
| QString | readEntryCrypt (const QString &key, const QString &deflt) |
| QString | readEntryDirect (const QString &key, const QString &deflt) |
| int | readNumEntry (const QString &key, int deflt) |
| bool | readBoolEntry (const QString &key, bool deflt) |
| QStringList | readListEntry (const QString &key, const QChar &sep) |
| void | clearGroup () |
| void | write (const QString &fn=QString::null) |
Protected Member Functions | |
| void | read () |
| bool | parse (const QString &line) |
Static Protected Member Functions | |
| static QString | configFilename (const QString &name, Domain) |
Protected Attributes | |
| QMap< QString, KateConfigGroup > | groups |
| QMap< QString, KateConfigGroup >::Iterator | git |
| QString | filename |
| QString | lang |
| QString | glang |
| bool | changed |
| KateConfigPrivate * | d |
Private Member Functions | |
| KateConfig (const QString &name, bool what) | |
You should keep a KateConfig in existence only while you do not want others to be able to change the state. There is no locking currently, but there may be in the future.
Definition at line 32 of file kateconfig.h.
|
|
For internal use only.
Definition at line 35 of file kateconfig.h. |
|
|
File User See KateConfig for details. Definition at line 37 of file kateconfig.h. |
|
||||||||||||
|
Constructs a config that will load or create a configuration with the given name in the given domain. You must call setGroup() before doing much else with the KateConfig. In the default Domain, User, the configuration is user-specific. name should not contain "/" in this case, and in general should be the name of the C++ class that is primarily responsible for maintaining the configuration. In the File Domain, name is an absolute filename. Definition at line 99 of file kateconfig.cpp. References QMap< Key, T >::end(), git, glang, groups, l, lang, oendl, owarn, and read(). |
|
|
Writes any changes to disk and destroys the in-memory object. Definition at line 125 of file kateconfig.cpp. |
|
||||||||||||
|
Definition at line 112 of file kateconfig.cpp. References QMap< Key, T >::end(), git, glang, groups, l, lang, and read(). |
|
|
Removes all entries from the current group. Definition at line 506 of file kateconfig.cpp. References changed, QMap< Key, T >::end(), git, groups, oendl, owarn, and TRUE. |
|
||||||||||||
|
For internal use only.
Definition at line 48 of file kateconfig.cpp. References QDir::exists(), File, QDir::path(), and User. |
|
|
Definition at line 49 of file kateconfig.h. |
|
|
Definition at line 48 of file kateconfig.h. Referenced by SyntaxDocument::setupModeList(). |
|
|
Returns whether the current group has an entry called key. Definition at line 135 of file kateconfig.cpp. References QMap< Key, T >::end(), FALSE, git, and groups. |
|
|
Returns whether the KateConfig is in a valid state. Definition at line 568 of file kateconfig.cpp. References QMap< Key, T >::end(), git, and groups. |
|
|
Tests for inequality with other. KateConfig objects are equal if they refer to the same filename. Definition at line 42 of file kateconfig.h. References filename. |
|
|
Tests for equality with other. KateConfig objects are equal if they refer to the same filename. Definition at line 41 of file kateconfig.h. References filename. |
|
|
For internal use only.
Definition at line 613 of file kateconfig.cpp. References QMap< Key, T >::end(), FALSE, QString::find(), git, groups, QMap< Key, T >::insert(), QString::isEmpty(), QString::left(), QString::length(), QString::mid(), QString::remove(), and TRUE. Referenced by read(). |
|
|
For internal use only.
Definition at line 576 of file kateconfig.cpp. References QValueList< T >::begin(), changed, QTextCodec::codecForMib(), QValueList< T >::end(), QMap< Key, T >::end(), f, FALSE, filename, git, groups, IO_ReadOnly, list, QFile::open(), parse(), QTextStream::read(), s, QTextStream::setCodec(), QTextStream::setEncoding(), QStringList::split(), and QTextStream::UnicodeUTF8. Referenced by KateConfig(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 443 of file kateconfig.cpp. References QString::isEmpty(), readEntry(), and QString::toInt(). |
|
||||||||||||
|
Reads a bool entry stored with key, defaulting to deflt if there is no entry. Definition at line 112 of file kateconfig.h. Referenced by KateDocument::readConfig(). |
|
||||||||||||
|
Definition at line 470 of file kateconfig.cpp. References QValueList< T >::count(), list, and readListEntry(). Referenced by KateDocument::readConfig(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 359 of file kateconfig.cpp. References glang, QString::isEmpty(), QString::isNull(), lang, and readEntryDirect(). |
|
||||||||||||
|
Reads a string entry stored with key, defaulting to deflt if there is no entry. Definition at line 104 of file kateconfig.h. Referenced by Highlight::getData(), Highlight::getItemDataList(), Highlight::getMimetypes(), Highlight::getWildcards(), readBoolEntry(), KateDocument::readConfig(), readIntListEntry(), readListEntry(), readNumEntry(), and SyntaxDocument::setupModeList(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 382 of file kateconfig.cpp. References decipher(), glang, QString::isEmpty(), QString::isNull(), lang, QString::null, and readEntryDirect(). |
|
||||||||||||
|
Reads an encrypted string entry stored with key, defaulting to deflt if there is no entry. Definition at line 106 of file kateconfig.h. |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 403 of file kateconfig.cpp. References QMap< Key, T >::end(), git, and groups. |
|
||||||||||||
|
For internal use only.
Definition at line 108 of file kateconfig.h. Referenced by readEntry(), and readEntryCrypt(). |
|
||||||||||||
|
Definition at line 479 of file kateconfig.cpp. References QValueList< T >::count(), list, and readListEntry(). Referenced by KateDocument::readConfig(). |
|
|
Definition at line 488 of file kateconfig.cpp. References QValueList< T >::append(), QValueList< T >::begin(), QValueList< T >::end(), QString::isEmpty(), l, readEntry(), and QStringList::split(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 461 of file kateconfig.cpp. References QString::isEmpty(), readEntry(), and QStringList::split(). |
|
||||||||||||
|
Reads a string list entry stored with key, and with sep as the separator. Definition at line 114 of file kateconfig.h. Referenced by readColorEntry(), and readFontEntry(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 425 of file kateconfig.cpp. References QString::isEmpty(), readEntry(), and QString::toInt(). |
|
||||||||||||
|
Reads a numeric entry stored with key, defaulting to deflt if there is no entry. Definition at line 110 of file kateconfig.h. Referenced by KateView::readConfig(), and KateDocument::readConfig(). |
|
|
Removes the key entry from the current group. Does nothing if there is no such entry. Definition at line 327 of file kateconfig.cpp. References changed, QMap< Key, T >::end(), git, groups, oendl, owarn, and TRUE. |
|
|
Sets the current group for subsequent reading and writing of entries to gname. Grouping allows the application to partition the namespace. This function must be called prior to any reading or writing of entries. The gname must not be empty. Definition at line 152 of file kateconfig.cpp. References changed, QMap< Key, T >::end(), QMap< Key, T >::find(), git, groups, QMap< Key, T >::insert(), and TRUE. Referenced by HlManager::defaultHl(), Highlight::getKateConfig(), KateView::readConfig(), KateDocument::readConfig(), SyntaxDocument::setupModeList(), KateView::writeConfig(), and KateDocument::writeConfig(). |
|
|
For internal use only.
Definition at line 521 of file kateconfig.cpp. References QMap< Key, T >::begin(), QFile::close(), QMap< Key, T >::end(), f, filename, git, groups, IO_Raw, IO_WriteOnly, QString::isEmpty(), QString::latin1(), QCString::length(), oendl, QFile::open(), owarn, QFile::remove(), str, tr, QString::utf8(), and QFile::writeBlock(). Referenced by SyntaxDocument::setupModeList(), and ~KateConfig(). |
|
||||||||||||
|
Definition at line 310 of file kateconfig.cpp. References QValueList< T >::append(), l, and writeEntry(). |
|
||||||||||||
|
Definition at line 300 of file kateconfig.cpp. References QValueList< T >::append(), l, and writeEntry(). |
|
||||||||||||||||
|
Writes a (key, lst) entry to the current group. The list is separated by sep, so the strings must not contain that character.
Definition at line 291 of file kateconfig.cpp. References QValueList< T >::begin(), QValueList< T >::end(), and writeEntry(). |
|
||||||||||||
|
Definition at line 263 of file kateconfig.cpp. References s, QString::setNum(), and writeEntry(). |
|
||||||||||||
|
Writes a (key, num) entry to the current group.
Definition at line 256 of file kateconfig.cpp. References s, QString::setNum(), and writeEntry(). |
|
||||||||||||
|
Writes a (key, value) entry to the current group.
Definition at line 178 of file kateconfig.cpp. References changed, QMap< Key, T >::end(), git, groups, oendl, owarn, and TRUE. |
|
||||||||||||
|
Writes a (key, value) entry to the current group.
Definition at line 168 of file kateconfig.cpp. Referenced by Highlight::setData(), Highlight::setItemDataList(), SyntaxDocument::setupModeList(), KateView::writeConfig(), KateDocument::writeConfig(), writeEntry(), and KateView::writeSessionConfig(). |
|
||||||||||||
|
Writes an encrypted (key, value) entry to the current group. Note that the degree of protection offered by the encryption is only sufficient to avoid the most casual observation of the configuration files.
Definition at line 238 of file kateconfig.cpp. References changed, encipher(), QMap< Key, T >::end(), git, groups, oendl, owarn, and TRUE. |
|
|
Definition at line 96 of file kateconfig.h. Referenced by clearGroup(), read(), removeEntry(), setGroup(), writeEntry(), writeEntryCrypt(), and ~KateConfig(). |
|
|
Definition at line 97 of file kateconfig.h. |
|
|
Definition at line 93 of file kateconfig.h. Referenced by operator!=(), operator==(), read(), and write(). |
|
|
Definition at line 92 of file kateconfig.h. Referenced by clearGroup(), hasKey(), isValid(), KateConfig(), parse(), read(), readEntryDirect(), removeEntry(), setGroup(), write(), writeEntry(), and writeEntryCrypt(). |
|
|
Definition at line 95 of file kateconfig.h. Referenced by KateConfig(), readEntry(), and readEntryCrypt(). |
|
|
Definition at line 91 of file kateconfig.h. Referenced by clearGroup(), groupList(), hasGroup(), hasKey(), isValid(), KateConfig(), parse(), read(), readEntryDirect(), removeEntry(), setGroup(), write(), writeEntry(), and writeEntryCrypt(). |
|
|
Definition at line 94 of file kateconfig.h. Referenced by KateConfig(), readEntry(), and readEntryCrypt(). |
1.4.2