Class: QgsLayoutItemPage

class qgis.core.QgsLayoutItemPage(layout: QgsLayout)

Bases: qgis._core.QgsLayoutItem

Constructor for QgsLayoutItemPage, with the specified parent layout.

Item representing the paper in a layout.

Landscape = 1
class Orientation

Bases: int

Portrait = 0
class UndoCommand

Bases: int

UndoPageSymbol = 3000
adjustPointForReferencePosition()
applyDataDefinedSize()
applyItemSizeConstraint()
attemptResize(self, size: QgsLayoutSize, includesFrame: bool = False)
boundingRect(self) → QRectF
childEvent()
connectNotify()
contextMenuEvent()
create(layout: QgsLayout) → QgsLayoutItemPage

Returns a new page item for the specified layout.

The caller takes responsibility for deleting the returned object.

createCommand(self, text: str, id: int, parent: QUndoCommand = None) → QgsAbstractLayoutUndoCommand
customEvent()
decodePageOrientation(string: str) → Tuple[QgsLayoutItemPage.Orientation, bool]

Decodes a string representing a page orientation. If specified, ok will be set to True if string could be successfully interpreted as a page orientation.

disconnectNotify()
displayName(self) → str
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
draw(self, context: QgsLayoutItemRenderContext)
drawBackground(self, context: QgsRenderContext)
drawDebugRect()
drawFrame(self, context: QgsRenderContext)
dropEvent()
exportLayerBehavior(self) → QgsLayoutItem.ExportLayerBehavior
focusInEvent()
focusOutEvent()
hoverEnterEvent()
hoverLeaveEvent()
hoverMoveEvent()
inputMethodEvent()
inputMethodQuery()
isSignalConnected()
itemChange()
keyPressEvent()
keyReleaseEvent()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
orientation(self) → QgsLayoutItemPage.Orientation

Returns the page orientation.

Note

There is no direct setter for page orientation - use setPageSize() instead.

pageSize(self) → QgsLayoutSize

Returns the size of the page.

See also

setPageSize()

positionAtReferencePoint()
prepareGeometryChange()
readObjectPropertiesFromElement()
readPropertiesFromElement()
receivers()
redraw(self)
refreshBackgroundColor()
refreshBlendMode()
refreshFrame()
refreshItemPosition()
refreshItemRotation()
refreshItemSize()
refreshOpacity()
sceneEvent()
sceneEventFilter()
sender()
senderSignalIndex()
setFixedSize()
setMinimumSize()
setPageSize(self, size: QgsLayoutSize)

Sets the size of the page.

See also

pageSize()

setPageSize(self, size: str, orientation: QgsLayoutItemPage.Orientation = QgsLayoutItemPage.Portrait) -> bool Sets the page size to a known page size, e.g. “A4” and orientation. The known page sizes are managed by QgsPageSizeRegistry. Valid page sizes can be retrieved via QgsPageSizeRegistry.entries() The function returns True if size was a valid page size and the page size was changed. If False is returned then size could not be matched to a known page size.

See also

pageSize()

timerEvent()
topLeftToReferencePoint()
type(self) → int
updateMicroFocus()
wheelEvent()
writeObjectPropertiesToElement()
writePropertiesToElement()