QGIS API Documentation  3.22.4-Białowieża (ce8e65e95e)
qgssettingsregistry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssettingsregistry.h
3  --------------------------------------
4  Date : February 2021
5  Copyright : (C) 2021 by Damiano Lombardi
6  Email : damiano at opengis dot ch
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 
17 #ifndef QGSSETTINGSREGISTRY_H
18 #define QGSSETTINGSREGISTRY_H
19 
20 #include "qgis_core.h"
21 #include "qgis_sip.h"
22 #include "qgssettingsentry.h"
23 
24 #include <QMap>
25 
34 class CORE_EXPORT QgsSettingsRegistry
35 {
36  public:
37 
42 
46  virtual ~QgsSettingsRegistry();
47 
51  QList<const QgsSettingsEntryBase *> settingEntries() const;
52 
58  const QgsSettingsEntryBase *settingsEntry( const QString &key, bool searchChildRegistries = true ) const;
59 
63  void addSubRegistry( const QgsSettingsRegistry *settingsRegistry );
64 
68  void removeSubRegistry( const QgsSettingsRegistry *settingsRegistry );
69 
73  QList<const QgsSettingsRegistry *> subRegistries() const;
74 
75  protected:
76 
80  void addSettingsEntry( const QgsSettingsEntryBase *settingsEntry );
81 
82  private:
83 
84  QMap<QString, const QgsSettingsEntryBase *> mSettingsEntriesMap;
85 
86  QList<const QgsSettingsRegistry *> mSettingsRegistryChildList;
87 
88 };
89 
90 #endif // QGSSETTINGSREGISTRY_H
Represent settings entry and provides methods for reading and writing settings values.
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...