16 #ifndef QGSLAYOUTRENDERCONTEXT_H
17 #define QGSLAYOUTRENDERCONTEXT_H
19 #include "qgis_core.h"
47 FlagOutlineOnly = 1 << 2,
48 FlagAntialiasing = 1 << 3,
49 FlagUseAdvancedEffects = 1 << 4,
50 FlagForceVectorOutput = 1 << 5,
51 FlagHideCoverageLayer = 1 << 6,
52 FlagDrawSelection = 1 << 7,
53 FlagDisableTiledRasterLayerRenders = 1 << 8,
54 FlagRenderLabelsByMapLayer = 1 << 9,
55 FlagLosslessImageRendering = 1 << 10,
57 Q_DECLARE_FLAGS( Flags, Flag )
70 void setFlags( QgsLayoutRenderContext::Flags flags );
87 QgsLayoutRenderContext::Flags flags()
const;
95 bool testFlag( Flag flag )
const;
100 Qgis::RenderContextFlags renderContextFlags()
const;
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;
276 QStringList exportThemes()
const;
287 void setExportThemes(
const QStringList &themes );
295 void setPredefinedScales(
const QVector<qreal> &scales );
346 Flags mFlags = Flags();
350 int mCurrentExportLayer = -1;
352 QColor mSelectionColor = Qt::yellow;
356 bool mIsPreviewRender =
true;
357 bool mGridVisible =
false;
358 bool mBoundingBoxesVisible =
true;
359 bool mPagesVisible =
true;
363 QStringList mExportThemes;
367 QVector<qreal> mPredefinedScales;
372 friend class TestQgsLayout;
373 friend class LayoutContextPreviewSettingRestorer;
374 friend class TestQgsLayoutMap;
375 friend class TestQgsLayoutLabel;
TextRenderFormat
Options for rendering text.
Abstract interface for use by classes that filter the features or attributes of a layer.
Handles rendering and exports of layouts to various formats.
This class 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.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
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.
void flagsChanged(QgsLayoutRenderContext::Flags flags)
Emitted whenever the context's flags change.
QVector< qreal > predefinedScales() const
Returns the current list of predefined scales for use with the layout.
QgsLayoutMeasurementConverter & measurementConverter()
Returns the layout measurement converter to be used in 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.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
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.
This class contains information how to simplify geometries fetched from a vector layer.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)