QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
QgsCalloutWidget * | createCalloutWidget (QgsMapLayer *vl) override |
Creates a widget for configuring callouts of this type. | |
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. | |
virtual | ~QgsCalloutAbstractMetadata ()=default |
QIcon | icon () const |
Returns an icon representing the callout. | |
QString | name () const |
Returns the unique name of the callout type. | |
void | setIcon (const QIcon &icon) |
Sets an icon representing the callout. | |
QString | visibleName () const |
Returns a friendly display name of the callout type. | |
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.