|
QGIS API Documentation 3.99.0-Master (e9821da5c6b)
|
Manages storage of a set of selective masking source sets. More...
#include <qgsselectivemaskingsourcesetmanager.h>

Signals | |
| void | changed () |
| Emitted whenever sets stored within the manager are changed. | |
| void | setAboutToBeAdded (const QString &name) |
| Emitted when a set is about to be added to the manager. | |
| void | setAboutToBeRemoved (const QString &name) |
| Emitted when a set is about to be removed from the manager. | |
| void | setAdded (const QString &name) |
| Emitted when a set has been added to the manager. | |
| void | setRemoved (const QString &name) |
| Emitted when a set was removed from the manager. | |
| void | setRenamed (const QString &oldName, const QString &newName) |
| Emitted when a set is renamed. | |
| Signals inherited from QgsProjectStoredObjectManagerBase | |
| void | objectAboutToBeAdded (const QString &name) |
| Emitted when an object is about to be added to the manager. | |
| void | objectAboutToBeRemoved (const QString &name) |
| Emitted when an object is about to be removed from the manager. | |
| void | objectAdded (const QString &name) |
| Emitted when an object has been added to the manager. | |
| void | objectRemoved (const QString &name) |
| Emitted when an object was removed from the manager. | |
Public Member Functions | |
| QgsSelectiveMaskingSourceSetManager (QgsProject *project=nullptr) | |
| Constructor for QgsSelectiveMaskingSourceSetManager. | |
| ~QgsSelectiveMaskingSourceSetManager () override | |
| bool | addSet (const QgsSelectiveMaskingSourceSet &set) |
| Adds a set to the manager. | |
| void | clear () |
| Removes and deletes all sets from the manager. | |
| QString | generateUniqueTitle () const |
| Generates a unique title for a new set, which does not clash with any already contained by the manager. | |
| bool | readXml (const QDomElement &element, const QDomDocument &doc, const QgsReadWriteContext &context) |
| Reads the manager's state from a DOM element, restoring all sets present in the XML document. | |
| bool | removeSet (const QString &name) |
| Removes the set with matching name from the manager. | |
| bool | renameSet (const QString &oldName, const QString &newName) |
| Renames a set in the manager from oldName to newName. | |
| QgsSelectiveMaskingSourceSet | setById (const QString &id) const |
| Returns the set with a matching id, or an invalid set if no matching sets were found. | |
| QgsSelectiveMaskingSourceSet | setByName (const QString &name) const |
| Returns the set with a matching name, or an invalid set if no matching sets were found. | |
| QVector< QgsSelectiveMaskingSourceSet > | sets () const |
| Returns a list of all sets contained in the manager. | |
| bool | updateSet (const QgsSelectiveMaskingSourceSet &set) |
| Updates the definition of a set already in the manager. | |
| QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
| Returns a DOM element representing the state of the manager. | |
| Public Member Functions inherited from QgsAbstractProjectStoredObjectManager< QgsSelectiveMaskingSourceSet > | |
| QgsAbstractProjectStoredObjectManager (QgsProject *project=nullptr) | |
| Constructor for QgsAbstractProjectStoredObjectManager, for objects attached to the specified project. | |
| ~QgsAbstractProjectStoredObjectManager () override | |
| QgsSelectiveMaskingSourceSet * | objectByName (const QString &name) const |
Returns the object with a matching name, or nullptr if no matching objects were found. | |
| QList< QgsSelectiveMaskingSourceSet * > | objects () const |
| Returns the list of objects contained within the manager. | |
| Public Member Functions inherited from QgsProjectStoredObjectManagerBase | |
| QgsProjectStoredObjectManagerBase (QgsProject *project=nullptr) | |
| Constructor for QgsProjectStoredObjectManagerBase, for objects attached to the specified project. | |
Additional Inherited Members | |
| Protected Member Functions inherited from QgsAbstractProjectStoredObjectManager< QgsSelectiveMaskingSourceSet > | |
| bool | addObject (QgsSelectiveMaskingSourceSet *object) |
| Adds an object to the manager. | |
| void | clearObjects () |
| Removes and deletes all objects from the manager. | |
| bool | removeObject (QgsSelectiveMaskingSourceSet *object) |
| Removes an object from the manager. | |
| virtual void | setupObjectConnections (QgsSelectiveMaskingSourceSet *object) |
| Sets up additional connections to an object, called when the object is first added to the manager. | |
| Protected Member Functions inherited from QgsProjectStoredObjectManagerBase | |
| void | markProjectDirty () |
| Marks the project as dirty. | |
| Protected Attributes inherited from QgsAbstractProjectStoredObjectManager< QgsSelectiveMaskingSourceSet > | |
| QList< QgsSelectiveMaskingSourceSet * > | mObjects |
| Attached objects, owned by the manager. | |
| Protected Attributes inherited from QgsProjectStoredObjectManagerBase | |
| QgsProject * | mProject = nullptr |
| Associated project. | |
Manages storage of a set of selective masking source sets.
QgsSelectiveMaskingSourceSetManager handles the storage, serializing and deserializing of selective masking source sets. Usually this class is not constructed directly, but rather accessed through a QgsProject via QgsProject::selectiveMaskingSourceSetManager().
QgsSelectiveMaskingSourceSetManager retains ownership of all the sets contained in the manager.
Definition at line 49 of file qgsselectivemaskingsourcesetmanager.h.
|
explicit |
Constructor for QgsSelectiveMaskingSourceSetManager.
The project will become the parent object for this manager.
Definition at line 28 of file qgsselectivemaskingsourcesetmanager.cpp.
|
override |
Definition at line 40 of file qgsselectivemaskingsourcesetmanager.cpp.
| bool QgsSelectiveMaskingSourceSetManager::addSet | ( | const QgsSelectiveMaskingSourceSet & | set | ) |
Adds a set to the manager.
Returns true if the addition was successful, or false if the set could not be added (eg as a result of a duplicate set name).
Definition at line 45 of file qgsselectivemaskingsourcesetmanager.cpp.
|
signal |
Emitted whenever sets stored within the manager are changed.
| void QgsSelectiveMaskingSourceSetManager::clear | ( | ) |
Removes and deletes all sets from the manager.
Definition at line 76 of file qgsselectivemaskingsourcesetmanager.cpp.
| QString QgsSelectiveMaskingSourceSetManager::generateUniqueTitle | ( | ) | const |
Generates a unique title for a new set, which does not clash with any already contained by the manager.
Definition at line 173 of file qgsselectivemaskingsourcesetmanager.cpp.
| bool QgsSelectiveMaskingSourceSetManager::readXml | ( | const QDomElement & | element, |
| const QDomDocument & | doc, | ||
| const QgsReadWriteContext & | context ) |
Reads the manager's state from a DOM element, restoring all sets present in the XML document.
Definition at line 125 of file qgsselectivemaskingsourcesetmanager.cpp.
| bool QgsSelectiveMaskingSourceSetManager::removeSet | ( | const QString & | name | ) |
Removes the set with matching name from the manager.
Returns true if the removal was successful, or false if the removal failed (eg as a result of removing a set which is not contained in the manager).
Definition at line 67 of file qgsselectivemaskingsourcesetmanager.cpp.
| bool QgsSelectiveMaskingSourceSetManager::renameSet | ( | const QString & | oldName, |
| const QString & | newName ) |
Renames a set in the manager from oldName to newName.
Returns true if the rename was successful, or false if it failed (eg no set existed with matching name, or a duplicate new name was used).
Definition at line 81 of file qgsselectivemaskingsourcesetmanager.cpp.
|
signal |
Emitted when a set is about to be added to the manager.
|
signal |
Emitted when a set is about to be removed from the manager.
|
signal |
Emitted when a set has been added to the manager.
| QgsSelectiveMaskingSourceSet QgsSelectiveMaskingSourceSetManager::setById | ( | const QString & | id | ) | const |
Returns the set with a matching id, or an invalid set if no matching sets were found.
Definition at line 106 of file qgsselectivemaskingsourcesetmanager.cpp.
| QgsSelectiveMaskingSourceSet QgsSelectiveMaskingSourceSetManager::setByName | ( | const QString & | name | ) | const |
Returns the set with a matching name, or an invalid set if no matching sets were found.
Definition at line 116 of file qgsselectivemaskingsourcesetmanager.cpp.
|
signal |
Emitted when a set was removed from the manager.
|
signal |
Emitted when a set is renamed.
| QVector< QgsSelectiveMaskingSourceSet > QgsSelectiveMaskingSourceSetManager::sets | ( | ) | const |
Returns a list of all sets contained in the manager.
Definition at line 95 of file qgsselectivemaskingsourcesetmanager.cpp.
| bool QgsSelectiveMaskingSourceSetManager::updateSet | ( | const QgsSelectiveMaskingSourceSet & | set | ) |
Updates the definition of a set already in the manager.
The definition of the existing set with matching ID will be replaced with the updated set.
Definition at line 50 of file qgsselectivemaskingsourcesetmanager.cpp.
| QDomElement QgsSelectiveMaskingSourceSetManager::writeXml | ( | QDomDocument & | doc, |
| const QgsReadWriteContext & | context ) const |
Returns a DOM element representing the state of the manager.
Definition at line 162 of file qgsselectivemaskingsourcesetmanager.cpp.