19 #ifndef QGSLAYERTREEMODELLEGENDNODE_H
20 #define QGSLAYERTREEMODELLEGENDNODE_H
51 RuleKeyRole = Qt::UserRole,
66 virtual QVariant data(
int role )
const = 0;
69 virtual bool setData(
const QVariant& value,
int role );
77 virtual bool isScaleOK(
double scale )
const { Q_UNUSED( scale );
return true; }
162 virtual bool isScaleOK(
double scale )
const override {
return mItem.isScaleOK( scale ); }
174 QSize minimumIconSize()
const;
183 bool mSymbolUsesMapUnits;
187 static const int indentSize = 20;
274 void getLegendGraphicFinished(
const QImage& );
275 void getLegendGraphicErrored(
const QString& );
276 void getLegendGraphicProgress( qint64, qint64 );
281 const QImage& getLegendGraphic()
const;
292 #endif // QGSLAYERTREEMODELLEGENDNODE_H
Implementation of legend node interface for displaying arbitrary raster image.
virtual bool isScaleOK(double scale) const override
Handles asynchronous download of images.
virtual bool setData(const QVariant &value, int role)
Set some data associated with the item.
Implementation of legend node interface for displaying raster legend entries.
virtual Qt::ItemFlags flags() const
Return item flags associated with the item.
QPainter * painter
Painter.
virtual bool isEmbeddedInParent() const
The QgsMapSettings class contains configuration for rendering of the map.
void setUserLabel(const QString &userLabel) override
The QgsLayerTreeModel class is model implementation for Qt item views framework.
virtual QSizeF drawSymbol(const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const
Draws symbol on the left side of the item.
QgsLayerTreeLayer * mLayerNode
The QgsLegendSettings class stores the appearance and layout settings for legend drawing with QgsLege...
QgsLayerTreeLayer * layerNode() const
Return pointer to the parent layer node.
Implementation of legend node interface for displaying arbitrary label with icon. ...
virtual QString userLabel() const
Implementation of legend node interface for displaying WMS legend entries.
virtual void setEmbeddedInParent(bool embedded)
Contains information about the context of a rendering operation.
QPointF point
Top-left corner of the legend item.
virtual bool isScaleOK(double scale) const
virtual QVariant data(int role) const =0
Return data associated with the item.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
for QgsSymbolV2LegendNode only - legacy rule key (void ptr, to be cast to QgsSymbolV2 ptr) ...
Implementation of legend node interface for displaying preview of vector symbols and their labels and...
void setIconSize(const QSize &sz)
Set the icon size.
double labelXOffset
offset from the left side where label should start
The class stores information about one class/rule of a vector layer renderer in a unified way that ca...
virtual void invalidateMapBasedData()
Notification from model that information from associated map view has changed.
virtual void setUserLabel(const QString &userLabel)
Layer tree node points to a map layer.