| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
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.   | |
| QgsLayoutPoint (Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters) | |
| Constructor for an empty point, where both x and y are set to 0.   | |
| QgsLayoutPoint (QPointF point, Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters) | |
| Constructor for QgsLayoutPoint.   | |
| QString | encodePoint () const | 
| Encodes the layout point to a string.   | |
| bool | isNull () const | 
| Tests whether the position is null, ie both its x and y coordinates are zero.   | |
| bool | operator!= (const QgsLayoutPoint &other) const | 
| QgsLayoutPoint | operator* (double v) const | 
| Multiplies the x and y by a scalar value.   | |
| QgsLayoutPoint | operator*= (double v) | 
| Multiplies the x and y by a scalar value.   | |
| QgsLayoutPoint | operator/ (double v) const | 
| Divides the x and y by a scalar value.   | |
| QgsLayoutPoint | operator/= (double v) | 
| Divides the x and y by a scalar value.   | |
| bool | operator== (const QgsLayoutPoint &other) const | 
| void | setPoint (const double x, const double y) | 
| Sets new x and y coordinates for the point.   | |
| void | setUnits (const Qgis::LayoutUnit units) | 
| Sets the units for the point.   | |
| void | setX (const double x) | 
| Sets the x coordinate of point.   | |
| void | setY (const double y) | 
| Sets y coordinate of point.   | |
| QPointF | toQPointF () const | 
| Converts the layout point to a QPointF.   | |
| Qgis::LayoutUnit | units () const | 
| Returns the units for the point.   | |
| double | x () const | 
| Returns x coordinate of point.   | |
| double | y () const | 
| Returns y coordinate of point.   | |
Static Public Member Functions | |
| static QgsLayoutPoint | decodePoint (const QString &string) | 
| Decodes a point from a string.   | |
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 41 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 34 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 42 of file qgslayoutpoint.cpp.
      
  | 
  static | 
Decodes a point from a string.
Definition at line 63 of file qgslayoutpoint.cpp.
| QString QgsLayoutPoint::encodePoint | ( | ) | const | 
Encodes the layout point to a string.
Definition at line 58 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 48 of file qgslayoutpoint.cpp.
| bool QgsLayoutPoint::operator!= | ( | const QgsLayoutPoint & | other | ) | const | 
Definition at line 87 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator* | ( | double | v | ) | const | 
Multiplies the x and y by a scalar value.
Definition at line 92 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator*= | ( | double | v | ) | 
Multiplies the x and y by a scalar value.
Definition at line 97 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator/ | ( | double | v | ) | const | 
Divides the x and y by a scalar value.
Definition at line 103 of file qgslayoutpoint.cpp.
| QgsLayoutPoint QgsLayoutPoint::operator/= | ( | double | v | ) | 
Divides the x and y by a scalar value.
Definition at line 108 of file qgslayoutpoint.cpp.
| bool QgsLayoutPoint::operator== | ( | const QgsLayoutPoint & | other | ) | const | 
Definition at line 82 of file qgslayoutpoint.cpp.
      
  | 
  inline | 
Sets new x and y coordinates for the point.
Definition at line 67 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 120 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 53 of file qgslayoutpoint.cpp.
      
  | 
  inline | 
Returns the units for the point.
Definition at line 113 of file qgslayoutpoint.h.
      
  | 
  inline | 
      
  | 
  inline |