QGIS API Documentation
3.20.0-Odense (decaadbb31)
|
Convenience metadata class that uses static functions to create callouts and their widgets. More...
#include <qgscalloutsregistry.h>
Public Member Functions | |
QgsCalloutMetadata (const QString &name, const QString &visibleName, const QIcon &icon, QgsCalloutCreateFunc pfCreate, QgsCalloutWidgetFunc pfWidget=nullptr) | |
QgsCallout * | createCallout (const QVariantMap &properties, const QgsReadWriteContext &context) override |
Create a callout of this type given the map of properties. More... | |
QgsCalloutWidget * | createCalloutWidget (QgsVectorLayer *vl) override |
Creates a widget for configuring callouts of this type. More... | |
QgsCalloutCreateFunc | createFunction () const |
void | setWidgetFunction (QgsCalloutWidgetFunc f) |
QgsCalloutWidgetFunc | widgetFunction () const |
Public Member Functions inherited from QgsCalloutAbstractMetadata | |
QgsCalloutAbstractMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon()) | |
Constructor for QgsCalloutAbstractMetadata, with the specified name. More... | |
virtual | ~QgsCalloutAbstractMetadata ()=default |
QIcon | icon () const |
Returns an icon representing the callout. More... | |
QString | name () const |
Returns the unique name of the callout type. More... | |
void | setIcon (const QIcon &icon) |
Sets an icon representing the callout. More... | |
QString | visibleName () const |
Returns a friendly display name of the callout type. More... | |
Protected Attributes | |
QgsCalloutCreateFunc | mCreateFunc |
QgsCalloutWidgetFunc | mWidgetFunc |
Protected Attributes inherited from QgsCalloutAbstractMetadata | |
QIcon | mIcon |
QString | mName |
QString | mVisibleName |
Convenience metadata class that uses static functions to create callouts and their widgets.
Definition at line 110 of file qgscalloutsregistry.h.
|
inline |
Definition at line 115 of file qgscalloutsregistry.h.
|
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.
|
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.
|
inline |
Definition at line 125 of file qgscalloutsregistry.h.
|
inline |
Definition at line 130 of file qgscalloutsregistry.h.
|
inline |
Definition at line 127 of file qgscalloutsregistry.h.
|
protected |
Definition at line 136 of file qgscalloutsregistry.h.
|
protected |
Definition at line 137 of file qgscalloutsregistry.h.