QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | List of all members
QgsCalloutWidget Class Referenceabstract

Base class for widgets which allow control over the properties of callouts. More...

#include <qgscalloutwidget.h>

Inheritance diagram for QgsCalloutWidget:
Inheritance graph
[legend]

Signals

void changed ()
 Should be emitted whenever configuration changes happened on this symbol layer configuration.
 

Public Member Functions

 QgsCalloutWidget (QWidget *parent, QgsVectorLayer *vl=nullptr)
 Constructor for QgsCalloutWidget.
 
virtual QgsCalloutcallout ()=0
 Returns the callout defined by the current settings in the widget.
 
QgsSymbolWidgetContext context () const
 Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
 
virtual void setCallout (QgsCallout *callout)=0
 Sets the callout to show in the widget.
 
virtual void setContext (const QgsSymbolWidgetContext &context)
 Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.
 
virtual void setGeometryType (Qgis::GeometryType type)=0
 Sets the geometry type of the features to customize the widget accordingly.
 
const QgsVectorLayervectorLayer () const
 Returns the vector layer associated with the widget.
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 

Protected Member Functions

QgsExpressionContext createExpressionContext () const override
 This method needs to be reimplemented in all classes which implement this interface and return an expression context.
 
void registerDataDefinedButton (QgsPropertyOverrideButton *button, QgsCallout::Property key)
 Registers a data defined override button.
 

Detailed Description

Base class for widgets which allow control over the properties of callouts.

Since
QGIS 3.10

Definition at line 34 of file qgscalloutwidget.h.

Constructor & Destructor Documentation

◆ QgsCalloutWidget()

QgsCalloutWidget::QgsCalloutWidget ( QWidget *  parent,
QgsVectorLayer vl = nullptr 
)
inline

Constructor for QgsCalloutWidget.

Parameters
vlassociated vector layer
parentparent widget

Definition at line 45 of file qgscalloutwidget.h.

Member Function Documentation

◆ callout()

virtual QgsCallout * QgsCalloutWidget::callout ( )
pure virtual

Returns the callout defined by the current settings in the widget.

Ownership is not transferred, and the caller should clone the returned value.

See also
setCallout()

◆ changed

void QgsCalloutWidget::changed ( )
signal

Should be emitted whenever configuration changes happened on this symbol layer configuration.

If the subsymbol is changed, symbolChanged() should be emitted instead.

◆ context()

QgsSymbolWidgetContext QgsCalloutWidget::context ( ) const

Returns the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

See also
setContext()

Definition at line 68 of file qgscalloutwidget.cpp.

◆ createExpressionContext()

QgsExpressionContext QgsCalloutWidget::createExpressionContext ( ) const
overrideprotectedvirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Since
QGIS 3.0

Implements QgsExpressionContextGenerator.

Definition at line 27 of file qgscalloutwidget.cpp.

◆ registerDataDefinedButton()

void QgsCalloutWidget::registerDataDefinedButton ( QgsPropertyOverrideButton button,
QgsCallout::Property  key 
)
protected

Registers a data defined override button.

Handles setting up connections for the button and initializing the button to show the correct descriptions and help text for the associated property.

Definition at line 73 of file qgscalloutwidget.cpp.

◆ setCallout()

virtual void QgsCalloutWidget::setCallout ( QgsCallout callout)
pure virtual

Sets the callout to show in the widget.

Ownership is not transferred.

See also
callout()

◆ setContext()

void QgsCalloutWidget::setContext ( const QgsSymbolWidgetContext context)
virtual

Sets the context in which the symbol widget is shown, e.g., the associated map canvas and expression contexts.

Parameters
contextsymbol widget context
See also
context()

Definition at line 52 of file qgscalloutwidget.cpp.

◆ setGeometryType()

virtual void QgsCalloutWidget::setGeometryType ( Qgis::GeometryType  type)
pure virtual

Sets the geometry type of the features to customize the widget accordingly.

◆ vectorLayer()

const QgsVectorLayer * QgsCalloutWidget::vectorLayer ( ) const
inline

Returns the vector layer associated with the widget.

Definition at line 79 of file qgscalloutwidget.h.


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