QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
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 QVariantMap &properties=QVariantMap(), const QgsReadWriteContext &context=QgsReadWriteContext()) const |
Creates a new instance of a callout, given the callout type and properties. 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... | |
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 56 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 61 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 81 of file qgscalloutsregistry.cpp.
QStringList QgsCalloutRegistry::calloutTypes | ( | ) | const |
Returns a list of all available callout types.
Definition at line 76 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 91 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 70 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 86 of file qgscalloutsregistry.cpp.
|
delete |
QgsCalloutRegistry cannot be copied.