16#ifndef QGSLAYOUTRENDERCONTEXT_H
17#define QGSLAYOUTRENDERCONTEXT_H
153 bool gridVisible()
const;
159 void setGridVisible(
bool visible );
165 bool boundingBoxesVisible()
const;
171 void setBoundingBoxesVisible(
bool visible );
179 void setPagesVisible(
bool visible );
221 return mTextRenderFormat;
232 mTextRenderFormat = format;
304 QStringList exportThemes()
const;
315 void setExportThemes(
const QStringList &themes );
323 void setPredefinedScales(
const QVector<qreal> &scales );
374 void matchRasterizedRenderingPolicyToFlags();
381 int mCurrentExportLayer = -1;
383 QColor mSelectionColor = Qt::yellow;
387 bool mIsPreviewRender =
true;
388 bool mGridVisible =
false;
389 bool mBoundingBoxesVisible =
true;
390 bool mPagesVisible =
true;
394 QStringList mExportThemes;
398 QVector<qreal> mPredefinedScales;
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.
Provides a method of converting QgsLayoutMeasurements from one unit to another.
void setDpi(double dpi)
Sets the dpi for outputting the 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.
friend class TestQgsLayoutLabel
Qgis::LayoutRenderFlags flags() const
Returns the current combination of flags used for rendering 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 ...
friend class QgsLayoutExporter
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.
friend class LayoutContextPreviewSettingRestorer
void setRasterizedRenderingPolicy(Qgis::RasterizedRenderingPolicy policy)
Sets the policy controlling when rasterization of content during renders is permitted.
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.
QgsLayoutRenderContext(QgsLayout *layout)
Constructor for QgsLayoutRenderContext.
double dpi() const
Returns the dpi for outputting the layout.
QColor selectionColor() const
Gets color that is used for drawing of selected vector features.
Qgis::RasterizedRenderingPolicy rasterizedRenderingPolicy() const
Returns the policy controlling when rasterization of content during renders is permitted.
Qgis::RenderContextFlags renderContextFlags() const
Returns the combination of render context flags matched to the layout context's settings.
Q_DECL_DEPRECATED void setCurrentExportLayer(int layer=-1)
Sets the current item layer to draw while exporting.
friend class TestQgsLayoutMap
void setFlags(Qgis::LayoutRenderFlags flags)
Sets the combination of flags that will be used for rendering the layout.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
bool testFlag(Qgis::LayoutRenderFlag flag) const
Check whether a particular rendering flag is enabled for the layout.
const QgsMaskRenderSettings & maskSettings() const
Returns a reference to the mask render settings, which control how masks are drawn and behave during ...
void setFlag(Qgis::LayoutRenderFlag flag, bool on=true)
Enables or disables a particular rendering flag for the layout.
Q_DECL_DEPRECATED int currentExportLayer() const
Returns the current item layer to draw while exporting.
friend class TestQgsLayout
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.