22 : mSettingsEntriesMap()
23 , mSettingsRegistryChildList()
35 QgsDebugError( QStringLiteral(
"Trying to register a nullptr settings entry." ) );
51 for (
const auto *setting : settingsGroup->
settings() )
55 mSettingsEntriesGroupMap.insert( setting, settingsGroup );
62 return mSettingsEntriesMap.values();
68 const QMap<QString, const QgsSettingsEntryBase *> settingsEntriesMap = mSettingsEntriesMap;
76 if ( searchChildRegistries )
78 for (
const QgsSettingsRegistry *settingsRegistry : std::as_const( mSettingsRegistryChildList ) )
91 if ( !settingsRegistry )
93 QgsDebugError( QStringLiteral(
"Trying to register a nullptr child settings registry." ) );
97 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
99 QgsDebugError( QStringLiteral(
"Child register is already registered." ) );
103 mSettingsRegistryChildList.append( settingsRegistry );
108 if ( !settingsRegistry )
110 QgsDebugError( QStringLiteral(
"Trying to unregister a nullptr child settings registry." ) );
114 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
116 QgsDebugError( QStringLiteral(
"Child register is not registered." ) );
120 mSettingsRegistryChildList.removeAll( settingsRegistry );
126 return mSettingsRegistryChildList;
Represent settings entry and provides methods for reading and writing settings values.
bool keyIsValid(const QString &key) const
Returns true if the provided key match the settings entry.
QString definitionKey() const
Returns settings entry defining key.
Creates a group of setting which have a common definition of base key.
const QList< const QgsSettingsEntryBase * > settings() const
Returns all the settings.
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...
QgsSettingsRegistry()
Constructor for QgsSettingsRegistry.
Q_DECL_DEPRECATED void addSettingsEntryGroup(const QgsSettingsEntryGroup *settingsGroup)
Adds a group of setting to the registry.
bool addSettingsEntry(const QgsSettingsEntryBase *settingsEntry)
Adds settingsEntry to the registry.
QList< const QgsSettingsEntryBase * > settingEntries() const
Returns the list of registered QgsSettingsEntryBase.
virtual ~QgsSettingsRegistry()
Destructor for QgsSettingsRegistry.
void removeSubRegistry(const QgsSettingsRegistry *settingsRegistry)
Remove a child settingsRegistry from the register.
const QgsSettingsEntryBase * settingsEntry(const QString &key, bool searchChildRegistries=true) const
Returns the QgsSettingsEntry with the given key or nullptr if not found.
void addSubRegistry(const QgsSettingsRegistry *settingsRegistry)
Append a child settingsRegistry to the register.
QList< const QgsSettingsRegistry * > subRegistries() const
Returns the list of registered child QgsSettingsRegistry.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH
#define QgsDebugError(str)