QGIS API Documentation 3.99.0-Master (752b475928d)
Loading...
Searching...
No Matches
QgsProfileSourceRegistry Class Reference

Registry of profile sources used by QgsProfilePlotRenderer. More...

#include <qgsprofilesourceregistry.h>

Inheritance diagram for QgsProfileSourceRegistry:

Signals

void profileSourceRegistered (const QString &sourceId, const QString &sourceName)
 Signal emitted once a profile source is registered.
void profileSourceUnregistered (const QString &sourceId)
 Signal emitted once a profile source is unregistered.

Public Member Functions

 QgsProfileSourceRegistry ()
 Constructor - creates a registry of profile sources.
 ~QgsProfileSourceRegistry () override
QgsAbstractProfileSourcefindSourceById (const QString &sourceId) const
 Finds a registered profile source by id.
QList< QgsAbstractProfileSource * > profileSources () const
 Returns a list of registered profile sources.
bool registerProfileSource (QgsAbstractProfileSource *source)
 Registers a profile source and takes ownership of it.
bool unregisterProfileSource (const QString &sourceId)
 Unregisters a profile source by a given ID and destroys its instance.
Q_DECL_DEPRECATED bool unregisterProfileSource (QgsAbstractProfileSource *source)
 Unregisters a profile source and destroys its instance.

Detailed Description

Registry of profile sources used by QgsProfilePlotRenderer.

QgsProfileSourceRegistry is not usually directly created, but rather accessed through QgsApplication::profileSourceRegistry().

Since
QGIS 3.38

Definition at line 37 of file qgsprofilesourceregistry.h.

Constructor & Destructor Documentation

◆ QgsProfileSourceRegistry()

QgsProfileSourceRegistry::QgsProfileSourceRegistry ( )

Constructor - creates a registry of profile sources.

Definition at line 22 of file qgsprofilesourceregistry.cpp.

◆ ~QgsProfileSourceRegistry()

QgsProfileSourceRegistry::~QgsProfileSourceRegistry ( )
override

Definition at line 27 of file qgsprofilesourceregistry.cpp.

Member Function Documentation

◆ findSourceById()

QgsAbstractProfileSource * QgsProfileSourceRegistry::findSourceById ( const QString & sourceId) const

Finds a registered profile source by id.

Returns nullptr if the source is not found in the registry.

Parameters
sourceIdId of the source to be found in the registry.
Since
QGIS 4.0

Definition at line 87 of file qgsprofilesourceregistry.cpp.

◆ profileSourceRegistered

void QgsProfileSourceRegistry::profileSourceRegistered ( const QString & sourceId,
const QString & sourceName )
signal

Signal emitted once a profile source is registered.

Parameters
sourceIdUnique identifier of the profile source that has been registered.
sourceNameName of the profile source that has been registered.
Since
QGIS 4.0

◆ profileSources()

QList< QgsAbstractProfileSource * > QgsProfileSourceRegistry::profileSources ( ) const

Returns a list of registered profile sources.

Definition at line 32 of file qgsprofilesourceregistry.cpp.

◆ profileSourceUnregistered

void QgsProfileSourceRegistry::profileSourceUnregistered ( const QString & sourceId)
signal

Signal emitted once a profile source is unregistered.

Parameters
sourceIdUnique identifier of the profile source that has been unregistered.
Since
QGIS 4.0

◆ registerProfileSource()

bool QgsProfileSourceRegistry::registerProfileSource ( QgsAbstractProfileSource * source)

Registers a profile source and takes ownership of it.

Returns true if the profile source could be registered and false otherwise.

Definition at line 37 of file qgsprofilesourceregistry.cpp.

◆ unregisterProfileSource() [1/2]

bool QgsProfileSourceRegistry::unregisterProfileSource ( const QString & sourceId)

Unregisters a profile source by a given ID and destroys its instance.

Returns true if the source id was found in the registry and false otherwise.

Parameters
sourceIdProfile source ID to be unregistered.
Since
QGIS 4.0

Definition at line 72 of file qgsprofilesourceregistry.cpp.

◆ unregisterProfileSource() [2/2]

bool QgsProfileSourceRegistry::unregisterProfileSource ( QgsAbstractProfileSource * source)

Unregisters a profile source and destroys its instance.

Deprecated
QGIS 4.0. Unregister the profile source by ID instead.

Definition at line 59 of file qgsprofilesourceregistry.cpp.


The documentation for this class was generated from the following files: