29 : mSettingsEntriesMap()
30 , mSettingsRegistryChildList()
42 QgsDebugMsg( QStringLiteral(
"Trying to register a nullptr settings entry." ) );
58 for (
const auto *setting : settingsGroup->
settings() )
62 mSettingsEntriesGroupMap.insert( setting, settingsGroup );
69 return mSettingsEntriesMap.values();
75 const QMap<QString, const QgsSettingsEntryBase *> settingsEntriesMap = mSettingsEntriesMap;
83 if ( searchChildRegistries )
85 for (
const QgsSettingsRegistry *settingsRegistry : std::as_const( mSettingsRegistryChildList ) )
98 if ( !settingsRegistry )
100 QgsDebugMsg( QStringLiteral(
"Trying to register a nullptr child settings registry." ) );
104 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
106 QgsDebugMsg( QStringLiteral(
"Child register is already registered." ) );
110 mSettingsRegistryChildList.append( settingsRegistry );
115 if ( !settingsRegistry )
117 QgsDebugMsg( QStringLiteral(
"Trying to unregister a nullptr child settings registry." ) );
121 if ( mSettingsRegistryChildList.contains( settingsRegistry ) )
123 QgsDebugMsg( QStringLiteral(
"Child register is not registered." ) );
127 mSettingsRegistryChildList.removeAll( settingsRegistry );
132 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.
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 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.