Class: QgsLayoutItemPage¶
-
class
qgis.core.
QgsLayoutItemPage
(layout: QgsLayout)¶ Bases:
QgsLayoutItem
Constructor for
QgsLayoutItemPage
, with the specified parentlayout
.Item representing the paper in a layout.
New in version 3.0.
- Parameters
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)¶ - Parameters
size (QgsLayoutSize) –
includesFrame (bool = False) –
-
boundingRect
(self) → QRectF¶ - Return type
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.
- Parameters
layout (QgsLayout) –
- Return type
-
createCommand
(self, text: str, id: int, parent: QUndoCommand = None) → QgsAbstractLayoutUndoCommand¶ - Parameters
text (str) –
id (int) –
parent (QUndoCommand = None) –
- Return type
-
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.- Parameters
string (str) –
- Return type
Tuple[QgsLayoutItemPage.Orientation, bool]
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
draw
(self, context: QgsLayoutItemRenderContext)¶ - Parameters
context (QgsLayoutItemRenderContext) –
-
drawBackground
(self, context: QgsRenderContext)¶ - Parameters
context (QgsRenderContext) –
-
drawDebugRect
()¶
-
drawFrame
(self, context: QgsRenderContext)¶ - Parameters
context (QgsRenderContext) –
-
dropEvent
()¶
-
focusInEvent
()¶
-
focusOutEvent
()¶
-
hoverEnterEvent
()¶
-
hoverLeaveEvent
()¶
-
hoverMoveEvent
()¶
-
inputMethodEvent
()¶
-
inputMethodQuery
()¶
-
isSignalConnected
()¶
-
itemChange
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
orientation
(self) → QgsLayoutItemPage.Orientation¶ Returns the page orientiation.
Note
There is no direct setter for page orientation - use setPageSize() instead.
- Return type
-
pageSize
(self) → QgsLayoutSize¶ Returns the size of the page.
See also
- Return type
-
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
setPageSize(self, size: str, orientation: QgsLayoutItemPage.Orientation = QgsLayoutItemPage.Portrait) -> bool Sets the page size to a known page
size
, e.g. “A4” andorientation
. The known page sizes are managed byQgsPageSizeRegistry
. Valid page sizes can be retrieved viaQgsPageSizeRegistry.entries()
The function returns true ifsize
was a valid page size and the page size was changed. If false is returned thensize
could not be matched to a known page size.See also
- Parameters
size (QgsLayoutSize) –
-
timerEvent
()¶
-
topLeftToReferencePoint
()¶
-
type
(self) → int¶ - Return type
int
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-
writeObjectPropertiesToElement
()¶
-
writePropertiesToElement
()¶