QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
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,
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 = Flags();
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
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.
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.
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.