QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
|
Produces legend node with a marker symbol. More...
#include <qgslayertreemodellegendnode.h>
Public Member Functions | |
QgsDataDefinedSizeLegendNode (QgsLayerTreeLayer *nodeLayer, const QgsDataDefinedSizeLegend &settings, QObject *parent=nullptr) | |
Construct the node using QgsDataDefinedSizeLegend as definition of the node's appearance. More... | |
~QgsDataDefinedSizeLegendNode () override | |
QVariant | data (int role) const override |
Returns data associated with the item. Must be implemented in derived class. More... | |
ItemMetrics | draw (const QgsLegendSettings &settings, ItemContext *ctx) override |
Entry point called from QgsLegendRenderer to do the rendering. More... | |
![]() | |
virtual QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const |
Draws symbol on the left side of the item. More... | |
virtual QSizeF | drawSymbolText (const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize) const |
Draws label on the right side of the item. More... | |
void | exportSymbolTextToJson (const QgsLegendSettings &settings, QJsonObject &json) const |
Adds a label in a JSON object with the key "title". More... | |
virtual void | exportSymbolToJson (const QgsLegendSettings &settings, const QgsRenderContext &context, QJsonObject &json) const |
Adds a symbol in base64 string within a JSON object with the key "icon". More... | |
void | exportToJson (const QgsLegendSettings &settings, const QgsRenderContext &context, QJsonObject &json) |
Entry point called from QgsLegendRenderer to do the rendering in a JSON object. More... | |
virtual Qt::ItemFlags | flags () const |
Returns item flags associated with the item. Default implementation returns Qt::ItemIsEnabled. More... | |
virtual void | invalidateMapBasedData () |
Notification from model that information from associated map view has changed. More... | |
virtual bool | isEmbeddedInParent () const |
virtual bool | isScaleOK (double scale) const |
QgsLayerTreeLayer * | layerNode () const |
Returns pointer to the parent layer node. More... | |
QgsLayerTreeModel * | model () const |
Returns pointer to model owning this legend node. More... | |
virtual bool | setData (const QVariant &value, int role) |
Sets some data associated with the item. Default implementation does nothing and returns false . More... | |
virtual void | setEmbeddedInParent (bool embedded) |
virtual void | setUserLabel (const QString &userLabel) |
virtual QString | userLabel () const |
Additional Inherited Members | |
![]() | |
enum | LegendNodeRoles { RuleKeyRole = Qt::UserRole, ParentRuleKeyRole } |
![]() | |
void | dataChanged () |
Emitted on internal data change so the layer tree model can forward the signal to views. More... | |
![]() | |
QgsLayerTreeModelLegendNode (QgsLayerTreeLayer *nodeL, QObject *parent=nullptr) | |
Construct the node with pointer to its parent layer node. More... | |
QgsRenderContext * | createTemporaryRenderContext () const |
Returns a temporary context or nullptr if legendMapViewData are not valid. More... | |
![]() | |
bool | mEmbeddedInParent |
QgsLayerTreeLayer * | mLayerNode = nullptr |
QString | mUserLabel |
Produces legend node with a marker symbol.
Definition at line 551 of file qgslayertreemodellegendnode.h.
QgsDataDefinedSizeLegendNode::QgsDataDefinedSizeLegendNode | ( | QgsLayerTreeLayer * | nodeLayer, |
const QgsDataDefinedSizeLegend & | settings, | ||
QObject * | parent = nullptr |
||
) |
Construct the node using QgsDataDefinedSizeLegend as definition of the node's appearance.
Definition at line 1089 of file qgslayertreemodellegendnode.cpp.
|
override |
Definition at line 1095 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Returns data associated with the item. Must be implemented in derived class.
Implements QgsLayerTreeModelLegendNode.
Definition at line 1100 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Entry point called from QgsLegendRenderer to do the rendering.
Default implementation calls drawSymbol() and drawSymbolText() methods.
If ctx is nullptr
, this is just first stage when preparing layout - without actual rendering.
Reimplemented from QgsLayerTreeModelLegendNode.
Definition at line 1115 of file qgslayertreemodellegendnode.cpp.