Changeset View
Changeset View
Standalone View
Standalone View
src/kdeclarative/configpropertymap.h
Show All 38 Lines | |||||
39 | { | 39 | { | ||
40 | Q_OBJECT | 40 | Q_OBJECT | ||
41 | 41 | | |||
42 | public: | 42 | public: | ||
43 | ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr); | 43 | ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr); | ||
44 | ~ConfigPropertyMap() override; | 44 | ~ConfigPropertyMap() override; | ||
45 | 45 | | |||
46 | /** | 46 | /** | ||
47 | * Indicates if the map calls save() on the config object on each write or not | ||||
48 | * | ||||
49 | * @return true if the map automatically saves (the default), false otherwise | ||||
50 | * @since 5.65 | ||||
51 | */ | ||||
52 | bool isAutosave() const; | ||||
53 | | ||||
54 | /** | ||||
55 | * Allows to set the map into autosave mode or not | ||||
56 | * | ||||
57 | * @param autosave the new value for autosaving | ||||
58 | * @since 5.65 | ||||
59 | */ | ||||
60 | void setAutosave(bool autosave); | ||||
61 | | ||||
62 | /** | ||||
47 | * @brief Whether the value at the given key is immutable | 63 | * @brief Whether the value at the given key is immutable | ||
48 | * | 64 | * | ||
49 | * @return true if the value is immutable, false if it isn't or it doesn't exist | 65 | * @return true if the value is immutable, false if it isn't or it doesn't exist | ||
50 | */ | 66 | */ | ||
51 | Q_INVOKABLE bool isImmutable(const QString &key) const; | 67 | Q_INVOKABLE bool isImmutable(const QString &key) const; | ||
52 | 68 | | |||
53 | protected: | 69 | protected: | ||
54 | QVariant updateValue(const QString &key, const QVariant &input) override; | 70 | QVariant updateValue(const QString &key, const QVariant &input) override; | ||
55 | private: | 71 | private: | ||
56 | ConfigPropertyMapPrivate *const d; | 72 | ConfigPropertyMapPrivate *const d; | ||
57 | 73 | | |||
58 | }; | 74 | }; | ||
59 | 75 | | |||
60 | } | 76 | } | ||
61 | 77 | | |||
62 | #endif | 78 | #endif |