129 int type()
const override;
130 QIcon icon()
const override;
133 QString displayName()
const override;
134 bool requiresRasterization()
const override;
135 bool containsAdvancedEffects()
const override;
140 void adjustBoxSize();
148 void setResizeToContents(
bool enabled );
154 bool resizeToContents()
const;
173 void setAutoUpdateModel(
bool autoUpdate );
180 bool autoUpdateModel()
const;
186 void setLegendFilterByMapEnabled(
bool enabled );
199 void setLegendFilterOutAtlas(
bool doFilter );
205 bool legendFilterOutAtlas()
const;
211 void setTitle(
const QString &title );
217 QString title()
const;
223 Qt::AlignmentFlag titleAlignment()
const;
229 void setTitleAlignment( Qt::AlignmentFlag alignment );
286 Q_DECL_DEPRECATED
void setLineSpacing(
double spacing )
SIP_DEPRECATED;
292 double boxSpace() const;
298 void setBoxSpace(
double space );
304 double columnSpace() const;
310 void setColumnSpace(
double spacing );
326 Q_DECL_DEPRECATED
void setFontColor( const QColor &color )
SIP_DEPRECATED;
332 double symbolWidth() const;
338 void setSymbolWidth(
double width );
346 double maximumSymbolSize() const;
356 void setMaximumSymbolSize(
double size );
364 double minimumSymbolSize() const;
374 void setMinimumSymbolSize(
double size );
384 void setSymbolAlignment( Qt::AlignmentFlag alignment );
394 Qt::AlignmentFlag symbolAlignment() const;
400 double symbolHeight() const;
406 void setSymbolHeight(
double height );
412 double wmsLegendWidth() const;
418 void setWmsLegendWidth(
double width );
424 double wmsLegendHeight() const;
430 void setWmsLegendHeight(
double height );
436 void setWrapString( const QString &
string );
442 QString wrapString() const;
448 int columnCount() const;
454 void setColumnCount(
int count );
461 bool splitLayer() const;
468 void setSplitLayer(
bool enabled );
474 bool equalColumnWidth() const;
480 void setEqualColumnWidth(
bool equalize );
488 bool drawRasterStroke() const;
497 void setDrawRasterStroke(
bool enabled );
506 QColor rasterStrokeColor() const;
515 void setRasterStrokeColor( const QColor &color );
524 double rasterStrokeWidth() const;
533 void setRasterStrokeWidth(
double width );
556 void setFilterByMapItems(
const QList< QgsLayoutItemMap * > &maps );
566 QList< QgsLayoutItemMap * > filterByMapItems()
const;
575 QString themeName()
const;
585 void updateFilterByMap(
bool redraw =
true );
592 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
override;
594 void finalizeRestoreFromXml()
override;
597 ExportLayerBehavior exportLayerBehavior()
const override;
599 bool isRefreshing()
const override;
603 void refresh()
override;
604 void invalidateCache()
override;
609 bool writePropertiesToElement( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const override;
610 bool readPropertiesFromElement(
const QDomElement &element,
const QDomDocument &document,
const QgsReadWriteContext &context )
override;
615 void invalidateCurrentMap();
617 void updateFilterByMapAndRedraw();
621 void mapLayerStyleOverridesChanged();
623 void mapThemeChanged(
const QString &theme );
627 void onAtlasFeature();
632 void clearLegendCachedData();
642 void setModelStyleOverrides(
const QMap<QString, QString> &overrides );
644 void ensureModelIsInitialized()
const;
648 std::unique_ptr< QgsLegendModel > mLegendModel;
649 std::unique_ptr< QgsLayerTree > mCustomLayerTree;
650 bool mDeferLegendModelInitialization =
true;
655 int mColumnCount = 1;
660 QList< QString > mFilterByMapUuids;
661 QList< QPointer< QgsLayoutItemMap >> mFilterByMapItems;
663 bool mLegendFilterByMap =
false;
664 bool mLegendFilterByExpression =
false;
667 bool mFilterOutAtlas =
false;
670 bool mFilterAskedForUpdate =
false;
672 void doUpdateFilterByMap();
674 bool mInAtlas =
false;
677 bool mInitialMapScaleCalculated =
false;
680 bool mForceResize =
false;
683 bool mSizeToContents =
true;
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Contains settings and helpers relating to a render of a QgsLayoutItem.
The class is used as a container of context for various read/write operations on other objects.