Subgroup: Layout
Class: QgsLayoutRenderContext¶
-
class
qgis.core.
QgsLayoutRenderContext
¶ Bases:
PyQt5.QtCore.QObject
Stores information relating to the current rendering settings for a layout.
New in version 3.0: Methods
blockSignals
boundingBoxesVisible
Returns true if the item bounding boxes should be drawn. childEvent
children
connectNotify
currentExportLayer
Returns the current item layer to draw while exporting. customEvent
deleteLater
disconnect
disconnectNotify
dpi
Returns the dpi
for outputting the layout.dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] flags
Returns the current combination of flags used for rendering the layout. gridVisible
Returns true if the page grid should be drawn. inherits
installEventFilter
isPreviewRender
Returns true if the render current being conducted is a preview render, i.e. isSignalConnected
isWidgetType
isWindowType
killTimer
measurementConverter
Returns the layout measurement converter to be used in the layout. metaObject
moveToThread
objectName
pagesVisible
Returns whether the page items are be visible in the layout. parent
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
renderContextFlags
Returns the combination of render context flags matched to the layout context’s settings. sender
senderSignalIndex
setBoundingBoxesVisible
Sets whether the item bounding boxes should be visible
.setCurrentExportLayer
Sets the current item layer
to draw while exporting.setDpi
Sets the dpi
for outputting the layout.setFlag
Enables or disables a particular rendering flag
for the layout.setFlags
Sets the combination of flags
that will be used for rendering the layout.setGridVisible
Sets whether the page grid should be visible
.setObjectName
setPagesVisible
Sets whether the page items should be visible
in the layout.setParent
setProperty
signalsBlocked
startTimer
testFlag
Check whether a particular rendering flag
is enabled for the layout.thread
timerEvent
tr
Attributes
FlagAntialiasing
FlagDebug
FlagForceVectorOutput
FlagHideCoverageLayer
FlagOutlineOnly
FlagUseAdvancedEffects
destroyed
destroyed(self, QObject = None) [signal] dpiChanged
Emitted when the context’s DPI is changed. flagsChanged
Emitted whenever the context’s flags
change.objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
-
class
Flag
¶ Bases:
int
-
FlagAntialiasing
= 8¶
-
FlagDebug
= 2¶
-
FlagForceVectorOutput
= 32¶
-
FlagHideCoverageLayer
= 64¶
-
FlagOutlineOnly
= 4¶
-
FlagUseAdvancedEffects
= 16¶
-
class
Flags
¶ Bases:
sip.wrapper
QgsLayoutRenderContext.Flags(Union[QgsLayoutRenderContext.Flags, QgsLayoutRenderContext.Flag]) QgsLayoutRenderContext.Flags(QgsLayoutRenderContext.Flags)
-
boundingBoxesVisible
(self) → bool¶ Returns true if the item bounding boxes should be drawn.
See also
-
childEvent
()¶
-
connectNotify
()¶
-
currentExportLayer
(self) → int¶ Returns the current item layer to draw while exporting. QgsLayoutItem subclasses which support multi-layer SVG exports must check this and customise their rendering based on the layer.
If
layer
is -1, all item layers should be rendered.See also
-
customEvent
()¶
-
disconnectNotify
()¶
-
dpiChanged
¶ Emitted when the context’s DPI is changed. [signal]
-
flags
(self) → QgsLayoutRenderContext.Flags¶ Returns the current combination of flags used for rendering the layout.
See also
See also
See also
-
flagsChanged
¶ Emitted whenever the context’s
flags
change.See also
setFlags()
[signal]
-
gridVisible
(self) → bool¶ Returns true if the page grid should be drawn.
See also
-
isPreviewRender
(self) → bool¶ Returns true if the render current being conducted is a preview render, i.e. it is being rendered inside a QGraphicsView widget as opposed to a destination device (such as an image).
-
isSignalConnected
()¶
-
measurementConverter
(self) → QgsLayoutMeasurementConverter¶ Returns the layout measurement converter to be used in the layout. This converter is used for translating between other measurement units and the layout’s native unit.
-
pagesVisible
(self) → bool¶ Returns whether the page items are be visible in the layout. This setting effects both display of the page boundaries in layout views and whether they will be rendered in layout exports.
See also
-
receivers
()¶
-
renderContextFlags
(self) → QgsRenderContext.Flags¶ Returns the combination of render context flags matched to the layout context’s settings.
-
sender
()¶
-
senderSignalIndex
()¶
-
setBoundingBoxesVisible
(self, visible: bool)¶ Sets whether the item bounding boxes should be
visible
.See also
-
setCurrentExportLayer
(self, layer: int = -1)¶ Sets the current item
layer
to draw while exporting. QgsLayoutItem subclasses which support multi-layer SVG exports must check the currentExportLayer() and customise their rendering based on the layer.If
layer
is -1, all item layers will be rendered.See also
-
setDpi
(self, dpi: float)¶ Sets the
dpi
for outputting the layout. This also sets the corresponding DPI for the context’s measurementConverter().See also
-
setFlag
(self, flag: QgsLayoutRenderContext.Flag, on: bool = True)¶ Enables or disables a particular rendering
flag
for the layout. Other existing flags are not affected.See also
See also
See also
-
setFlags
(self, flags: Union[QgsLayoutRenderContext.Flags, QgsLayoutRenderContext.Flag])¶ Sets the combination of
flags
that will be used for rendering the layout.See also
See also
See also
-
setGridVisible
(self, visible: bool)¶ Sets whether the page grid should be
visible
.See also
-
setPagesVisible
(self, visible: bool)¶ Sets whether the page items should be
visible
in the layout. Removing them will prevent both display of the page boundaries in layout views and will also prevent them from being rendered in layout exports.See also
-
testFlag
(self, flag: QgsLayoutRenderContext.Flag) → bool¶ Check whether a particular rendering
flag
is enabled for the layout.See also
See also
See also
-
timerEvent
()¶
-
class