|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
Manages storage of a set of elevation profiles. More...
#include <qgselevationprofilemanager.h>

Signals | |
| void | profileAboutToBeAdded (const QString &name) |
| Emitted when a profile is about to be added to the manager. | |
| void | profileAboutToBeRemoved (const QString &name) |
| Emitted when a profile is about to be removed from the manager. | |
| void | profileAdded (const QString &name) |
| Emitted when a profile has been added to the manager. | |
| void | profileRemoved (const QString &name) |
| Emitted when a profile was removed from the manager. | |
| void | profileRenamed (QgsElevationProfile *profile, const QString &newName) |
| Emitted when a profile 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 | |
| QgsElevationProfileManager (QgsProject *project=nullptr) | |
| Constructor for QgsElevationProfileManager. | |
| ~QgsElevationProfileManager () override | |
| bool | addProfile (QgsElevationProfile *profile) |
| Adds a profile to the manager. | |
| void | clear () |
| Removes and deletes all profiles from the manager. | |
| QString | generateUniqueTitle () const |
| Generates a unique title for a new profile, which does not clash with any already contained by the manager. | |
| QgsElevationProfile * | profileByName (const QString &name) const |
Returns the profile with a matching name, or nullptr if no matching profiles were found. | |
| QList< QgsElevationProfile * > | profiles () const |
| Returns a list of all profiles contained in the manager. | |
| bool | readXml (const QDomElement &element, const QDomDocument &doc, const QgsReadWriteContext &context) |
| Reads the manager's state from a DOM element, restoring all profiles present in the XML document. | |
| bool | removeProfile (QgsElevationProfile *profile) |
| Removes a profile from the manager. | |
| void | resolveReferences (const QgsProject *project) |
| After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs. | |
| QDomElement | writeXml (QDomDocument &doc, const QgsReadWriteContext &context) const |
| Returns a DOM element representing the state of the manager. | |
| Public Member Functions inherited from QgsAbstractProjectStoredObjectManager< QgsElevationProfile > | |
| QgsAbstractProjectStoredObjectManager (QgsProject *project=nullptr) | |
| Constructor for QgsAbstractProjectStoredObjectManager, for objects attached to the specified project. | |
| ~QgsAbstractProjectStoredObjectManager () override | |
| QgsElevationProfile * | objectByName (const QString &name) const |
Returns the object with a matching name, or nullptr if no matching objects were found. | |
| QList< QgsElevationProfile * > | 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. | |
Protected Member Functions | |
| void | setupObjectConnections (QgsElevationProfile *profile) override |
| Protected Member Functions inherited from QgsAbstractProjectStoredObjectManager< QgsElevationProfile > | |
| bool | addObject (QgsElevationProfile *object) |
| Adds an object to the manager. | |
| void | clearObjects () |
| Removes and deletes all objects from the manager. | |
| bool | removeObject (QgsElevationProfile *object) |
| Removes an object from the manager. | |
| virtual void | setupObjectConnections (QgsElevationProfile *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. | |
Additional Inherited Members | |
| Protected Attributes inherited from QgsAbstractProjectStoredObjectManager< QgsElevationProfile > | |
| QList< QgsElevationProfile * > | mObjects |
| Attached objects, owned by the manager. | |
| Protected Attributes inherited from QgsProjectStoredObjectManagerBase | |
| QgsProject * | mProject = nullptr |
| Associated project. | |
Manages storage of a set of elevation profiles.
QgsElevationProfileManager handles the storage, serializing and deserializing of elevation profiles. Usually this class is not constructed directly, but rather accessed through a QgsProject via QgsProject::elevationProfileManager().
QgsElevationProfileManager retains ownership of all the profiles contained in the manager.
Definition at line 49 of file qgselevationprofilemanager.h.
|
explicit |
Constructor for QgsElevationProfileManager.
The project will become the parent object for this manager.
Definition at line 24 of file qgselevationprofilemanager.cpp.
|
override |
Definition at line 34 of file qgselevationprofilemanager.cpp.
| bool QgsElevationProfileManager::addProfile | ( | QgsElevationProfile * | profile | ) |
Adds a profile to the manager.
Ownership of the profile is transferred to the manager.
Returns true if the addition was successful, or false if the profile could not be added (eg as a result of a duplicate profile name).
Definition at line 39 of file qgselevationprofilemanager.cpp.
| void QgsElevationProfileManager::clear | ( | ) |
Removes and deletes all profiles from the manager.
Definition at line 49 of file qgselevationprofilemanager.cpp.
| QString QgsElevationProfileManager::generateUniqueTitle | ( | ) | const |
Generates a unique title for a new profile, which does not clash with any already contained by the manager.
Definition at line 121 of file qgselevationprofilemanager.cpp.
|
signal |
Emitted when a profile is about to be added to the manager.
|
signal |
Emitted when a profile is about to be removed from the manager.
|
signal |
Emitted when a profile has been added to the manager.
| QgsElevationProfile * QgsElevationProfileManager::profileByName | ( | const QString & | name | ) | const |
Returns the profile with a matching name, or nullptr if no matching profiles were found.
Definition at line 59 of file qgselevationprofilemanager.cpp.
|
signal |
Emitted when a profile was removed from the manager.
|
signal |
Emitted when a profile is renamed.
| QList< QgsElevationProfile * > QgsElevationProfileManager::profiles | ( | ) | const |
Returns a list of all profiles contained in the manager.
Definition at line 54 of file qgselevationprofilemanager.cpp.
| bool QgsElevationProfileManager::readXml | ( | const QDomElement & | element, |
| const QDomDocument & | doc, | ||
| const QgsReadWriteContext & | context ) |
Reads the manager's state from a DOM element, restoring all profiles present in the XML document.
Definition at line 64 of file qgselevationprofilemanager.cpp.
| bool QgsElevationProfileManager::removeProfile | ( | QgsElevationProfile * | profile | ) |
Removes a profile from the manager.
The profile is deleted.
Returns true if the removal was successful, or false if the removal failed (eg as a result of removing a profile which is not contained in the manager).
Definition at line 44 of file qgselevationprofilemanager.cpp.
| void QgsElevationProfileManager::resolveReferences | ( | const QgsProject * | project | ) |
After reading settings from XML, resolves references to any layers in a project that have been read as layer IDs.
Definition at line 113 of file qgselevationprofilemanager.cpp.
|
overrideprotected |
Definition at line 139 of file qgselevationprofilemanager.cpp.
| QDomElement QgsElevationProfileManager::writeXml | ( | QDomDocument & | doc, |
| const QgsReadWriteContext & | context ) const |
Returns a DOM element representing the state of the manager.
Definition at line 102 of file qgselevationprofilemanager.cpp.