QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | Protected Attributes | List of all members
QgsCalloutMetadata Class Reference

Convenience metadata class that uses static functions to create callouts and their widgets. More...

#include <qgscalloutsregistry.h>

Inheritance diagram for QgsCalloutMetadata:
Inheritance graph
[legend]

Public Member Functions

 QgsCalloutMetadata (const QString &name, const QString &visibleName, const QIcon &icon, QgsCalloutCreateFunc pfCreate, QgsCalloutWidgetFunc pfWidget=nullptr)
 
QgsCalloutcreateCallout (const QVariantMap &properties, const QgsReadWriteContext &context) override
 Create a callout of this type given the map of properties. More...
 
QgsCalloutWidgetcreateCalloutWidget (QgsVectorLayer *vl) override
 Creates a widget for configuring callouts of this type. More...
 
QgsCalloutCreateFunc createFunction () const
 
void setWidgetFunction (QgsCalloutWidgetFunc f)
 
QgsCalloutWidgetFunc widgetFunction () const
 

Protected Attributes

QgsCalloutCreateFunc mCreateFunc
 
QgsCalloutWidgetFunc mWidgetFunc
 

Detailed Description

Convenience metadata class that uses static functions to create callouts and their widgets.

Since
QGIS 3.10

Definition at line 110 of file qgscalloutsregistry.h.

Constructor & Destructor Documentation

◆ QgsCalloutMetadata()

QgsCalloutMetadata::QgsCalloutMetadata ( const QString &  name,
const QString &  visibleName,
const QIcon &  icon,
QgsCalloutCreateFunc  pfCreate,
QgsCalloutWidgetFunc  pfWidget = nullptr 
)
inline
Note
not available in Python bindings

Definition at line 115 of file qgscalloutsregistry.h.

Member Function Documentation

◆ createCallout()

QgsCallout * QgsCalloutMetadata::createCallout ( const QVariantMap &  properties,
const QgsReadWriteContext context 
)
overridevirtual

Create a callout of this type given the map of properties.

Ownership of the callout is transferred to the caller.

Implements QgsCalloutAbstractMetadata.

Definition at line 34 of file qgscalloutsregistry.cpp.

◆ createCalloutWidget()

QgsCalloutWidget * QgsCalloutMetadata::createCalloutWidget ( QgsVectorLayer )
overridevirtual

Creates a widget for configuring callouts of this type.

Can return nullptr if there's no GUI required.

Ownership of the widget is transferred to the caller.

Reimplemented from QgsCalloutAbstractMetadata.

Definition at line 39 of file qgscalloutsregistry.cpp.

◆ createFunction()

QgsCalloutCreateFunc QgsCalloutMetadata::createFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 125 of file qgscalloutsregistry.h.

◆ setWidgetFunction()

void QgsCalloutMetadata::setWidgetFunction ( QgsCalloutWidgetFunc  f)
inline
Note
not available in Python bindings

Definition at line 130 of file qgscalloutsregistry.h.

◆ widgetFunction()

QgsCalloutWidgetFunc QgsCalloutMetadata::widgetFunction ( ) const
inline
Note
not available in Python bindings

Definition at line 127 of file qgscalloutsregistry.h.

Member Data Documentation

◆ mCreateFunc

QgsCalloutCreateFunc QgsCalloutMetadata::mCreateFunc
protected

Definition at line 136 of file qgscalloutsregistry.h.

◆ mWidgetFunc

QgsCalloutWidgetFunc QgsCalloutMetadata::mWidgetFunc
protected

Definition at line 137 of file qgscalloutsregistry.h.


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