Subgroup: Layout
Class: QgsLayoutAtlas¶
-
class
qgis.core.
QgsLayoutAtlas
¶ Bases:
PyQt5.QtCore.QObject
,qgis._core.QgsAbstractLayoutIterator
,qgis._core.QgsLayoutSerializableObject
Class used to render an Atlas, iterating over geometry features. prepareForFeature() modifies the atlas map’s extent to zoom on the given feature. This class is used for printing, exporting to PDF and images.
Note
This class should not be created directly. For the atlas to function correctly the atlasComposition() property for QgsComposition should be used to retrieve a QgsLayoutAtlas which is automatically created and attached to the composition.
New in version 3.0: Methods
beginRender
blockSignals
childEvent
children
connectNotify
count
coverageLayer
Returns the coverage layer used for the atlas features. createCommand
currentFeatureNumber
Returns the current feature number, where a value of 0 corresponds to the first feature. currentFilename
Returns the current feature filename. customEvent
deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
enabled
Returns whether the atlas generation is enabled endRender
event
eventFilter
filePath
filenameExpression
Returns the filename expression used for generating output filenames for each atlas page. filterExpression
Returns the expression used for filtering features in the coverage layer. filterFeatures
Returns true if features should be filtered in the coverage layer. 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] first
Seeks to the first feature, returning false if no feature was found. hideCoverage
Returns true if the atlas is set to hide the coverage layer. inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
last
Seeks to the last feature, returning false if no feature was found. layout
metaObject
moveToThread
nameForPage
Returns the calculated name for a specified atlas page
number.next
objectName
pageNameExpression
Returns the expression (or field name) used for calculating the page name. parent
previous
Iterates to the previous feature, returning false if no previous feature exists. property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. readXml
receivers
refreshCurrentFeature
Refreshes the current atlas feature, by refetching its attributes from the vector layer provider removeEventFilter
seekTo
Seeks to the specified feature
number.sender
senderSignalIndex
setCoverageLayer
Sets the coverage layer
to use for the atlas features.setEnabled
Sets whether the atlas is enabled
.setFilenameExpression
Sets the filename expression
used for generating output filenames for each atlas page.setFilterExpression
Sets the expression
used for filtering features in the coverage layer.setFilterFeatures
Sets whether features should be filtered
in the coverage layer.setHideCoverage
Sets whether the coverage layer should be hidden in map items in the layouts. setObjectName
setPageNameExpression
Sets the expression
(or field name) used for calculating the page name.setParent
setProperty
setSortAscending
Sets whether features should be sorted in an ascending order. setSortExpression
Sets the expression
(or field name) to use for sorting features.setSortFeatures
Sets whether features should be sorted in the atlas. signalsBlocked
sortAscending
Returns true if features should be sorted in an ascending order. sortExpression
Returns the expression (or field name) to use for sorting features. sortFeatures
Returns true if features should be sorted in the atlas. startTimer
stringType
thread
timerEvent
tr
updateFeatures
Requeries the current atlas coverage layer and applies filtering and sorting. writeXml
Attributes
changed
Emitted when one of the atlas parameters changes. coverageLayerChanged
Emitted when the coverage layer for the atlas changes. destroyed
destroyed(self, QObject = None) [signal] featureChanged
Is emitted when the current atlas feature
changes.messagePushed
Is emitted when the atlas has an updated status bar message
.numberFeaturesChanged
Emitted when the number of features for the atlas changes. objectNameChanged
objectNameChanged(self, str) [signal] renderBegun
Emitted when atlas rendering has begun. renderEnded
Emitted when atlas rendering has ended. staticMetaObject
toggled
Emitted when atlas is enabled or disabled. -
beginRender
(self) → bool¶
-
changed
¶ Emitted when one of the atlas parameters changes. [signal]
-
childEvent
()¶
-
connectNotify
()¶
-
count
(self) → int¶
-
coverageLayer
(self) → QgsVectorLayer¶ Returns the coverage layer used for the atlas features.
See also
-
coverageLayerChanged
¶ Emitted when the coverage layer for the atlas changes. [signal]
-
currentFeatureNumber
(self) → int¶ Returns the current feature number, where a value of 0 corresponds to the first feature.
-
currentFilename
(self) → str¶ Returns the current feature filename.
See also
See also
-
customEvent
()¶
-
disconnectNotify
()¶
-
enabled
(self) → bool¶ Returns whether the atlas generation is enabled
See also
-
endRender
(self) → bool¶
-
featureChanged
¶ Is emitted when the current atlas
feature
changes. [signal]
-
filePath
(self, baseFilePath: str, extension: str) → str¶
-
filenameExpression
(self) → str¶ Returns the filename expression used for generating output filenames for each atlas page.
See also
See also
-
filterExpression
(self) → str¶ Returns the expression used for filtering features in the coverage layer.
This property has no effect is filterFeatures() is false.
See also
See also
-
filterFeatures
(self) → bool¶ Returns true if features should be filtered in the coverage layer.
See also
See also
-
first
(self) → bool¶ Seeks to the first feature, returning false if no feature was found.
See also
See also
See also
See also
-
hideCoverage
(self) → bool¶ Returns true if the atlas is set to hide the coverage layer.
See also
-
isSignalConnected
()¶
-
last
(self) → bool¶ Seeks to the last feature, returning false if no feature was found.
See also
See also
See also
See also
-
layout
(self) → QgsLayout¶
-
messagePushed
¶ Is emitted when the atlas has an updated status bar
message
. [signal]
-
nameForPage
(self, page: int) → str¶ Returns the calculated name for a specified atlas
page
number. Page numbers start at 0.See also
-
next
(self) → bool¶
-
numberFeaturesChanged
¶ Emitted when the number of features for the atlas changes. [signal]
-
pageNameExpression
(self) → str¶ Returns the expression (or field name) used for calculating the page name.
See also
See also
-
previous
(self) → bool¶ Iterates to the previous feature, returning false if no previous feature exists.
See also
See also
See also
See also
-
readXml
(self, element: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool¶
-
receivers
()¶
-
refreshCurrentFeature
(self)¶ Refreshes the current atlas feature, by refetching its attributes from the vector layer provider
-
renderBegun
¶ Emitted when atlas rendering has begun. [signal]
-
renderEnded
¶ Emitted when atlas rendering has ended. [signal]
-
seekTo
(self, feature: int) → bool¶ Seeks to the specified
feature
number.See also
See also
See also
See also
seekTo(self, feature: QgsFeature) -> bool Seeks to the specified
feature
.See also
See also
See also
See also
-
sender
()¶
-
senderSignalIndex
()¶
-
setCoverageLayer
(self, layer: QgsVectorLayer)¶ Sets the coverage
layer
to use for the atlas features.See also
-
setFilenameExpression
(self, expression: str) → Tuple[bool, str]¶ Sets the filename
expression
used for generating output filenames for each atlas page. If an invalid expression is passed, false will be returned anderrorString
will be set to the expression error.See also
See also
-
setFilterExpression
(self, expression: str) → Tuple[bool, str]¶ Sets the
expression
used for filtering features in the coverage layer.This property has no effect is filterFeatures() is false.
If an invalid expression is passed, false will be returned and
errorString
will be set to the expression error.See also
See also
-
setFilterFeatures
(self, filtered: bool)¶ Sets whether features should be
filtered
in the coverage layer.See also
See also
-
setHideCoverage
(self, hide: bool)¶ Sets whether the coverage layer should be hidden in map items in the layouts.
See also
-
setPageNameExpression
(self, expression: str)¶ Sets the
expression
(or field name) used for calculating the page name.See also
-
setSortAscending
(self, ascending: bool)¶ Sets whether features should be sorted in an ascending order.
This property has no effect is sortFeatures() is false.
See also
See also
See also
-
setSortExpression
(self, expression: str)¶ Sets the
expression
(or field name) to use for sorting features.This property has no effect is sortFeatures() is false.
See also
See also
See also
-
setSortFeatures
(self, enabled: bool)¶ Sets whether features should be sorted in the atlas.
See also
See also
See also
-
sortAscending
(self) → bool¶ Returns true if features should be sorted in an ascending order.
This property has no effect is sortFeatures() is false.
See also
See also
See also
-
sortExpression
(self) → str¶ Returns the expression (or field name) to use for sorting features.
This property has no effect is sortFeatures() is false.
See also
See also
See also
-
sortFeatures
(self) → bool¶ Returns true if features should be sorted in the atlas.
See also
See also
See also
-
stringType
(self) → str¶
-
timerEvent
()¶
-
toggled
¶ Emitted when atlas is enabled or disabled. [signal]
-
updateFeatures
(self) → int¶ Requeries the current atlas coverage layer and applies filtering and sorting. Returns number of matching features.
-
writeXml
(self, parentElement: QDomElement, document: QDomDocument, context: QgsReadWriteContext) → bool¶
-