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; }
164 virtual bool isScaleOK(
double scale )
const override {
return mItem.isScaleOK( scale ); }
176 QSize minimumIconSize()
const;
198 void checkAllItems();
204 void uncheckAllItems();
213 bool mSymbolUsesMapUnits;
217 static const int indentSize = 20;
225 void checkAll(
bool state );
314 void getLegendGraphicFinished(
const QImage& );
315 void getLegendGraphicErrored(
const QString& );
316 void getLegendGraphicProgress( qint64, qint64 );
321 const QImage& getLegendGraphic()
const;
332 #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...
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...
void setIconSize(QSize sz)
Set the icon size.
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.