KDECore
kconfiggroup.cpp
Go to the documentation of this file.
59 KConfigGroupPrivate(KConfigGroup* parent, bool isImmutable, bool isConst, const QByteArray& name)
113 data = new KConfigGroupPrivate(dynamic_cast<KConfigGroup*>(master), isImmutable, isConst, name);
195 static QString errString( const char * pKey, const QByteArray & value, const QVariant & aDefault ) {
203 return QString::fromLatin1(" (wrong format: expected %1 items, got %2)").arg( expected ).arg( got );
206 QVariant KConfigGroup::convertToQVariant(const char *pKey, const QByteArray& value, const QVariant& aDefault)
468 : d(KConfigGroupPrivate::create(master, _group.toUtf8(), master->isGroupImmutable(_group), false))
478 : d(KConfigGroupPrivate::create(const_cast<KConfigBase*>(master), _group.toUtf8(), master->isGroupImmutable(_group), true))
483 : d(KConfigGroupPrivate::create(const_cast<KConfigBase*>(master), _group, master->isGroupImmutable(_group), true))
516 Q_ASSERT_X(!aGroup.isEmpty(), "KConfigGroup::groupImpl", "can not have an unnamed child group");
528 Q_ASSERT_X(!aGroup.isEmpty(), "KConfigGroup::groupImpl", "can not have an unnamed child group");
532 newGroup.d = new KConfigGroupPrivate(const_cast<KConfigGroup*>(this), isGroupImmutableImpl(aGroup),
646 QString result = config()->d_func()->lookupData(d->fullName(), key, KEntryMap::SearchFlags(), 0);
705 const QByteArray data = config()->d_func()->lookupData(d->fullName(), key, KEntryMap::SearchLocalized);
741 QStringList KConfigGroup::readXdgListEntry(const QString& key, const QStringList& aDefault) const
823 void KConfigGroup::writeEntry( const QString& key, const QString& value, WriteConfigFlags flags )
869 void KConfigGroup::writeEntry(const QString& key, const QStringList &list, WriteConfigFlags flags)
874 void KConfigGroup::writeEntry( const char* key, const QVariantList& list, WriteConfigFlags flags )
1031 kWarning() << "KConfigGroup::writeEntry - unhandled type" << value.typeName() << "in group" << name();
1037 void KConfigGroup::writeEntry( const QString& key, const QVariant& value, WriteConfigFlags flags )
1042 void KConfigGroup::writeEntry(const QString& key, const QVariantList &list, WriteConfigFlags flags)
1047 void KConfigGroup::writeXdgListEntry(const QString& key, const QStringList &value, WriteConfigFlags pFlags)
1052 void KConfigGroup::writeXdgListEntry(const char *key, const QStringList &list, WriteConfigFlags flags)
1066 val.replace(QLatin1Char('\\'), QLatin1String("\\\\")).replace(QLatin1Char(';'), QLatin1String("\\;"));
1074 void KConfigGroup::writePathEntry(const QString& pKey, const QString & path, WriteConfigFlags pFlags)
1079 void KConfigGroup::writePathEntry(const char *pKey, const QString & path, WriteConfigFlags pFlags)
1087 void KConfigGroup::writePathEntry(const QString& pKey, const QStringList &value, WriteConfigFlags pFlags)
1092 void KConfigGroup::writePathEntry(const char *pKey, const QStringList &value, WriteConfigFlags pFlags)
1101 config()->d_func()->putData(d->fullName(), pKey, KConfigGroupPrivate::serializeList(list), pFlags, true);
bool canConvert(Type t) const
QUrl toUrl() const
QString readPathEntry(const QString &pKey, const QString &aDefault) const
Reads a path.
Definition: kconfiggroup.cpp:780
QByteArray toByteArray() const
int minute() const
int width() const
QPointF toPointF() const
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
Writes a file path to the configuration.
Definition: kconfiggroup.cpp:1074
static QString errString(const char *pKey, const QByteArray &value, const QVariant &aDefault)
Definition: kconfiggroup.cpp:195
int toInt(bool *ok, int base) const
QByteArray toLower() const
double toDouble(bool *ok) const
void reserve(int size)
Definition: kmacroexpander_unix.cpp:34
Definition: kuitsemantics.cpp:94
bool hasDefault(const QString &key) const
Whether a default is specified for an entry in either the system wide configuration file or the globa...
Definition: kconfiggroup.cpp:1139
QList< QVariant > toList() const
QDateTime toDateTime() const
QString & prepend(QChar ch)
KConfigGroup & operator=(const KConfigGroup &)
Definition: kconfiggroup.cpp:497
bool isEntryImmutable(const QString &key) const
Checks if it is possible to change the given entry.
Definition: kconfiggroup.cpp:632
QString convertSeparators(const QString &pathName)
const T & at(int i) const
bool isNull() const
int size() const
void reparent(KConfigBase *parent, WriteConfigFlags pFlags=Normal)
Changes the configuration object that this group belongs to.
Definition: kconfiggroup.cpp:1235
bool isEmpty() const
static QString expandString(const QString &value)
Definition: kconfig.cpp:155
static bool cleanHomeDirPath(QString &path, const QString &homeDir)
Definition: kconfiggroup.cpp:379
void deleteGroup(const QByteArray &group, WriteConfigFlags flags=Normal)
Delete aGroup.
Definition: kconfigbase.cpp:74
KConfigGroup parent() const
Returns the group that this group belongs to.
Definition: kconfiggroup.cpp:538
bool hasGroup(const QString &group) const
Returns true if the specified group is known about.
Definition: kconfigbase.cpp:29
KConfigGroup group(const QByteArray &group)
Returns an object for the named subgroup.
Definition: kconfigbase.cpp:44
QTime time() const
qreal top() const
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition: kconfiggroup.cpp:1037
int height() const
void changeGroup(const QString &group)
Changes the group of the object.
Definition: kconfiggroup.cpp:564
QString & remove(int position, int n)
int month() const
void deleteGroup(WriteConfigFlags pFlags=Normal)
Delete all entries in the entire group.
Definition: kconfiggroup.cpp:555
QString homePath()
qreal left() const
int second() const
int x() const
int y() const
bool isNull() const
void clear()
QMap< QString, QString > entryMap(const QString &aGroup=QString()) const
Returns a map (tree) of entries in a particular group.
Definition: kconfig.cpp:356
void deleteEntry(const QString &pKey, WriteConfigFlags pFlags=Normal)
Deletes the entry specified by pKey in the current group.
Definition: kconfiggroup.cpp:1112
Definition: kconfiggroup_p.h:29
int count(const T &value) const
qreal x() const
qreal y() const
void append(const T &value)
QString fromUtf8(const char *str, int size)
QString readEntryUntranslated(const QString &pKey, const QString &aDefault=QString()) const
Reads an untranslated string entry.
Definition: kconfiggroup.cpp:637
int top() const
bool exists() const
Check whether the containing KConfig object acutally contains a group with this name.
Definition: kconfiggroup.cpp:588
int left() const
bool isEmpty() const
bool isGroupImmutableImpl(const QByteArray &aGroup) const
Definition: kconfiggroup.cpp:1210
bool isEmpty() const
int day() const
const char * constData() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QByteArray & replace(int pos, int len, const char *after)
void writeXdgListEntry(const QString &pKey, const QStringList &value, WriteConfigFlags pFlags=Normal)
Writes a list of strings to the config object, following XDG desktop entry spec separator semantics...
Definition: kconfiggroup.cpp:1047
QSizeF toSizeF() const
QStringList readXdgListEntry(const QString &pKey, const QStringList &aDefault=QStringList()) const
Reads a list of strings from the config object, following XDG desktop entry spec separator semantics...
Definition: kconfiggroup.cpp:741
int year() const
void copyTo(KConfigBase *other, WriteConfigFlags pFlags=Normal) const
Copies the entries in this group to another configuration object.
Definition: kconfiggroup.cpp:1220
Definition: kconfigbase.h:38
QStringList keyList() const
Returns a list of keys this group contains.
Definition: kconfiggroup.cpp:1174
QSize toSize() const
int hour() const
bool hasKey(const QString &key) const
Checks whether the key has an entry in this group.
Definition: kconfiggroup.cpp:1155
const char * typeToName(Type typ)
QDate toDate() const
QString & replace(int position, int n, QChar after)
static bool writeEntryGui(KConfigGroup *cg, const char *key, const QVariant &input, KConfigGroup::WriteConfigFlags flags)
Definition: kconfiggroup.cpp:459
KConfig * config()
Return the config object that this group belongs to.
Definition: kconfiggroup.cpp:610
int width() const
qreal width() const
QString mid(int position, int n) const
QDate date() const
void output(QList< Action > actions, QHash< QString, QString > domain)
Definition: fake/kauth-policy-gen-polkit.cpp:41
bool hasGroupImpl(const QByteArray &group) const
Definition: kconfiggroup.cpp:1195
static QList< qreal > asRealList(const QByteArray &string)
Definition: kconfiggroup.cpp:187
KConfigGroupGui _kde_internal_KConfigGroupGui
Definition: kconfiggroup.cpp:450
const char * typeName() const
typedef ConstIterator
int height() const
QList< T > mid(int pos, int length) const
int length() const
void reserve(int size)
Definition: kuitsemantics.cpp:84
bool isGroupImmutable(const QByteArray &aGroup) const
Can changes be made to the entries in aGroup?
Definition: kconfigbase.cpp:89
QString fromLatin1(const char *str, int size)
static bool readEntryGui(const QByteArray &data, const char *key, const QVariant &input, QVariant &output)
Definition: kconfiggroup.cpp:451
QPoint toPoint() const
qreal height() const
QString canonicalPath() const
Definition: kconfigdata.h:157
QRect toRect() const
const_iterator constEnd() const
const_iterator constBegin() const
Type type() const
qreal height() const
QRectF toRectF() const
bool convert(Type t)
void deleteGroupImpl(const QByteArray &group, WriteConfigFlags flags)
Definition: kconfiggroup.cpp:1202
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
T readEntry(const QString &key, const T &aDefault) const
Reads the value of an entry specified by pKey in the current group.
Definition: kconfiggroup.h:248
void revertToDefault(const QString &key)
Reverts an entry to the default settings.
Definition: kconfiggroup.cpp:1125
void squeeze()
Definition: kconfigdata.h:156
qreal width() const
QMap< QString, QString > entryMap() const
Returns a map (tree) of entries for all entries in this group.
Definition: kconfiggroup.cpp:603
QString decodeName(const QByteArray &localFileName)
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.