QGIS API Documentation  3.6.0-Noosa (5873452)
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, DistributeRight, DistributeTop,
  DistributeVCenter, 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. More...
 
static void distributeItems (QgsLayout *layout, const QList< QgsLayoutItem * > &items, Distribution distribution)
 Distributes a set of items from a layout in place. More...
 
static void resizeItems (QgsLayout *layout, const QList< QgsLayoutItem * > &items, Resize resize)
 Resizes a set of items from a layout in place. More...
 

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.

Since
QGIS 3.0

Definition at line 36 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 42 of file qgslayoutaligner.h.

◆ Distribution

Distribution options.

Enumerator
DistributeLeft 

Distribute left edges.

DistributeHCenter 

Distribute horizontal centers.

DistributeRight 

Distribute right edges.

DistributeTop 

Distribute top edges.

DistributeVCenter 

Distribute vertical centers.

DistributeBottom 

Distribute bottom edges.

Definition at line 53 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 64 of file qgslayoutaligner.h.

Member Function Documentation

◆ alignItems()

void QgsLayoutAligner::alignItems ( QgsLayout layout,
const QList< QgsLayoutItem * > &  items,
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,
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,
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 180 of file qgslayoutaligner.cpp.


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