QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsLayoutGuide Class Reference

Contains the configuration for a single snap guide used by a layout. More...

#include <qgslayoutguidecollection.h>

Inheritance diagram for QgsLayoutGuide:

Signals

void positionChanged ()
 Emitted when the guide's position is changed.

Public Member Functions

 QgsLayoutGuide (Qt::Orientation orientation, QgsLayoutMeasurement position, QgsLayoutItemPage *page)
 Constructor for a new guide with the specified orientation and initial position.
 ~QgsLayoutGuide () override
QGraphicsLineItem * item ()
 Returns the guide's line item.
QgsLayoutlayout () const
 Returns the layout the guide belongs to.
double layoutPosition () const
 Returns the guide's position in absolute layout units.
Qt::Orientation orientation () const
 Returns the guide's orientation.
QgsLayoutItemPagepage ()
 Returns the page the guide is contained within.
QgsLayoutMeasurement position () const
 Returns the guide's position within the page.
void setLayout (QgsLayout *layout)
 Sets the layout the guide belongs to.
void setLayoutPosition (double position)
 Sets the guide's position in absolute layout units.
void setPage (QgsLayoutItemPage *page)
 Sets the page the guide is contained within.
void setPosition (QgsLayoutMeasurement position)
 Sets the guide's position within the page.
void update ()
 Updates the position of the guide's line item.

Detailed Description

Contains the configuration for a single snap guide used by a layout.

Definition at line 43 of file qgslayoutguidecollection.h.

Constructor & Destructor Documentation

◆ QgsLayoutGuide()

QgsLayoutGuide::QgsLayoutGuide ( Qt::Orientation orientation,
QgsLayoutMeasurement position,
QgsLayoutItemPage * page )

Constructor for a new guide with the specified orientation and initial position.

A layout must be set by calling setLayout() before the guide can be used. Adding the guide to a QgsLayoutGuideCollection will automatically set the corresponding layout for you.

Definition at line 33 of file qgslayoutguidecollection.cpp.

◆ ~QgsLayoutGuide()

QgsLayoutGuide::~QgsLayoutGuide ( )
override

Definition at line 40 of file qgslayoutguidecollection.cpp.

Member Function Documentation

◆ item()

QGraphicsLineItem * QgsLayoutGuide::item ( )

Returns the guide's line item.

Definition at line 116 of file qgslayoutguidecollection.cpp.

◆ layout()

QgsLayout * QgsLayoutGuide::layout ( ) const

Returns the layout the guide belongs to.

See also
setLayout()

Definition at line 158 of file qgslayoutguidecollection.cpp.

◆ layoutPosition()

double QgsLayoutGuide::layoutPosition ( ) const

Returns the guide's position in absolute layout units.

See also
setLayoutPosition()

Definition at line 121 of file qgslayoutguidecollection.cpp.

◆ orientation()

Qt::Orientation QgsLayoutGuide::orientation ( ) const

Returns the guide's orientation.

Definition at line 184 of file qgslayoutguidecollection.cpp.

◆ page()

QgsLayoutItemPage * QgsLayoutGuide::page ( )

Returns the page the guide is contained within.

See also
setPage()

Definition at line 61 of file qgslayoutguidecollection.cpp.

◆ position()

QgsLayoutMeasurement QgsLayoutGuide::position ( ) const

Returns the guide's position within the page.

The position indicates either the horizontal or vertical position of the guide, depending on the guide's orientation().

See also
setPosition()

Definition at line 49 of file qgslayoutguidecollection.cpp.

◆ positionChanged

void QgsLayoutGuide::positionChanged ( )
signal

Emitted when the guide's position is changed.

◆ setLayout()

void QgsLayoutGuide::setLayout ( QgsLayout * layout)

Sets the layout the guide belongs to.

Note
Adding the guide to a QgsLayoutGuideCollection will automatically set the corresponding layout for you.
See also
layout()

Definition at line 163 of file qgslayoutguidecollection.cpp.

◆ setLayoutPosition()

void QgsLayoutGuide::setLayoutPosition ( double position)

Sets the guide's position in absolute layout units.

See also
layoutPosition()

Definition at line 137 of file qgslayoutguidecollection.cpp.

◆ setPage()

void QgsLayoutGuide::setPage ( QgsLayoutItemPage * page)

Sets the page the guide is contained within.

See also
page()

Definition at line 66 of file qgslayoutguidecollection.cpp.

◆ setPosition()

void QgsLayoutGuide::setPosition ( QgsLayoutMeasurement position)

Sets the guide's position within the page.

The position argument indicates either the horizontal or vertical position of the guide, depending on the guide's orientation().

See also
position()

Definition at line 54 of file qgslayoutguidecollection.cpp.

◆ update()

void QgsLayoutGuide::update ( )

Updates the position of the guide's line item.

Definition at line 72 of file qgslayoutguidecollection.cpp.


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