#include </home/clem/local/src/opie/library/config.h>
Inheritance diagram for Config:


Public Types | |
| enum | Domain { File, User } |
Public Member Functions | |
| Config (const QString &name, Domain domain=User) | |
| ~Config () | |
| QTOPIA_MERGED_METHOD (static long timeStamp(const QString &name, Domain domain=User),"2.1") | |
| bool | operator== (const Config &other) const |
| bool | operator!= (const Config &other) const |
| bool | isValid () const |
| bool | hasKey (const QString &key) const |
| NOT_IN_QPE (bool hasGroup(const QString &gname) const) | |
| NOT_IN_QPE (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, const QStringList &lst, const QChar &sep) |
| QTOPIA_MERGED_METHOD (void writeEntry(const QString &key, const QStringList &lst),"2.1.0") | |
| 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 |
| QTOPIA_MERGED_METHOD (QStringList readListEntry(const QString &key) const,"2.1.0") | |
| 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 () |
| QTOPIA_MERGED_METHOD (void removeGroup(),"2.1.0") | |
| QTOPIA_MERGED_METHOD (void removeGroup(const QString &),"2.1.0") | |
| QTOPIA_MERGED_METHOD (QStringList allGroups() const,"2.1.0") | |
| void | write (const QString &fn=QString::null) |
| Config (const QString &fname) | |
| ~Config () | |
| void | setGroup (const QString &s) |
| QString | readEntry (const QString &, const QString &) |
| bool | readBoolEntry (const QString &, const bool) |
| int | readNumEntry (const QString &, const int) |
| void | writeEntry (const QString &, const QString &) |
| void | writeEntry (const QString &, const bool) |
| void | writeEntry (const QString &, const int) |
Protected Member Functions | |
| void | read () |
| bool | parse (const QString &line) |
Static Protected Member Functions | |
| static QString | configFilename (const QString &name, Domain) |
Protected Attributes | |
| ConfigGroupMap | groups |
| ConfigGroupMap::Iterator | git |
| QString | filename |
| QString | lang |
| QString | glang |
| bool | changed |
| ConfigPrivate * | d |
Private Member Functions | |
| Config (const QString &name, bool what) | |
| void | read (QTextStream &s) |
Private Attributes | |
| QMap< QString, QString > | values |
| QString | fname |
You should keep a Config 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 36 of file config.h.
|
|
File User See Config for details. |
|
||||||||||||
|
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 Config. 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 293 of file config.cpp. References d, QMap< Key, T >::end(), git, groups, and read(). |
|
|
Writes any changes to disk and destroys the in-memory object. Definition at line 314 of file config.cpp. |
|
||||||||||||
|
Definition at line 303 of file config.cpp. References d, QMap< Key, T >::end(), git, groups, and read(). |
|
|
Definition at line 32 of file osqlbackendmanager.cpp. |
|
|
|
|
|
Removes all entries from the current group. Definition at line 660 of file config.cpp. References changed, QMap< Key, T >::end(), git, groups, qWarning(), and TRUE. Referenced by CommandEditDialog::accept(), ProfileConfig::clearAll(), ProfileConfig::clearGroup(), PPPData::deleteAccount(), PPPData::deleteDevice(), EmailClient::deleteMail(), AbConfig::save(), ConfigDlg::slotDeleteMethod(), Composer::slotSendQueuedFinished(), WordGame::writeConfig(), MindBreakerBoard::writeConfig(), and BackupAndRestore::~BackupAndRestore(). |
|
||||||||||||
|
For internal use only.
Definition at line 222 of file config.cpp. References QDir::exists(), File, QDir::path(), and User. Referenced by ConfigEx::setConfig(). |
|
|
Returns whether the current group has an entry called key. Definition at line 325 of file config.cpp. References d, QMap< Key, T >::end(), FALSE, git, glang, groups, QString::isEmpty(), QCString::isNull(), lang, ConfigPrivate::multilang, and ConfigPrivate::trcontext. Referenced by OThemeBase::applyConfigFile(), OThemeBase::applyResourceGroup(), KeyAction::init(), Konsole::init(), Opie::Core::OGlobalSettings::initStatic(), QIMPenProfile::QIMPenProfile(), PatienceCardGame::readConfig(), RemoteTab::remoteSelected(), ConfigTab::remoteSelected(), ConfigTab::setConfig(), TaskSelector::show(), and MenuLauncher::show(). |
|
|
Returns whether the Config is in a valid state. Definition at line 732 of file config.cpp. References QMap< Key, T >::end(), git, and groups. Referenced by AppLnk::AppLnk(), BackGammon::BackGammon(), StartMenu::createDirEntry(), and initVObjectEncoding(). |
|
|
|
|
|
|
|
|
Tests for inequality with other. Config objects are equal if they refer to the same filename. Definition at line 47 of file config.h. References filename. |
|
|
Tests for equality with other. Config objects are equal if they refer to the same filename. Definition at line 46 of file config.h. References filename. |
|
|
For internal use only.
Definition at line 801 of file config.cpp. References d, QMap< Key, T >::end(), FALSE, QString::find(), git, glang, groups, QMap< Key, T >::insert(), QString::isEmpty(), lang, QString::latin1(), QString::left(), QString::length(), QString::mid(), ConfigPrivate::multilang, QString::remove(), QString::startsWith(), ConfigPrivate::trcontext, ConfigPrivate::trfile, and TRUE. Referenced by ConfigEx::read(), and read(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Definition at line 238 of file config.cpp. References QValueList< T >::begin(), QTextCodec::codecForMib(), QMap< Key, T >::end(), QValueList< T >::end(), git, groups, list, parse(), QTextStream::read(), QTextStream::setCodec(), QTextStream::setEncoding(), QStringList::split(), and QTextStream::UnicodeUTF8. |
|
|
For internal use only.
Reimplemented in ConfigEx. Definition at line 740 of file config.cpp. References QMap< Key, T >::begin(), changed, d, QFileInfo::dirPath(), QMap< Key, T >::end(), QFile::exists(), f, FALSE, QFileInfo::fileName(), filename, QFile::getch(), git, glang, groups, QDir::homeDirPath(), ConfigCache::instance(), IO_ReadOnly, l, lang, ConfigPrivate::multilang, QFile::open(), QPEApplication::qpeDir(), s, TRUE, and QFile::ungetch(). Referenced by Config(). |
|
||||||||||||
|
|
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 630 of file config.cpp. References QString::isEmpty(), readEntry(), and QString::toInt(). |
|
||||||||||||
|
||||||||||||
|
|
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 535 of file config.cpp. References d, glang, QString::isEmpty(), QString::isNull(), QCString::isNull(), lang, ConfigPrivate::multilang, qApp, readEntryDirect(), ConfigPrivate::trcontext, and ConfigPrivate::trfile. |
|
||||||||||||
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 573 of file config.cpp. References decipher(), QString::isNull(), and readEntry(). |
|
||||||||||||
|
Reads an encrypted string entry stored with key, defaulting to deflt if there is no entry. Definition at line 1004 of file config.cpp. Referenced by CBInfo::CBInfo(), ConfigFile::ConfigFile(), OpieFtp::deleteServer(), OpieFtp::fillCombos(), NNTPaccount::read(), SMTPaccount::read(), POP3account::read(), IMAPaccount::read(), OpieTooth::BlueBase::readConfig(), EmailClient::readSettings(), OpieFtp::serverComboSelected(), Composer::slotSendQueued(), and OpieTooth::PinDlg::test(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 590 of file config.cpp. References QMap< Key, T >::end(), git, and groups. |
|
||||||||||||
|
For internal use only.
Definition at line 1006 of file config.cpp. Referenced by LanguageSettings::LanguageSettings(), and readEntry(). |
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 648 of file config.cpp. References QString::isEmpty(), readEntry(), and QStringList::split(). |
|
||||||||||||
|
||||||||||||
|
|
|
||||||||||||
|
For internal use only. For compatibility, non-const version. Definition at line 612 of file config.cpp. References QString::isEmpty(), readEntry(), and QString::toInt(). |
|
||||||||||||
|
|
Removes the key entry from the current group. Does nothing if there is no such entry. Definition at line 497 of file config.cpp. References changed, QMap< Key, T >::end(), git, groups, qWarning(), and TRUE. Referenced by PinPlugin::clearPIN(), ZSafe::delCategory(), OpieFtp::deleteServer(), QtRec::deleteSound(), ZSafe::editCategory(), QtRec::okRename(), OpenEtext::remFile(), OpenEtext::removeSelection(), NotesControl::slotDeleteButton(), Composer::slotSendQueuedFinished(), AppLnk::storeLink(), MultiauthConfig::writeConfig(), and CityTime::~CityTime(). |
|
|
Definition at line 15 of file preferences.h. |
|
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 93 of file preferences.cpp. References values. |
|
||||||||||||
|
|
|
||||||||||||||||
|
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 483 of file config.cpp. References QValueList< T >::begin(), QValueList< T >::end(), and writeEntry(). |
|
||||||||||||
|
Writes a (key, num) entry to the current group.
Definition at line 455 of file config.cpp. References s, QString::setNum(), and writeEntry(). |
|
||||||||||||
|
Writes a (key, value) entry to the current group.
Definition at line 377 of file config.cpp. References changed, QMap< Key, T >::end(), git, groups, qWarning(), and TRUE. |
|
||||||||||||
|
||||||||||||
|
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 437 of file config.cpp. References changed, encipher(), QMap< Key, T >::end(), git, groups, qWarning(), and TRUE. Referenced by OpieTooth::PinDlg::accept(), OpieFtp::deleteServer(), NNTPaccount::save(), SMTPaccount::save(), POP3account::save(), IMAPaccount::save(), EmailClient::saveSettings(), Composer::slotQueueMail(), ConfigFile::updateAccount(), CBInfo::write(), OpieTooth::BlueBase::writeConfig(), and OpieFtp::writeConfig(). |
|
|
Definition at line 101 of file config.h. Referenced by clearGroup(), ConfigEx::read(), read(), removeEntry(), setGroup(), write(), writeEntry(), writeEntryCrypt(), ~Config(), and ConfigEx::~ConfigEx(). |
|
|
Reimplemented in Opie::Core::OConfig. Definition at line 102 of file config.h. Referenced by Config(), hasKey(), parse(), read(), readEntry(), write(), and ~Config(). |
|
|
Definition at line 98 of file config.h. Referenced by ConfigEx::lastModified(), operator!=(), operator==(), ConfigEx::read(), read(), ConfigEx::setConfig(), and write(). |
|
|
Definition at line 11 of file preferences.h. |
|
|
Definition at line 97 of file config.h. Referenced by ProfileConfig::clearGroup(), clearGroup(), Config(), ConfigEx::getGroup(), ConfigEx::getKeys(), Opie::Core::OConfig::group(), hasKey(), isValid(), parse(), ConfigEx::read(), read(), readEntryDirect(), removeEntry(), setGroup(), write(), writeEntry(), and writeEntryCrypt(). |
|
|
Definition at line 100 of file config.h. Referenced by hasKey(), parse(), read(), and readEntry(). |
|
|
Definition at line 96 of file config.h. Referenced by ProfileConfig::clearAll(), clearGroup(), Config(), ConfigEx::getKeys(), ProfileConfig::groups(), MyConfig::hasGroup(), hasKey(), isValid(), ProfileConfig::items(), parse(), ConfigEx::read(), read(), readEntryDirect(), removeEntry(), setGroup(), write(), writeEntry(), and writeEntryCrypt(). |
|
|
Definition at line 99 of file config.h. Referenced by hasKey(), parse(), read(), and readEntry(). |
|
|
Definition at line 10 of file preferences.h. Referenced by writeEntry(). |
1.4.2