QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Registry of available callout classes. More...
#include <qgscalloutsregistry.h>
Public Member Functions | |
QgsCalloutRegistry () | |
QgsCalloutRegistry (const QgsCalloutRegistry &rh)=delete | |
~QgsCalloutRegistry () | |
bool | addCalloutType (QgsCalloutAbstractMetadata *metadata) |
Registers a new callout type. | |
QgsCalloutAbstractMetadata * | calloutMetadata (const QString &type) const |
Returns the metadata for specified the specified callout type. | |
QStringList | calloutTypes () const |
Returns a list of all available callout types. | |
QgsCallout * | createCallout (const QString &type, const QDomElement &element, const QgsReadWriteContext &context) const |
Creates a new instance of a callout of the specified type, using the properties from a DOM element. | |
QgsCallout * | createCallout (const QString &type, const QVariantMap &properties=QVariantMap(), const QgsReadWriteContext &context=QgsReadWriteContext()) const |
Creates a new instance of a callout, given the callout type and properties. | |
QgsCalloutRegistry & | operator= (const QgsCalloutRegistry &rh)=delete |
Static Public Member Functions | |
static QgsCallout * | defaultCallout () |
Create a new instance of a callout with default settings. | |
Registry of available callout classes.
QgsCalloutRegistry is not usually directly created, but rather accessed through QgsApplication::calloutRegistry().
Definition at line 155 of file qgscalloutsregistry.h.
QgsCalloutRegistry::QgsCalloutRegistry | ( | ) |
Definition at line 49 of file qgscalloutsregistry.cpp.
QgsCalloutRegistry::~QgsCalloutRegistry | ( | ) |
Definition at line 58 of file qgscalloutsregistry.cpp.
|
delete |
bool QgsCalloutRegistry::addCalloutType | ( | QgsCalloutAbstractMetadata * | metadata | ) |
Registers a new callout type.
Ownership of metadata is transferred to the registry.
Definition at line 63 of file qgscalloutsregistry.cpp.
QgsCalloutAbstractMetadata * QgsCalloutRegistry::calloutMetadata | ( | const QString & | type | ) | const |
Returns the metadata for specified the specified callout type.
Returns nullptr
if no matching callout style was found.
Definition at line 83 of file qgscalloutsregistry.cpp.
QStringList QgsCalloutRegistry::calloutTypes | ( | ) | const |
Returns a list of all available callout types.
Definition at line 78 of file qgscalloutsregistry.cpp.
QgsCallout * QgsCalloutRegistry::createCallout | ( | const QString & | type, |
const QDomElement & | element, | ||
const QgsReadWriteContext & | context | ||
) | const |
Creates a new instance of a callout of the specified type, using the properties from a DOM element.
The caller takes ownership of the callout.
Definition at line 72 of file qgscalloutsregistry.cpp.
QgsCallout * QgsCalloutRegistry::createCallout | ( | const QString & | type, |
const QVariantMap & | properties = QVariantMap() , |
||
const QgsReadWriteContext & | context = QgsReadWriteContext() |
||
) | const |
Creates a new instance of a callout, given the callout type and properties.
The caller takes ownership of the callout.
Definition at line 93 of file qgscalloutsregistry.cpp.
|
static |
Create a new instance of a callout with default settings.
The caller takes ownership of the callout.
Definition at line 88 of file qgscalloutsregistry.cpp.
|
delete |