QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSLAYOUTMEASUREMENT_H
19 #define QGSLAYOUTMEASUREMENT_H
21 #include "qgis_core.h"
48 double length()
const {
return mLength; }
54 void setLength(
const double length ) { mLength = length; }
73 QString encodeMeasurement()
const;
125 SIP_PYOBJECT __repr__();
128 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
134 double mLength = 0.0;
139 #endif // QGSLAYOUTMEASUREMENT_H
void setUnits(const QgsUnitTypes::LayoutUnit units)
Sets the units for the measurement.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
double length() const
Returns the length of the measurement.
void setLength(const double length)
Sets the length of the measurement.
static Q_INVOKABLE QString toAbbreviatedString(QgsUnitTypes::DistanceUnit unit)
Returns a translated abbreviation representing a distance unit.
LayoutUnit
Layout measurement units.
QgsMargins operator/(const QgsMargins &margins, double divisor)
Returns a QgsMargins object that is formed by dividing the components of the given margins by the giv...
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsUnitTypes::LayoutUnit units() const
Returns the units for the measurement.
QgsMargins operator*(const QgsMargins &margins, double factor)
Returns a QgsMargins object that is formed by multiplying each component of the given margins by fact...
QgsInterval operator-(const QDateTime &dt1, const QDateTime &dt2)
Returns the interval between two datetimes.
QDateTime operator+(const QDateTime &start, const QgsInterval &interval)
Adds an interval to a datetime.
@ LayoutMillimeters
Millimeters.
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...