KConfig
kconfigloader.cpp
79void ConfigLoaderHandler::startElement(const QStringView localName, const QXmlStreamAttributes &attrs)
180 item = m_config->addItemDateTime(m_name, *d->newDateTime(), QDateTime::fromString(m_default), m_key);
195 KConfigSkeleton::ItemEnum *enumItem = new KConfigSkeleton::ItemEnum(m_config->currentGroup(), m_key, *d->newInt(), m_enumChoices, defaultValue);
201 KConfigSkeleton::ItemInt *intItem = m_config->addItemInt(m_name, *d->newInt(), m_default.toInt(), m_key);
221 item = m_config->addItemStringList(m_name, *d->newStringList(), m_default.split(QLatin1Char(','), Qt::SkipEmptyParts), m_key);
223 KConfigSkeleton::ItemUInt *uintItem = m_config->addItemUInt(m_name, *d->newUint(), m_default.toUInt(), m_key);
233 KConfigSkeleton::ItemUrl *urlItem = new KConfigSkeleton::ItemUrl(m_config->currentGroup(), m_key, *d->newUrl(), QUrl::fromUserInput(m_default));
237 KConfigSkeleton::ItemDouble *doubleItem = m_config->addItemDouble(m_name, *d->newDouble(), m_default.toDouble(), m_key);
247 const QList<QStringView> tmpList = QStringView(m_default).split(QLatin1Char(','), Qt::SkipEmptyParts);
253 KConfigSkeleton::ItemLongLong *longlongItem = m_config->addItemLongLong(m_name, *d->newLongLong(), m_default.toLongLong(), m_key);
286 defaultRect.setCoords(tmpList[0].toInt(), tmpList[1].toInt(), tmpList[2].toInt(), tmpList[3].toInt());
293 defaultRectF.setCoords(tmpList[0].toDouble(), tmpList[1].toDouble(), tmpList[2].toDouble(), tmpList[3].toDouble());
313 KConfigSkeleton::ItemULongLong *ulonglongItem = m_config->addItemULongLong(m_name, *d->newULongLong(), m_default.toULongLong(), m_key);
373 : KConfigSkeleton(KSharedConfig::openConfig(config.config()->name(), config.config()->openFlags(), config.config()->locationType()), parent)
KConfigGroup group(const QString &group)
Returns an object for the named subgroup.
Definition kconfigbase.cpp:21
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition kconfiggroup.cpp:1014
KConfigGroup parent() const
Returns the group that this group belongs to.
Definition kconfiggroup.cpp:527
A KConfigSkeleton that populates itself based on KConfigXT XML.
Definition kconfigloader.h:92
KConfigSkeletonItem * findItemByName(const QString &name) const
Finds an item by its name.
Definition kconfigloader.cpp:395
KConfigSkeletonItem * findItem(const QString &group, const QString &key) const
Finds the item for the given group and key.
Definition kconfigloader.cpp:390
bool usrSave() override
Perform the actual writing of the configuration file.
Definition kconfigloader.cpp:421
bool hasGroup(const QString &group) const
Check to see if a group exists.
Definition kconfigloader.cpp:411
QVariant property(const QString &name) const
Returns the property (variantized value) of the named item.
Definition kconfigloader.cpp:400
KConfigLoader(const QString &configFile, QIODevice *xml, QObject *parent=nullptr)
Creates a KConfigSkeleton populated using the definition found in the XML data passed in.
Definition kconfigloader.cpp:355
void setLabel(const QString &l)
Set label providing a translated one-line description of the item.
Definition kcoreconfigskeleton.cpp:95
void setWhatsThis(const QString &w)
Set WhatsThis description of item.
Definition kcoreconfigskeleton.cpp:119
Class for handling preferences settings for an application.
Definition kconfigskeleton.h:28
Class for handling a floating point preference item.
Definition kcoreconfigskeleton.h:895
Class for handling a 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:687
Class for handling a 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:733
Class for handling an unsigned 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:815
Class for handling unsigned 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:855
Class for handling a url preferences item.
Definition kcoreconfigskeleton.h:621
KConfigSkeletonItem * findItem(const QString &name) const
Lookup item by name.
Definition kcoreconfigskeleton.cpp:1558
KConfig * config()
Return the KConfig object used for reading and writing the settings.
Definition kcoreconfigskeleton.cpp:1243
KConfigSkeletonItem::List items() const
Return list of items managed by this KCoreConfigSkeleton object.
Definition kcoreconfigskeleton.cpp:1263
KREPORT_EXPORT QPageSize::PageSizeId defaultSize()
KGuiItem ok()
QDateTime fromString(QStringView string, QStringView format, QCalendar cal)
virtual bool open(QIODeviceBase::OpenMode mode)
ReadOnly
void append(QList< T > &&value)
qsizetype size() const const
void setX(int x)
void setY(int y)
void setX(qreal x)
void setY(qreal y)
void setCoords(int x1, int y1, int x2, int y2)
void setCoords(qreal x1, qreal y1, qreal x2, qreal y2)
void setHeight(qreal height)
void setWidth(qreal width)
bool isEmpty() const const
int toInt(bool *ok, int base) const const
int compare(QChar ch) const const
QList< QStringView > split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
CaseInsensitive
SkipEmptyParts
QUrl fromUserInput(const QString &userInput, const QString &workingDirectory, UserInputResolutionOptions options)
StartElement
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.