19 #ifndef QGSLAYERTREEMODELLEGENDNODE_H 20 #define QGSLAYERTREEMODELLEGENDNODE_H 50 RuleKeyRole = Qt::UserRole,
62 virtual Qt::ItemFlags flags()
const;
65 virtual QVariant data(
int role )
const = 0;
68 virtual bool setData(
const QVariant& value,
int role );
73 virtual QString
userLabel()
const {
return mUserLabel; }
74 virtual void setUserLabel(
const QString& userLabel ) { mUserLabel = userLabel; }
76 virtual bool isScaleOK(
double scale )
const { Q_UNUSED( scale );
return true; }
151 virtual Qt::ItemFlags flags()
const override;
152 virtual QVariant data(
int role )
const override;
153 virtual bool setData(
const QVariant& value,
int role )
override;
157 virtual void setEmbeddedInParent(
bool embedded )
override;
159 void setUserLabel(
const QString& userLabel )
override { mUserLabel = userLabel; updateLabel(); }
161 virtual bool isScaleOK(
double scale )
const override {
return mItem.isScaleOK( scale ); }
163 virtual void invalidateMapBasedData()
override;
170 mutable QPixmap mPixmap;
172 bool mSymbolUsesMapUnits;
186 virtual QVariant data(
int role )
const override;
206 virtual QVariant data(
int role )
const override;
224 virtual QVariant data(
int role )
const override;
247 virtual QVariant data(
int role )
const override;
251 virtual void invalidateMapBasedData()
override;
255 void getLegendGraphicFinished(
const QImage& );
256 void getLegendGraphicErrored(
const QString& );
257 void getLegendGraphicProgress( qint64, qint64 );
262 const QImage& getLegendGraphic()
const;
264 QImage renderMessage(
const QString& msg )
const;
270 mutable QScopedPointer<QgsImageFetcher> mFetcher;
273 #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.
Implementation of legend node interface for displaying raster legend entries.
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.
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)
QPointF point
Top-left corner of the legend item.
virtual bool isScaleOK(double scale) const
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...
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.