16#ifndef QGSLAYOUTRENDERCONTEXT_H
17#define QGSLAYOUTRENDERCONTEXT_H
107 void setDpi(
double dpi );
152 bool gridVisible()
const;
158 void setGridVisible(
bool visible );
164 bool boundingBoxesVisible()
const;
170 void setBoundingBoxesVisible(
bool visible );
178 void setPagesVisible(
bool visible );
220 return mTextRenderFormat;
231 mTextRenderFormat = format;
303 QStringList exportThemes()
const;
314 void setExportThemes(
const QStringList &themes );
322 void setPredefinedScales(
const QVector<qreal> &scales );
373 void matchRasterizedRenderingPolicyToFlags();
380 int mCurrentExportLayer = -1;
382 QColor mSelectionColor = Qt::yellow;
386 bool mIsPreviewRender =
true;
387 bool mGridVisible =
false;
388 bool mBoundingBoxesVisible =
true;
389 bool mPagesVisible =
true;
393 QStringList mExportThemes;
397 QVector<qreal> mPredefinedScales;
404 friend class TestQgsLayout;
405 friend class LayoutContextPreviewSettingRestorer;
406 friend class TestQgsLayoutMap;
407 friend class TestQgsLayoutLabel;
RasterizedRenderingPolicy
Policies controlling when rasterisation of content during renders is permitted.
@ PreferVector
Prefer vector-based rendering, when the result will still be visually near-identical to a raster-base...
QFlags< RenderContextFlag > RenderContextFlags
Render context flags.
QFlags< LayoutRenderFlag > LayoutRenderFlags
Flags for controlling how a layout is rendered.
TextRenderFormat
Options for rendering text.
@ AlwaysOutlines
Always render text using path objects (AKA outlines/curves). This setting guarantees the best quality...
LayoutRenderFlag
Flags for controlling how a layout is rendered.
Abstract interface for use by classes that filter the features or attributes of a layer.
Handles rendering and exports of layouts to various formats.
Provides a method of converting QgsLayoutMeasurements from one unit to another.
Stores information relating to the current rendering settings for a layout.
void setSimplifyMethod(const QgsVectorSimplifyMethod &method)
Sets the simplification setting to use when rendering vector layers.
void setSelectionColor(const QColor &color)
Sets color that is used for drawing of selected vector features.
void dpiChanged()
Emitted when the context's DPI is changed.
void setTextRenderFormat(Qgis::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
void predefinedScalesChanged()
Emitted when the list of predefined scales changes.
bool pagesVisible() const
Returns whether the page items are be visible in the layout.
Qgis::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
bool isPreviewRender() const
Returns true if the render current being conducted is a preview render, i.e.
QgsMaskRenderSettings & maskSettings()
Returns a reference to the mask render settings, which control how masks are drawn and behave during ...
QVector< qreal > predefinedScales() const
Returns the current list of predefined scales for use with the layout.
void flagsChanged(Qgis::LayoutRenderFlags flags)
Emitted whenever the context's flags change.
QgsLayoutMeasurementConverter & measurementConverter()
Returns the layout measurement converter to be used in the layout.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
QColor selectionColor() const
Gets color that is used for drawing of selected vector features.
Q_DECL_DEPRECATED void setCurrentExportLayer(int layer=-1)
Sets the current item layer to draw while exporting.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
const QgsMaskRenderSettings & maskSettings() const
Returns a reference to the mask render settings, which control how masks are drawn and behave during ...
Q_DECL_DEPRECATED int currentExportLayer() const
Returns the current item layer to draw while exporting.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
Contains settings regarding how masks are calculated and handled during a map render.
Contains settings for simplifying geometries fetched from a vector layer.