|
| QgsSymbolLegendNode (QgsLayerTreeLayer *nodeLayer, const QgsLegendSymbolItem &item, QObject *parent=nullptr) |
| Constructor for QgsSymbolLegendNode. More...
|
|
| ~QgsSymbolLegendNode () |
|
QgsSymbol * | customSymbol () const |
| Returns the node's custom symbol. More...
|
|
QVariant | data (int role) const override |
| Returns data associated with the item. Must be implemented in derived class. More...
|
|
QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const override |
| Draws symbol on the left side of the item. More...
|
|
QString | evaluateLabel (const QgsExpressionContext &context=QgsExpressionContext(), const QString &label=QString()) |
| Evaluates and returns the text label of the current node. More...
|
|
QJsonObject | exportSymbolToJson (const QgsLegendSettings &settings, const QgsRenderContext &context) const override |
| Adds a symbol in base64 string within a JSON object with the key "icon". More...
|
|
Qt::ItemFlags | flags () const override |
| Returns item flags associated with the item. Default implementation returns Qt::ItemIsEnabled. More...
|
|
QSize | iconSize () const |
|
void | invalidateMapBasedData () override |
| Notification from model that information from associated map view has changed. More...
|
|
bool | isScaleOK (double scale) const override |
|
QSize | minimumIconSize () const |
| Calculates the minimum icon size to prevent cropping. More...
|
|
QSize | minimumIconSize (QgsRenderContext *context) const |
| Calculates the minimum icon size to prevent cropping. More...
|
|
QgsLegendPatchShape | patchShape () const |
| Returns the symbol patch shape to use when rendering the legend node symbol. More...
|
|
void | setCustomSymbol (QgsSymbol *symbol) |
| Sets the node's custom symbol. More...
|
|
bool | setData (const QVariant &value, int role) override |
| Sets some data associated with the item. Default implementation does nothing and returns false . More...
|
|
void | setEmbeddedInParent (bool embedded) override |
|
void | setIconSize (QSize sz) |
| Set the icon size. More...
|
|
void | setPatchShape (const QgsLegendPatchShape &shape) |
| Sets the symbol patch shape to use when rendering the legend node symbol. More...
|
|
void | setSymbol (QgsSymbol *symbol) |
| Sets the symbol to be used by the legend node. More...
|
|
void | setTextOnSymbolLabel (const QString &label) |
| Sets label of text to be shown on top of the symbol. More...
|
|
void | setTextOnSymbolTextFormat (const QgsTextFormat &format) |
| Sets format of text to be shown on top of the symbol. More...
|
|
void | setUserLabel (const QString &userLabel) override |
|
const QgsSymbol * | symbol () const |
| Returns the symbol used by the legend node. More...
|
|
QString | symbolLabel () const |
| Label of the symbol, user defined label will be used, otherwise will default to the label made by QGIS. More...
|
|
QString | textOnSymbolLabel () const |
| Returns label of text to be shown on top of the symbol. More...
|
|
QgsTextFormat | textOnSymbolTextFormat () const |
| Returns text format of the label to be shown on top of the symbol. More...
|
|
virtual bool | columnBreak () const |
| Returns whether a forced column break should occur before the node. More...
|
|
virtual QVariant | data (int role) const =0 |
| Returns data associated with the item. Must be implemented in derived class. More...
|
|
virtual ItemMetrics | draw (const QgsLegendSettings &settings, ItemContext *ctx) |
| Entry point called from QgsLegendRenderer to do the rendering. More...
|
|
virtual QSizeF | drawSymbol (const QgsLegendSettings &settings, ItemContext *ctx, double itemHeight) const |
| Draws symbol on the left side of the item. More...
|
|
virtual QSizeF | drawSymbolText (const QgsLegendSettings &settings, ItemContext *ctx, QSizeF symbolSize) const |
| Draws label on the right side of the item. More...
|
|
virtual QJsonObject | exportSymbolToJson (const QgsLegendSettings &settings, const QgsRenderContext &context) const |
| Adds a symbol in base64 string within a JSON object with the key "icon". More...
|
|
QJsonObject | exportToJson (const QgsLegendSettings &settings, const QgsRenderContext &context) |
| Entry point called from QgsLegendRenderer to do the rendering in a JSON object. More...
|
|
virtual Qt::ItemFlags | flags () const |
| Returns item flags associated with the item. Default implementation returns Qt::ItemIsEnabled. More...
|
|
virtual void | invalidateMapBasedData () |
| Notification from model that information from associated map view has changed. More...
|
|
virtual bool | isEmbeddedInParent () const |
|
virtual bool | isScaleOK (double scale) const |
|
QgsLayerTreeLayer * | layerNode () const |
| Returns pointer to the parent layer node. More...
|
|
QgsLayerTreeModel * | model () const |
| Returns pointer to model owning this legend node. More...
|
|
virtual void | setColumnBreak (bool breakBeforeNode) |
| Sets whether a forced column break should occur before the node. More...
|
|
virtual bool | setData (const QVariant &value, int role) |
| Sets some data associated with the item. Default implementation does nothing and returns false . More...
|
|
virtual void | setEmbeddedInParent (bool embedded) |
|
virtual void | setUserLabel (const QString &userLabel) |
|
virtual void | setUserPatchSize (QSizeF size) |
| Sets the user (overridden) size for the legend node. More...
|
|
virtual QString | userLabel () const |
|
virtual QSizeF | userPatchSize () const |
| Returns the user (overridden) size for the legend node. More...
|
|