KDeclarative

configpropertymap.h
1 /*
2  SPDX-FileCopyrightText: 2013 Marco Martin <[email protected]>
3  SPDX-FileCopyrightText: 2020 David Edmundson <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef CONFIGPROPERTYMAP_H
9 #define CONFIGPROPERTYMAP_H
10 
11 #include <QQmlPropertyMap>
12 
14 
15 #include <kdeclarative/kdeclarative_export.h>
16 
17 namespace KDeclarative {
18 
19 class ConfigPropertyMapPrivate;
20 
27 class KDECLARATIVE_EXPORT ConfigPropertyMap : public QQmlPropertyMap
28 {
29  Q_OBJECT
30 
31 public:
32  ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr);
33  ~ConfigPropertyMap() override;
34 
41  bool isAutosave() const;
42 
49  void setAutosave(bool autosave);
50 
57  bool isNotify() const;
58 
65  void setNotify(bool notify);
66 
72  Q_INVOKABLE bool isImmutable(const QString &key) const;
73 
74 protected:
75  QVariant updateValue(const QString &key, const QVariant &input) override;
76 private:
77  ConfigPropertyMapPrivate *const d;
78 
79 };
80 
81 }
82 
83 #endif
An object that (optionally) automatically saves changes in a property map to a configuration object (...
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Jan 16 2021 22:40:31 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.