KCModuleData Class

A base class that offers information about a KCModule state. More...

Header: #include <KCModuleData>
CMake: find_package(KF6 REQUIRED COMPONENTS KCMUtils)
target_link_libraries(mytarget PRIVATE KCMUtilsCore)
Since: 5.74
Inherits: QObject

Public Functions

KCModuleData(QObject *parent = nullptr)
virtual bool isDefaults() const
virtual bool matchesQuery(const QString &query) const
virtual void revertToDefaults()

Signals

void loaded()

Protected Slots

void autoRegisterSkeletons()
void registerSkeleton(KCoreConfigSkeleton *skeleton)

Detailed Description

Member Function Documentation

[explicit] KCModuleData::KCModuleData(QObject *parent = nullptr)

[protected slot] void KCModuleData::autoRegisterSkeletons()

Automatically register child skeletons.

Call it in your subclass constructor after skeleton creation

[virtual] bool KCModuleData::isDefaults() const

Checks if the configuration is identical to the default one.

Returns true if the module configuration is in the default state, false otherwise.

[signal] void KCModuleData::loaded()

Emitted when KCModuleData is loaded.

[virtual] bool KCModuleData::matchesQuery(const QString &query) const

Returns whether this module matches a given query.

The query is not expected to be a regex pattern but a full text search.

[protected slot] void KCModuleData::registerSkeleton(KCoreConfigSkeleton *skeleton)

Allow to manually register a skeleton class.

Used by a derived class when automatic discovery is not possible.

[virtual] void KCModuleData::revertToDefaults()

Reverts the module to default values and saves them.