QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
Contains the configuration for a single snap guide used by a layout. More...
#include <qgslayoutguidecollection.h>
Signals | |
void | positionChanged () |
Emitted when the guide's position is changed. More... | |
Public Member Functions | |
QgsLayoutGuide (Qt::Orientation orientation, QgsLayoutMeasurement position, QgsLayoutItemPage *page) | |
Constructor for a new guide with the specified orientation and initial position. More... | |
~QgsLayoutGuide () override | |
QGraphicsLineItem * | item () |
Returns the guide's line item. More... | |
QgsLayout * | layout () const |
Returns the layout the guide belongs to. More... | |
double | layoutPosition () const |
Returns the guide's position in absolute layout units. More... | |
Qt::Orientation | orientation () const |
Returns the guide's orientation. More... | |
QgsLayoutItemPage * | page () |
Returns the page the guide is contained within. More... | |
QgsLayoutMeasurement | position () const |
Returns the guide's position within the page. More... | |
void | setLayout (QgsLayout *layout) |
Sets the layout the guide belongs to. More... | |
void | setLayoutPosition (double position) |
Sets the guide's position in absolute layout units. More... | |
void | setPage (QgsLayoutItemPage *page) |
Sets the page the guide is contained within. More... | |
void | setPosition (QgsLayoutMeasurement position) |
Sets the guide's position within the page. More... | |
void | update () |
Updates the position of the guide's line item. More... | |
Contains the configuration for a single snap guide used by a layout.
Definition at line 42 of file qgslayoutguidecollection.h.
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 30 of file qgslayoutguidecollection.cpp.
|
override |
Definition at line 37 of file qgslayoutguidecollection.cpp.
QGraphicsLineItem * QgsLayoutGuide::item | ( | ) |
Returns the guide's line item.
Definition at line 113 of file qgslayoutguidecollection.cpp.
QgsLayout * QgsLayoutGuide::layout | ( | ) | const |
Returns the layout the guide belongs to.
Definition at line 155 of file qgslayoutguidecollection.cpp.
double QgsLayoutGuide::layoutPosition | ( | ) | const |
Returns the guide's position in absolute layout units.
Definition at line 118 of file qgslayoutguidecollection.cpp.
Qt::Orientation QgsLayoutGuide::orientation | ( | ) | const |
Returns the guide's orientation.
Definition at line 181 of file qgslayoutguidecollection.cpp.
QgsLayoutItemPage * QgsLayoutGuide::page | ( | ) |
Returns the page the guide is contained within.
Definition at line 58 of file qgslayoutguidecollection.cpp.
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().
Definition at line 46 of file qgslayoutguidecollection.cpp.
|
signal |
Emitted when the guide's position is changed.
void QgsLayoutGuide::setLayout | ( | QgsLayout * | layout | ) |
Sets the layout the guide belongs to.
Definition at line 160 of file qgslayoutguidecollection.cpp.
void QgsLayoutGuide::setLayoutPosition | ( | double | position | ) |
Sets the guide's position in absolute layout units.
Definition at line 134 of file qgslayoutguidecollection.cpp.
void QgsLayoutGuide::setPage | ( | QgsLayoutItemPage * | page | ) |
Sets the page the guide is contained within.
Definition at line 63 of file qgslayoutguidecollection.cpp.
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().
Definition at line 51 of file qgslayoutguidecollection.cpp.
void QgsLayoutGuide::update | ( | ) |
Updates the position of the guide's line item.
Definition at line 69 of file qgslayoutguidecollection.cpp.