QGIS API Documentation
2.8.2-Wien
|
Implementation of legend node interface for displaying WMS legend entries. More...
#include <qgslayertreemodellegendnode.h>
Public Member Functions | |
QgsWMSLegendNode (QgsLayerTreeLayer *nodeLayer, QObject *parent=0) | |
virtual QVariant | data (int role) const override |
Return data associated with the item. | |
virtual QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const override |
Draws symbol on the left side of the item. | |
virtual void | invalidateMapBasedData () override |
Notification from model that information from associated map view has changed. | |
Public Member Functions inherited from QgsLayerTreeModelLegendNode | |
~QgsLayerTreeModelLegendNode () | |
virtual ItemMetrics | draw (const QgsLegendSettings &settings, ItemContext *ctx) |
Entry point called from QgsLegendRenderer to do the rendering. | |
virtual QSizeF | drawSymbolText (const QgsLegendSettings &settings, ItemContext *ctx, const QSizeF &symbolSize) const |
Draws label on the right side of the item. | |
virtual Qt::ItemFlags | flags () const |
Return item flags associated with the item. | |
virtual bool | isEmbeddedInParent () const |
virtual bool | isScaleOK (double scale) const |
QgsLayerTreeLayer * | layerNode () const |
Return pointer to the parent layer node. | |
QgsLayerTreeModel * | model () const |
Return pointer to model owning this legend node. | |
virtual bool | setData (const QVariant &value, int role) |
Set some data associated with the item. | |
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, SymbolV2LegacyRuleKeyRole, ParentRuleKeyRole } |
Signals inherited from QgsLayerTreeModelLegendNode | |
void | dataChanged () |
Emitted on internal data change so the layer tree model can forward the signal to views. | |
Protected Member Functions inherited from QgsLayerTreeModelLegendNode | |
QgsLayerTreeModelLegendNode (QgsLayerTreeLayer *nodeL, QObject *parent=0) | |
Construct the node with pointer to its parent layer node. | |
Protected Attributes inherited from QgsLayerTreeModelLegendNode | |
bool | mEmbeddedInParent |
QgsLayerTreeLayer * | mLayerNode |
QString | mUserLabel |
Implementation of legend node interface for displaying WMS legend entries.
Definition at line 239 of file qgslayertreemodellegendnode.h.
QgsWMSLegendNode::QgsWMSLegendNode | ( | QgsLayerTreeLayer * | nodeLayer, |
QObject * | parent = 0 |
||
) |
Definition at line 491 of file qgslayertreemodellegendnode.cpp.
|
overridevirtual |
Return data associated with the item.
Must be implemented in derived class.
Implements QgsLayerTreeModelLegendNode.
Definition at line 526 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 541 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 617 of file qgslayertreemodellegendnode.cpp.