QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
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,
51 FlagLosslessImageRendering = 1 << 10,
53 Q_DECLARE_FLAGS( Flags, Flag )
66 void setFlags( QgsLayoutRenderContext::Flags flags );
83 QgsLayoutRenderContext::Flags flags()
const;
91 bool testFlag( Flag flag )
const;
96 QgsRenderContext::Flags renderContextFlags()
const;
103 void setDpi(
double dpi );
148 bool gridVisible()
const;
154 void setGridVisible(
bool visible );
160 bool boundingBoxesVisible()
const;
166 void setBoundingBoxesVisible(
bool visible );
174 void setPagesVisible(
bool visible );
216 return mTextRenderFormat;
227 mTextRenderFormat = format;
272 QStringList exportThemes()
const;
283 void setExportThemes(
const QStringList &themes );
291 void setPredefinedScales(
const QVector<qreal> &scales );
322 Flags mFlags = Flags();
326 int mCurrentExportLayer = -1;
328 QColor mSelectionColor = Qt::yellow;
332 bool mIsPreviewRender =
true;
333 bool mGridVisible =
false;
334 bool mBoundingBoxesVisible =
true;
335 bool mPagesVisible =
true;
339 QStringList mExportThemes;
343 QVector<qreal> mPredefinedScales;
346 friend class TestQgsLayout;
347 friend class LayoutContextPreviewSettingRestorer;
348 friend class TestQgsLayoutMap;
349 friend class TestQgsLayoutLabel;
355 #endif //QGSLAYOUTRENDERCONTEXT_H
This class contains information how to simplify geometries fetched from a vector layer.
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.
void predefinedScalesChanged()
Emitted when the list of predefined scales changes.
bool isPreviewRender() const
Returns true if the render current being conducted is a preview render, i.e.
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings to use when rendering vector layers.
QgsRenderContext::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
TextRenderFormat
Options for rendering text.
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.
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
QColor selectionColor() const
Gets color that is used for drawing of selected vector features.
void flagsChanged(QgsLayoutRenderContext::Flags flags)
Emitted whenever the context's flags change.
Handles rendering and exports of layouts to various formats.
bool pagesVisible() const
Returns whether the page items are be visible in the layout.
This class provides a method of converting QgsLayoutMeasurements from one unit to another.
QVector< qreal > predefinedScales() const
Returns the current list of predefined scales for use with the layout.
Flag
Flags for controlling how a layout is rendered.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
void setTextRenderFormat(QgsRenderContext::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
QgsLayoutMeasurementConverter & measurementConverter()
Returns the layout measurement converter to be used in the layout.
@ TextFormatAlwaysOutlines
Always render text using path objects (AKA outlines/curves).
Q_DECL_DEPRECATED void setCurrentExportLayer(int layer=-1)
Sets the current item layer to draw while exporting.
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.