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;
 
This class provides a method of storing measurements for use in QGIS layouts using a variety of diffe...
void setLength(const double length)
Sets the length of the measurement.
double length() const
Returns the length of the measurement.
QgsUnitTypes::LayoutUnit units() const
Returns the units for the measurement.
void setUnits(const QgsUnitTypes::LayoutUnit units)
Sets the units for the measurement.
LayoutUnit
Layout measurement units.
@ LayoutMillimeters
Millimeters.
static Q_INVOKABLE QString toAbbreviatedString(QgsUnitTypes::DistanceUnit unit)
Returns a translated abbreviation representing a distance unit.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
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.
QgsMargins operator*(const QgsMargins &margins, double factor)
Returns a QgsMargins object that is formed by multiplying each component of the given margins by fact...
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...