QGIS API Documentation 3.29.0-Master (53715c36dc)
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
34class 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 bool addSettingsEntry( const QgsSettingsEntryBase *settingsEntry );
81
86 void addSettingsEntryGroup( const QgsSettingsEntryGroup *settingsGroup );
87
88 private:
89
90 QMap<QString, const QgsSettingsEntryBase *> mSettingsEntriesMap;
91
92 QMap<const QgsSettingsEntryBase *, const QgsSettingsEntryGroup *> mSettingsEntriesGroupMap;
93
94 QList<const QgsSettingsRegistry *> mSettingsRegistryChildList;
95
96};
97
98#endif // QGSSETTINGSREGISTRY_H
Represent settings entry and provides methods for reading and writing settings values.
Creates a group of setting which have a common definition of base key.
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...