KConfigPropertyMap Class

An object that (optionally) automatically saves changes in a property map to a configuration object (such as a KConfig file). More...

Header: #include <KConfigPropertyMap>
CMake: find_package(KF6 REQUIRED COMPONENTS Config)
target_link_libraries(mytarget PRIVATE KF6::ConfigQml)

Public Functions

KConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr)
bool isImmutable(const QString &key) const
bool isNotify() const
void setNotify(bool notify)
void writeConfig()

Detailed Description

Member Function Documentation

KConfigPropertyMap::KConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr)

[invokable] bool KConfigPropertyMap::isImmutable(const QString &key) const

Returns whether the value at the given key is immutable.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

bool KConfigPropertyMap::isNotify() const

Returns whether notifications on config changes are enabled.

Disabled by default.

See also KConfigBase::Notify.

void KConfigPropertyMap::setNotify(bool notify)

Enables or disables notifications upon config changes.

See also isNotify() and KConfigBase::Notify.

[invokable] void KConfigPropertyMap::writeConfig()

Saves the state of the property map to disk.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.