KDeclarative

configpropertymap.h
1 /*
2  * Copyright 2013 Marco Martin <[email protected]>
3  * Copyright 2020 David Edmundson <[email protected]>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU Library General Public License as
7  * published by the Free Software Foundation; either version 2, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details
14  *
15  * You should have received a copy of the GNU Library General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc.,
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef CONFIGPROPERTYMAP_H
22 #define CONFIGPROPERTYMAP_H
23 
24 #include <QQmlPropertyMap>
25 
27 
28 #include <kdeclarative/kdeclarative_export.h>
29 
30 namespace KDeclarative {
31 
32 class ConfigPropertyMapPrivate;
33 
40 class KDECLARATIVE_EXPORT ConfigPropertyMap : public QQmlPropertyMap
41 {
42  Q_OBJECT
43 
44 public:
45  ConfigPropertyMap(KCoreConfigSkeleton *config, QObject *parent = nullptr);
46  ~ConfigPropertyMap() override;
47 
54  bool isAutosave() const;
55 
62  void setAutosave(bool autosave);
63 
70  bool isNotify() const;
71 
78  void setNotify(bool notify);
79 
85  Q_INVOKABLE bool isImmutable(const QString &key) const;
86 
87 protected:
88  QVariant updateValue(const QString &key, const QVariant &input) override;
89 private:
90  ConfigPropertyMapPrivate *const d;
91 
92 };
93 
94 }
95 
96 #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-2020 The KDE developers.
Generated on Tue Jul 14 2020 22:38:48 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.