16 #ifndef QGSLAYOUTRENDERCONTEXT_H 17 #define QGSLAYOUTRENDERCONTEXT_H 19 #include "qgis_core.h" 43 FlagOutlineOnly = 1 << 2,
44 FlagAntialiasing = 1 << 3,
45 FlagUseAdvancedEffects = 1 << 4,
46 FlagForceVectorOutput = 1 << 5,
47 FlagHideCoverageLayer = 1 << 6,
48 FlagDrawSelection = 1 << 7,
49 FlagDisableTiledRasterLayerRenders = 1 << 8,
50 FlagRenderLabelsByMapLayer = 1 << 9,
52 Q_DECLARE_FLAGS( Flags,
Flag )
65 void setFlags( QgsLayoutRenderContext::Flags flags );
82 QgsLayoutRenderContext::Flags flags()
const;
90 bool testFlag(
Flag flag )
const;
95 QgsRenderContext::Flags renderContextFlags()
const;
102 void setDpi(
double dpi );
147 bool gridVisible()
const;
153 void setGridVisible(
bool visible );
159 bool boundingBoxesVisible()
const;
165 void setBoundingBoxesVisible(
bool visible );
173 void setPagesVisible(
bool visible );
215 return mTextRenderFormat;
226 mTextRenderFormat = format;
271 QStringList exportThemes()
const;
282 void setExportThemes(
const QStringList &themes );
290 void setPredefinedScales(
const QVector<qreal> &scales );
305 void flagsChanged( QgsLayoutRenderContext::Flags flags );
317 void predefinedScalesChanged();
321 Flags mFlags =
nullptr;
325 int mCurrentExportLayer = -1;
327 QColor mSelectionColor = Qt::yellow;
331 bool mIsPreviewRender =
true;
332 bool mGridVisible =
false;
333 bool mBoundingBoxesVisible =
true;
334 bool mPagesVisible =
true;
338 QStringList mExportThemes;
342 QVector<qreal> mPredefinedScales;
345 friend class TestQgsLayout;
346 friend class LayoutContextPreviewSettingRestorer;
347 friend class TestQgsLayoutMap;
348 friend class TestQgsLayoutLabel;
354 #endif //QGSLAYOUTRENDERCONTEXT_H QVector< qreal > predefinedScales() const
Returns the current list of predefined scales for use with the layout.
QColor selectionColor() const
Gets color that is used for drawing of selected vector features.
Flag
Flags for controlling how a layout is rendered.
Q_DECL_DEPRECATED void setCurrentExportLayer(int layer=-1)
Sets the current item layer to draw while exporting.
void setTextRenderFormat(QgsRenderContext::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
Always render text using path objects (AKA outlines/curves).
QgsLayoutMeasurementConverter & measurementConverter()
Returns the layout measurement converter to be used in the layout.
void setSelectionColor(const QColor &color)
Sets color that is used for drawing of selected vector features.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
TextRenderFormat
Options for rendering text.
QgsRenderContext::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
Handles rendering and exports of layouts to various formats.
Q_DECL_DEPRECATED int currentExportLayer() const
Returns the current item layer to draw while exporting.
This class contains information how to simplify geometries fetched from a vector layer.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
This class provides a method of converting QgsLayoutMeasurements from one unit to another...
Stores information relating to the current rendering settings for a layout.
bool isPreviewRender() const
Returns true if the render current being conducted is a preview render, i.e.
bool pagesVisible() const
Returns whether the page items are be visible in the layout.
void setSimplifyMethod(const QgsVectorSimplifyMethod &method)
Sets the simplification setting to use when rendering vector layers.