QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsCalloutAbstractMetadata Class Referenceabstract

Stores metadata about one callout renderer class. More...

#include <qgscalloutsregistry.h>

Inheritance diagram for QgsCalloutAbstractMetadata:

Public Member Functions

 QgsCalloutAbstractMetadata (const QString &name, const QString &visibleName, const QIcon &icon=QIcon())
 Constructor for QgsCalloutAbstractMetadata, with the specified name.
virtual ~QgsCalloutAbstractMetadata ()=default
virtual QgsCalloutcreateCallout (const QVariantMap &properties, const QgsReadWriteContext &context)=0
 Create a callout of this type given the map of properties.
virtual QgsCalloutWidgetcreateCalloutWidget (QgsMapLayer *)
 Creates a widget for configuring callouts of this type.
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

QIcon mIcon
QString mName
QString mVisibleName

Detailed Description

Stores metadata about one callout renderer class.

Note
It's necessary to implement createCallout() function. In C++ you can use QgsCalloutMetadata convenience class.
Since
QGIS 3.10

Definition at line 40 of file qgscalloutsregistry.h.

Constructor & Destructor Documentation

◆ QgsCalloutAbstractMetadata()

QgsCalloutAbstractMetadata::QgsCalloutAbstractMetadata ( const QString & name,
const QString & visibleName,
const QIcon & icon = QIcon() )
inline

Constructor for QgsCalloutAbstractMetadata, with the specified name.

The visibleName argument gives a translated, user friendly string identifying the callout type.

The icon argument can be used to specify an icon representing the callout.

Definition at line 51 of file qgscalloutsregistry.h.

◆ ~QgsCalloutAbstractMetadata()

virtual QgsCalloutAbstractMetadata::~QgsCalloutAbstractMetadata ( )
virtualdefault

Member Function Documentation

◆ createCallout()

virtual QgsCallout * QgsCalloutAbstractMetadata::createCallout ( const QVariantMap & properties,
const QgsReadWriteContext & context )
pure virtual

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

Ownership of the callout is transferred to the caller.

Implemented in QgsCalloutMetadata.

◆ createCalloutWidget()

QgsCalloutWidget * QgsCalloutAbstractMetadata::createCalloutWidget ( QgsMapLayer * )
virtual

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 in QgsCalloutMetadata.

Definition at line 26 of file qgscalloutsregistry.cpp.

◆ icon()

QIcon QgsCalloutAbstractMetadata::icon ( ) const
inline

Returns an icon representing the callout.

See also
setIcon()

Definition at line 75 of file qgscalloutsregistry.h.

◆ name()

QString QgsCalloutAbstractMetadata::name ( ) const
inline

Returns the unique name of the callout type.

This value is not translated.

See also
visibleName()

Definition at line 63 of file qgscalloutsregistry.h.

◆ setIcon()

void QgsCalloutAbstractMetadata::setIcon ( const QIcon & icon)
inline

Sets an icon representing the callout.

See also
icon()

Definition at line 81 of file qgscalloutsregistry.h.

◆ visibleName()

QString QgsCalloutAbstractMetadata::visibleName ( ) const
inline

Returns a friendly display name of the callout type.

This value is translated.

See also
name()

Definition at line 69 of file qgscalloutsregistry.h.

Member Data Documentation

◆ mIcon

QIcon QgsCalloutAbstractMetadata::mIcon
protected

Definition at line 100 of file qgscalloutsregistry.h.

◆ mName

QString QgsCalloutAbstractMetadata::mName
protected

Definition at line 98 of file qgscalloutsregistry.h.

◆ mVisibleName

QString QgsCalloutAbstractMetadata::mVisibleName
protected

Definition at line 99 of file qgscalloutsregistry.h.


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