QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Registry of available callout classes. More...
#include <qgscalloutsregistry.h>
Public Member Functions | |
QgsCalloutRegistry () | |
QgsCalloutRegistry (const QgsCalloutRegistry &rh)=delete | |
QgsCalloutRegistry cannot be copied. More... | |
~QgsCalloutRegistry () | |
bool | addCalloutType (QgsCalloutAbstractMetadata *metadata) |
Registers a new callout type. More... | |
QgsCalloutAbstractMetadata * | calloutMetadata (const QString &type) const |
Returns the metadata for specified the specified callout type. More... | |
QStringList | calloutTypes () const |
Returns a list of all available callout types. More... | |
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. More... | |
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. More... | |
QgsCalloutRegistry & | operator= (const QgsCalloutRegistry &rh)=delete |
QgsCalloutRegistry cannot be copied. More... | |
Static Public Member Functions | |
static QgsCallout * | defaultCallout () |
Create a new instance of a callout with default settings. More... | |
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 |
QgsCalloutRegistry cannot be copied.
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 |
QgsCalloutRegistry cannot be copied.