Changeset View
Changeset View
Standalone View
Standalone View
src/quickaddons/managedconfigmodule.h
Show All 19 Lines | |||||
20 | 20 | | |||
21 | */ | 21 | */ | ||
22 | 22 | | |||
23 | #ifndef MANAGEDCONFIGMODULE_H | 23 | #ifndef MANAGEDCONFIGMODULE_H | ||
24 | #define MANAGEDCONFIGMODULE_H | 24 | #define MANAGEDCONFIGMODULE_H | ||
25 | 25 | | |||
26 | #include <KQuickAddons/ConfigModule> | 26 | #include <KQuickAddons/ConfigModule> | ||
27 | 27 | | |||
28 | class KCoreConfigSkeleton; | ||||
29 | | ||||
28 | namespace KQuickAddons { | 30 | namespace KQuickAddons { | ||
29 | 31 | | |||
30 | class ManagedConfigModulePrivate; | 32 | class ManagedConfigModulePrivate; | ||
31 | 33 | | |||
32 | /** | 34 | /** | ||
33 | * @class KQuickAddons::ManagedConfigModule managedconfigmodule.h KQuickAddons/ManagedConfigModule | 35 | * @class KQuickAddons::ManagedConfigModule managedconfigmodule.h KQuickAddons/ManagedConfigModule | ||
34 | * | 36 | * | ||
35 | * The base class for configuration modules using KConfigXT settings. | 37 | * The base class for configuration modules using KConfigXT settings. | ||
▲ Show 20 Lines • Show All 154 Lines • ▼ Show 20 Line(s) | 190 | protected Q_SLOTS: | |||
190 | * Forces the module to reevaluate the saveNeeded and | 192 | * Forces the module to reevaluate the saveNeeded and | ||
191 | * representsDefault state. | 193 | * representsDefault state. | ||
192 | * | 194 | * | ||
193 | * This is required for some modules which might have | 195 | * This is required for some modules which might have | ||
194 | * some settings managed outside of KConfigXT objects. | 196 | * some settings managed outside of KConfigXT objects. | ||
195 | */ | 197 | */ | ||
196 | void settingsChanged(); | 198 | void settingsChanged(); | ||
197 | 199 | | |||
200 | /** | ||||
201 | * Allow to register manually settings class generated from a kcfg file. | ||||
202 | * Used by derived class when automatic discovery is not possible. | ||||
203 | * After skeleton is registered it will automatically call settingsChanged(). | ||||
204 | * | ||||
205 | * @since 5.67 | ||||
meven: Mention importance of emitting configChanged signal to automatically call settingsChanged as… | |||||
It is not an alternative, configChanged is a KCoreConfigSkeleton's signal that will trigger a settingsChanged. crossi: It is not an alternative, configChanged is a KCoreConfigSkeleton's signal that will trigger a… | |||||
It may be needed? Or it is mandatory to call settingsChanged() for proper behavior? I'm wondering because I'm tempted to say this shall not be necessary and we should perhaps schedule a settingsChanged() call instead when we go back in the event loop? ervin: It may be needed? Or it is mandatory to call settingsChanged() for proper behavior?
I'm… | |||||
206 | */ | ||||
ervin: Now needs @since 5.67 | |||||
207 | void registerSettings(KCoreConfigSkeleton *skeleton); | ||||
ervin: Space before * not after | |||||
208 | | ||||
198 | private: | 209 | private: | ||
199 | /** | 210 | /** | ||
200 | * Allows to indicate if the module requires saving. | 211 | * Allows to indicate if the module requires saving. | ||
201 | * | 212 | * | ||
202 | * By default this returns false, it needs to be overridden only | 213 | * By default this returns false, it needs to be overridden only | ||
203 | * if the module has state outside of the settings declared in | 214 | * if the module has state outside of the settings declared in | ||
204 | * the KConfigXT classes it uses. | 215 | * the KConfigXT classes it uses. | ||
205 | */ | 216 | */ | ||
Show All 20 Lines |
Mention importance of emitting configChanged signal to automatically call settingsChanged as alternative to calling settingsChanged.