QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | Static Public Member Functions | List of all members
QgsCalloutRegistry Class Reference

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...
 
QgsCalloutAbstractMetadatacalloutMetadata (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...
 
QgsCalloutcreateCallout (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...
 
QgsCalloutcreateCallout (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...
 
QgsCalloutRegistryoperator= (const QgsCalloutRegistry &rh)=delete
 QgsCalloutRegistry cannot be copied. More...
 

Static Public Member Functions

static QgsCalloutdefaultCallout ()
 Create a new instance of a callout with default settings. More...
 

Detailed Description

Registry of available callout classes.

QgsCalloutRegistry is not usually directly created, but rather accessed through QgsApplication::calloutRegistry().

Since
QGIS 3.10

Definition at line 155 of file qgscalloutsregistry.h.

Constructor & Destructor Documentation

◆ QgsCalloutRegistry() [1/2]

QgsCalloutRegistry::QgsCalloutRegistry ( )

Definition at line 49 of file qgscalloutsregistry.cpp.

◆ ~QgsCalloutRegistry()

QgsCalloutRegistry::~QgsCalloutRegistry ( )

Definition at line 58 of file qgscalloutsregistry.cpp.

◆ QgsCalloutRegistry() [2/2]

QgsCalloutRegistry::QgsCalloutRegistry ( const QgsCalloutRegistry rh)
delete

QgsCalloutRegistry cannot be copied.

Member Function Documentation

◆ addCalloutType()

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.

◆ calloutMetadata()

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.

◆ calloutTypes()

QStringList QgsCalloutRegistry::calloutTypes ( ) const

Returns a list of all available callout types.

Definition at line 78 of file qgscalloutsregistry.cpp.

◆ createCallout() [1/2]

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.

◆ createCallout() [2/2]

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.

◆ defaultCallout()

QgsCallout * QgsCalloutRegistry::defaultCallout ( )
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.

◆ operator=()

QgsCalloutRegistry & QgsCalloutRegistry::operator= ( const QgsCalloutRegistry rh)
delete

QgsCalloutRegistry cannot be copied.


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