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,
50 Q_DECLARE_FLAGS( Flags,
Flag )
88 bool testFlag(
Flag flag ) const;
100 void setDpi(
double dpi );
113 void setSelectionColor( const QColor &color ) { mSelectionColor = color; }
145 bool gridVisible()
const;
151 void setGridVisible(
bool visible );
157 bool boundingBoxesVisible()
const;
163 void setBoundingBoxesVisible(
bool visible );
171 void setPagesVisible(
bool visible );
211 return mTextRenderFormat;
222 mTextRenderFormat = format;
231 void flagsChanged( QgsLayoutRenderContext::Flags flags );
240 Flags mFlags =
nullptr;
244 int mCurrentExportLayer = -1;
246 QColor mSelectionColor = Qt::yellow;
250 bool mIsPreviewRender =
true;
251 bool mGridVisible =
false;
252 bool mBoundingBoxesVisible =
true;
253 bool mPagesVisible =
true;
258 friend class TestQgsLayout;
259 friend class LayoutContextPreviewSettingRestorer;
260 friend class TestQgsLayoutLabel;
265 #endif //QGSLAYOUTRENDERCONTEXT_H
bool pagesVisible() const
Returns whether the page items are be visible in the layout.
Flag
Flags for controlling how a layout is rendered.
QgsRenderContext::TextRenderFormat textRenderFormat() const
Returns the text render format, which dictates how text is rendered (e.g.
const QgsLayoutMeasurementConverter & measurementConverter() const
Returns the layout measurement converter to be used in the layout.
Q_DECLARE_METATYPE(QModelIndex)
void setTextRenderFormat(QgsRenderContext::TextRenderFormat format)
Sets the text render format, which dictates how text is rendered (e.g.
Always render text using path objects (AKA outlines/curves).
QgsLayoutMeasurementConverter & measurementConverter()
Returns the layout measurement converter to be used in the layout.
Base class for layouts, which can contain items such as maps, labels, scalebars, etc.
TextRenderFormat
Options for rendering text.
Handles rendering and exports of layouts to various formats.
QColor selectionColor() const
Gets color that is used for drawing of selected vector features.
Contains information about the context of a rendering operation.
This class provides a method of converting QgsLayoutMeasurements from one unit to another...
void setCurrentExportLayer(int layer=-1)
Sets 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.
Stores information relating to the current rendering settings for a layout.
int currentExportLayer() const
Returns the current item layer to draw while exporting.