QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
QgsLayoutAligner Class Reference

Handles aligning and distributing sets of layout items. More...

#include <qgslayoutaligner.h>

Public Types

enum  Alignment {
  AlignLeft , AlignHCenter , AlignRight , AlignTop ,
  AlignVCenter , AlignBottom
}
 Alignment options. More...
 
enum  Distribution {
  DistributeLeft , DistributeHCenter , DistributeHSpace , DistributeRight ,
  DistributeTop , DistributeVCenter , DistributeVSpace , DistributeBottom
}
 Distribution options. More...
 
enum  Resize {
  ResizeNarrowest , ResizeWidest , ResizeShortest , ResizeTallest ,
  ResizeToSquare
}
 Resize options. More...
 

Static Public Member Functions

static void alignItems (QgsLayout *layout, const QList< QgsLayoutItem * > &items, Alignment alignment)
 Aligns a set of items from a layout in place.
 
static void distributeItems (QgsLayout *layout, const QList< QgsLayoutItem * > &items, Distribution distribution)
 Distributes a set of items from a layout in place.
 
static void resizeItems (QgsLayout *layout, const QList< QgsLayoutItem * > &items, Resize resize)
 Resizes a set of items from a layout in place.
 

Detailed Description

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.

Definition at line 35 of file qgslayoutaligner.h.

Member Enumeration Documentation

◆ Alignment

Alignment options.

Enumerator
AlignLeft 

Align left edges.

AlignHCenter 

Align horizontal centers.

AlignRight 

Align right edges.

AlignTop 

Align top edges.

AlignVCenter 

Align vertical centers.

AlignBottom 

Align bottom edges.

Definition at line 41 of file qgslayoutaligner.h.

◆ Distribution

Distribution options.

Enumerator
DistributeLeft 

Distribute left edges.

DistributeHCenter 

Distribute horizontal centers.

DistributeHSpace 

Distribute horizontal equispaced.

DistributeRight 

Distribute right edges.

DistributeTop 

Distribute top edges.

DistributeVCenter 

Distribute vertical centers.

DistributeVSpace 

Distribute vertical equispaced.

DistributeBottom 

Distribute bottom edges.

Definition at line 52 of file qgslayoutaligner.h.

◆ Resize

Resize options.

Enumerator
ResizeNarrowest 

Resize width to match narrowest width.

ResizeWidest 

Resize width to match widest width.

ResizeShortest 

Resize height to match shortest height.

ResizeTallest 

Resize height to match tallest height.

ResizeToSquare 

Resize items to square.

Definition at line 65 of file qgslayoutaligner.h.

Member Function Documentation

◆ alignItems()

void QgsLayoutAligner::alignItems ( QgsLayout layout,
const QList< QgsLayoutItem * > &  items,
QgsLayoutAligner::Alignment  alignment 
)
static

Aligns a set of items from a layout in place.

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

Definition at line 22 of file qgslayoutaligner.cpp.

◆ distributeItems()

void QgsLayoutAligner::distributeItems ( QgsLayout layout,
const QList< QgsLayoutItem * > &  items,
QgsLayoutAligner::Distribution  distribution 
)
static

Distributes a set of items from a layout in place.

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

Definition at line 95 of file qgslayoutaligner.cpp.

◆ resizeItems()

void QgsLayoutAligner::resizeItems ( QgsLayout layout,
const QList< QgsLayoutItem * > &  items,
QgsLayoutAligner::Resize  resize 
)
static

Resizes a set of items from a layout in place.

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

Definition at line 195 of file qgslayoutaligner.cpp.


The documentation for this class was generated from the following files: