| QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
    | 
This class provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts. More...
#include <qgslayoutpoint.h>
| Public Member Functions | |
| QgsLayoutPoint (double x, double y, Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters) | |
| Constructor for QgsLayoutPoint.  More... | |
| QgsLayoutPoint (Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters) | |
| Constructor for an empty point, where both x and y are set to 0.  More... | |
| QgsLayoutPoint (QPointF point, Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters) | |
| Constructor for QgsLayoutPoint.  More... | |
| QString | encodePoint () const | 
| Encodes the layout point to a string.  More... | |
| bool | isNull () const | 
| Tests whether the position is null, ie both its x and y coordinates are zero.  More... | |
| bool | operator!= (const QgsLayoutPoint &other) const | 
| QgsLayoutPoint | operator* (double v) const | 
| Multiplies the x and y by a scalar value.  More... | |
| QgsLayoutPoint | operator*= (double v) | 
| Multiplies the x and y by a scalar value.  More... | |
| QgsLayoutPoint | operator/ (double v) const | 
| Divides the x and y by a scalar value.  More... | |
| QgsLayoutPoint | operator/= (double v) | 
| Divides the x and y by a scalar value.  More... | |
| bool | operator== (const QgsLayoutPoint &other) const | 
| void | setPoint (const double x, const double y) | 
| Sets new x and y coordinates for the point.  More... | |
| void | setUnits (const Qgis::LayoutUnit units) | 
| Sets the units for the point.  More... | |
| void | setX (const double x) | 
| Sets the x coordinate of point.  More... | |
| void | setY (const double y) | 
| Sets y coordinate of point.  More... | |
| QPointF | toQPointF () const | 
| Converts the layout point to a QPointF.  More... | |
| Qgis::LayoutUnit | units () const | 
| Returns the units for the point.  More... | |
| double | x () const | 
| Returns x coordinate of point.  More... | |
| double | y () const | 
| Returns y coordinate of point.  More... | |
| Static Public Member Functions | |
| static QgsLayoutPoint | decodePoint (const QString &string) | 
| Decodes a point from a string.  More... | |
This class provides a method of storing points, consisting of an x and y coordinate, for use in QGIS layouts.
Measurement units are stored alongside the position.
Definition at line 39 of file qgslayoutpoint.h.
| QgsLayoutPoint::QgsLayoutPoint | ( | double | x, | 
| double | y, | ||
| Qgis::LayoutUnit | units = Qgis::LayoutUnit::Millimeters | ||
| ) | 
Constructor for QgsLayoutPoint.
Definition at line 24 of file qgslayoutpoint.cpp.
| 
 | explicit | 
Constructor for QgsLayoutPoint.
Definition at line 32 of file qgslayoutpoint.cpp.
| 
 | explicit | 
Constructor for an empty point, where both x and y are set to 0.
| units | units for measurement | 
Definition at line 40 of file qgslayoutpoint.cpp.
| 
 | static | 
Decodes a point from a string.
Definition at line 61 of file qgslayoutpoint.cpp.
| QString QgsLayoutPoint::encodePoint | ( | ) | const | 
Encodes the layout point to a string.
Definition at line 56 of file qgslayoutpoint.cpp.
| bool QgsLayoutPoint::isNull | ( | ) | const | 
Tests whether the position is null, ie both its x and y coordinates are zero.
true if point is null Definition at line 46 of file qgslayoutpoint.cpp.
| bool QgsLayoutPoint::operator!= | ( | const QgsLayoutPoint & | other | ) | const | 
Definition at line 76 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator* | ( | double | v | ) | const | 
Multiplies the x and y by a scalar value.
Definition at line 81 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator*= | ( | double | v | ) | 
Multiplies the x and y by a scalar value.
Definition at line 86 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator/ | ( | double | v | ) | const | 
Divides the x and y by a scalar value.
Definition at line 92 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator/= | ( | double | v | ) | 
Divides the x and y by a scalar value.
Definition at line 97 of file qgslayoutpoint.cpp.
| bool QgsLayoutPoint::operator== | ( | const QgsLayoutPoint & | other | ) | const | 
Definition at line 71 of file qgslayoutpoint.cpp.
| 
 | inline | 
Sets new x and y coordinates for the point.
Definition at line 65 of file qgslayoutpoint.h.
| 
 | inline | 
Sets the units for the point.
Does not alter the stored coordinates, ie. no conversion is done.
Definition at line 106 of file qgslayoutpoint.h.
| 
 | inline | 
| 
 | inline | 
| QPointF QgsLayoutPoint::toQPointF | ( | ) | const | 
Converts the layout point to a QPointF.
The unit information is discarded during this operation.
Definition at line 51 of file qgslayoutpoint.cpp.
| 
 | inline | 
| 
 | inline | 
| 
 | inline |