131 int type()
const override;
132 QIcon icon()
const override;
133 QgsLayoutItem::Flags itemFlags()
const override;
135 QString displayName()
const override;
136 bool requiresRasterization()
const override;
137 bool containsAdvancedEffects()
const override;
142 void adjustBoxSize();
150 void setResizeToContents(
bool enabled );
156 bool resizeToContents()
const;
168 void setAutoUpdateModel(
bool autoUpdate );
175 bool autoUpdateModel()
const;
181 void setLegendFilterByMapEnabled(
bool enabled );
194 void setLegendFilterOutAtlas(
bool doFilter );
200 bool legendFilterOutAtlas()
const;
206 void setTitle(
const QString &title );
212 QString title()
const;
218 Qt::AlignmentFlag titleAlignment()
const;
224 void setTitleAlignment( Qt::AlignmentFlag alignment );
281 Q_DECL_DEPRECATED
void setLineSpacing(
double spacing )
SIP_DEPRECATED;
287 double boxSpace() const;
293 void setBoxSpace(
double space );
299 double columnSpace() const;
305 void setColumnSpace(
double spacing );
321 Q_DECL_DEPRECATED
void setFontColor( const QColor &color )
SIP_DEPRECATED;
327 double symbolWidth() const;
333 void setSymbolWidth(
double width );
341 double maximumSymbolSize() const;
351 void setMaximumSymbolSize(
double size );
359 double minimumSymbolSize() const;
369 void setMinimumSymbolSize(
double size );
379 void setSymbolAlignment( Qt::AlignmentFlag alignment );
389 Qt::AlignmentFlag symbolAlignment() const;
395 double symbolHeight() const;
401 void setSymbolHeight(
double height );
407 double wmsLegendWidth() const;
413 void setWmsLegendWidth(
double width );
419 double wmsLegendHeight() const;
425 void setWmsLegendHeight(
double height );
431 void setWrapString( const QString &
string );
437 QString wrapString() const;
443 int columnCount() const;
449 void setColumnCount(
int count );
456 bool splitLayer() const;
463 void setSplitLayer(
bool enabled );
469 bool equalColumnWidth() const;
475 void setEqualColumnWidth(
bool equalize );
483 bool drawRasterStroke() const;
492 void setDrawRasterStroke(
bool enabled );
501 QColor rasterStrokeColor() const;
510 void setRasterStrokeColor( const QColor &color );
519 double rasterStrokeWidth() const;
528 void setRasterStrokeWidth(
double width );
551 void setFilterByMapItems(
const QList< QgsLayoutItemMap * > &maps );
561 QList< QgsLayoutItemMap * > filterByMapItems()
const;
570 QString themeName()
const;
580 void updateFilterByMap(
bool redraw =
true );
587 void paint( QPainter *painter,
const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget )
override;
589 void finalizeRestoreFromXml()
override;
592 ExportLayerBehavior exportLayerBehavior()
const override;
594 bool isRefreshing()
const override;
598 void refresh()
override;
599 void invalidateCache()
override;
604 bool writePropertiesToElement( QDomElement &element, QDomDocument &document,
const QgsReadWriteContext &context )
const override;
605 bool readPropertiesFromElement(
const QDomElement &element,
const QDomDocument &document,
const QgsReadWriteContext &context )
override;
610 void invalidateCurrentMap();
612 void updateFilterByMapAndRedraw();
616 void mapLayerStyleOverridesChanged();
618 void mapThemeChanged(
const QString &theme );
622 void onAtlasFeature();
627 void clearLegendCachedData();
637 void setModelStyleOverrides(
const QMap<QString, QString> &overrides );
639 std::unique_ptr< QgsLegendModel > mLegendModel;
640 std::unique_ptr< QgsLayerTreeGroup > mCustomLayerTree;
645 int mColumnCount = 1;
650 QList< QString > mFilterByMapUuids;
651 QList< QPointer< QgsLayoutItemMap >> mFilterByMapItems;
653 bool mLegendFilterByMap =
false;
654 bool mLegendFilterByExpression =
false;
657 bool mFilterOutAtlas =
false;
660 bool mFilterAskedForUpdate =
false;
662 void doUpdateFilterByMap();
664 bool mInAtlas =
false;
667 bool mInitialMapScaleCalculated =
false;
670 bool mForceResize =
false;
673 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.