KConfigPropertyMap Class

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

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

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

Whether the value at the given key is immutable

Returns true if the value is immutable, false if it isn't or it doesn't exist

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

bool KConfigPropertyMap::isNotify() const

Whether notifications on config changes are enabled. Disabled by default.

Returns true if writes send (dbus) notifications

See also KConfigBase::Notify.

void KConfigPropertyMap::setNotify(bool notify)

Enable or disable notifications on config changes.

notify whether to send notifications

See also isNotify() and KConfigBase::Notify.

[invokable] void KConfigPropertyMap::writeConfig()

Saves the state of the property map on disk.

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