QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
21 #include <QStringList>
52 return QPointF( mX, mY );
62 QStringList parts =
string.split(
',' );
63 if ( parts.count() != 3 )
77 return ( !
operator==( other ) );
QgsLayoutPoint operator*(double v) const
Multiplies the x and y by a scalar value.
QgsLayoutPoint operator/(double v) const
Divides the x and y by a scalar value.
LayoutUnit
Layout measurement units.
QgsLayoutPoint(double x, double y, QgsUnitTypes::LayoutUnit units=QgsUnitTypes::LayoutMillimeters)
Constructor for QgsLayoutPoint.
double y() const
Returns y coordinate of point.
bool isNull() const
Tests whether the position is null, ie both its x and y coordinates are zero.
bool operator==(const QgsLayoutPoint &other) const
static Q_INVOKABLE QString encodeUnit(QgsUnitTypes::DistanceUnit unit)
Encodes a distance unit to a string.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference)
bool operator!=(const QgsLayoutPoint &other) const
QgsLayoutPoint operator/=(double v)
Divides the x and y by a scalar value.
QgsLayoutPoint operator*=(double v)
Multiplies the x and y by a scalar value.
QPointF toQPointF() const
Converts the layout point to a QPointF.
static QgsLayoutPoint decodePoint(const QString &string)
Decodes a point from a string.
This class provides a method of storing points, consisting of an x and y coordinate,...
static Q_INVOKABLE QgsUnitTypes::LayoutUnit decodeLayoutUnit(const QString &string, bool *ok=nullptr)
Decodes a layout unit from a string.
double x() const
Returns x coordinate of point.
QString encodePoint() const
Encodes the layout point to a string.
QgsUnitTypes::LayoutUnit units() const
Returns the units for the point.