Class: QgsLayoutAligner

class qgis.core.QgsLayoutAligner

Bases: sip.wrapper

Handles aligning and distributing sets of layout items.

QgsLayoutAligner contains methods for automatically aligning and distributing sets of layout items, e.g. aligning a group of items to top or left sides.

New in version 3.0: Methods

alignItems Aligns a set of items from a layout in place.
distributeItems Distributes a set of items from a layout in place.
resizeItems Resizes a set of items from a layout in place.

Signals

Attributes

AlignBottom
AlignHCenter
AlignLeft
AlignRight
AlignTop
AlignVCenter
DistributeBottom
DistributeHCenter
DistributeLeft
DistributeRight
DistributeTop
DistributeVCenter
ResizeNarrowest
ResizeShortest
ResizeTallest
ResizeToSquare
ResizeWidest
AlignBottom = 5
AlignHCenter = 1
AlignLeft = 0
AlignRight = 2
AlignTop = 3
AlignVCenter = 4
class Alignment

Bases: int

DistributeBottom = 5
DistributeHCenter = 1
DistributeLeft = 0
DistributeRight = 2
DistributeTop = 3
DistributeVCenter = 4
class Distribution

Bases: int

class Resize

Bases: int

ResizeNarrowest = 0
ResizeShortest = 2
ResizeTallest = 3
ResizeToSquare = 4
ResizeWidest = 1
alignItems(layout: QgsLayout, items: object, alignment: QgsLayoutAligner.Alignment)

Aligns a set of items from a layout in place.

The alignment argument specifies the method to use when aligning the items.

distributeItems(layout: QgsLayout, items: Iterable[QgsLayoutItem], distribution: QgsLayoutAligner.Distribution)

Distributes a set of items from a layout in place.

The distribution argument specifies the method to use when distributing the items.

resizeItems(layout: QgsLayout, items: Iterable[QgsLayoutItem], resize: QgsLayoutAligner.Resize)

Resizes a set of items from a layout in place.

The resize argument specifies the method to use when resizing the items.