|
QGIS API Documentation
2.6.0-Brighton
|
Implementation of legend node interface for displaying arbitrary label with icon. More...
#include <qgslayertreemodellegendnode.h>

Public Member Functions | |
| QgsSimpleLegendNode (QgsLayerTreeLayer *nodeLayer, const QString &label, const QIcon &icon=QIcon(), QObject *parent=0) | |
| virtual QVariant | data (int role) const |
| Return data associated with the item. | |
Public Member Functions inherited from QgsLayerTreeModelLegendNode | |
| ~QgsLayerTreeModelLegendNode () | |
| QgsLayerTreeLayer * | layerNode () const |
| Return pointer to the parent layer node. | |
| QgsLayerTreeModel * | model () const |
| Return pointer to model owning this legend node. | |
| virtual Qt::ItemFlags | flags () const |
| Return item flags associated with the item. | |
| virtual bool | setData (const QVariant &value, int role) |
| Set some data associated with the item. | |
| virtual bool | isEmbeddedInParent () const |
| virtual void | setEmbeddedInParent (bool embedded) |
| virtual QString | userLabel () const |
| virtual void | setUserLabel (const QString &userLabel) |
| virtual bool | isScaleOK (double scale) const |
| virtual void | invalidateMapBasedData () |
| Notification from model that information from associated map view has changed. | |
| virtual ItemMetrics | draw (const QgsLegendSettings &settings, ItemContext *ctx) |
| Entry point called from QgsLegendRenderer to do the rendering. | |
| virtual QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const |
| Draws symbol on the left side of the item. | |
| virtual QSizeF | drawSymbolText (const QgsLegendSettings &settings, ItemContext *ctx, const QSizeF &symbolSize) const |
| Draws label on the right side of the item. | |
Additional Inherited Members | |
Public Types inherited from QgsLayerTreeModelLegendNode | |
| enum | LegendNodeRoles { RuleKeyRole = Qt::UserRole, SymbolV2LegacyRuleKeyRole } |
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 | |
| QgsLayerTreeLayer * | mLayerNode |
| bool | mEmbeddedInParent |
| QString | mUserLabel |
Implementation of legend node interface for displaying arbitrary label with icon.
| QgsSimpleLegendNode::QgsSimpleLegendNode | ( | QgsLayerTreeLayer * | nodeLayer, |
| const QString & | label, | ||
| const QIcon & | icon = QIcon(), |
||
| QObject * | parent = 0 |
||
| ) |
|
virtual |
Return data associated with the item.
Must be implemented in derived class.
Implements QgsLayerTreeModelLegendNode.
1.8.1.2