29 : mSettingsEntriesMap()
30 , mSettingsRegistryChildList()
42 QgsDebugMsg( QStringLiteral(
"Trying to register a nullptr settings entry." ) );
57 return mSettingsEntriesMap.values();
63 const QMap<QString, const QgsSettingsEntryBase *> settingsEntriesMap = mSettingsEntriesMap;
71 if ( searchChildRegistries )
73 for (
const QgsSettingsRegistry *settingsRegistry : std::as_const( mSettingsRegistryChildList ) )
86 if ( !settingsRegistry )
88 QgsDebugMsg( QStringLiteral(
"Trying to register a nullptr child settings registry." ) );
92 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
94 QgsDebugMsg( QStringLiteral(
"Child register is already registered." ) );
98 mSettingsRegistryChildList.append( settingsRegistry );
103 if ( !settingsRegistry )
105 QgsDebugMsg( QStringLiteral(
"Trying to unregister a nullptr child settings registry." ) );
109 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
111 QgsDebugMsg( QStringLiteral(
"Child register is not registered." ) );
115 mSettingsRegistryChildList.removeAll( settingsRegistry );
120 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.
QgsSettingsRegistry is used for settings introspection and collects a list of child QgsSettingsRegist...
QgsSettingsRegistry()
Constructor for QgsSettingsRegistry.
QList< const QgsSettingsRegistry * > subRegistries() const
Returns the list of registered child QgsSettingsRegistry.
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.
void addSettingsEntry(const QgsSettingsEntryBase *settingsEntry)
Add settingsEntry to the register.