QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
Implementation of legend node interface for displaying WMS legend entries. More...
#include <qgslayertreemodellegendnode.h>
Public Member Functions | |
QgsWmsLegendNode (QgsLayerTreeLayer *nodeLayer, QObject *parent=nullptr) | |
Constructor for QgsWmsLegendNode. More... | |
QVariant | data (int role) const override |
Returns data associated with the item. Must be implemented in derived class. More... | |
QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const override |
Draws symbol on the left side of the item. More... | |
void | invalidateMapBasedData () override |
Notification from model that information from associated map view has changed. More... | |
Public Member Functions inherited from QgsLayerTreeModelLegendNode | |
virtual ItemMetrics | draw (const QgsLegendSettings &settings, ItemContext *ctx) |
Entry point called from QgsLegendRenderer to do the rendering. More... | |
virtual QSizeF | drawSymbolText (const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize) const |
Draws label on the right side of the item. More... | |
virtual Qt::ItemFlags | flags () const |
Returns item flags associated with the item. Default implementation returns Qt::ItemIsEnabled. 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 | |
Public Types inherited from QgsLayerTreeModelLegendNode | |
enum | LegendNodeRoles { RuleKeyRole = Qt::UserRole, ParentRuleKeyRole } |
Signals inherited from QgsLayerTreeModelLegendNode | |
void | dataChanged () |
Emitted on internal data change so the layer tree model can forward the signal to views. More... | |
Protected Member Functions inherited from QgsLayerTreeModelLegendNode | |
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 null if legendMapViewData are not valid. More... | |
Protected Attributes inherited from QgsLayerTreeModelLegendNode | |
bool | mEmbeddedInParent |
QgsLayerTreeLayer * | mLayerNode = nullptr |
QString | mUserLabel |
Implementation of legend node interface for displaying WMS legend entries.
Definition at line 387 of file qgslayertreemodellegendnode.h.
QgsWmsLegendNode::QgsWmsLegendNode | ( | QgsLayerTreeLayer * | nodeLayer, |
QObject * | parent = nullptr |
||
) |
Constructor for QgsWmsLegendNode.
nodeLayer | layer node |
parent | attach a parent QObject to the legend node. |
Definition at line 629 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Returns data associated with the item. Must be implemented in derived class.
Implements QgsLayerTreeModelLegendNode.
Definition at line 664 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Draws symbol on the left side of the item.
settings | Legend layout configuration |
ctx | Context for rendering - may be null if only doing layout without actual rendering |
itemHeight | Minimal height of the legend item - used for correct positioning when rendering |
Reimplemented from QgsLayerTreeModelLegendNode.
Definition at line 679 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Notification from model that information from associated map view has changed.
Default implementation does nothing.
Reimplemented from QgsLayerTreeModelLegendNode.
Definition at line 755 of file qgslayertreemodellegendnode.cpp.