37  QStringList parts = 
string.split( 
',' );
 
   38  if ( parts.count() != 2 )
 
 
   52  return ( ! 
operator==( other ) );
 
 
LayoutUnit
Layout measurement units.
 
Provides a method of storing measurements for use in QGIS layouts using a variety of different measur...
 
static QgsLayoutMeasurement decodeMeasurement(const QString &string)
Decodes a measurement from a string.
 
QString encodeMeasurement() const
Encodes the layout measurement to a string.
 
QgsLayoutMeasurement operator/=(double v)
Divides the measurement by a scalar value.
 
QgsLayoutMeasurement operator*=(double v)
Multiplies the measurement by a scalar value.
 
Qgis::LayoutUnit units() const
Returns the units for the measurement.
 
QgsLayoutMeasurement operator-(double v) const
Subtracts a scalar value from the measurement.
 
QgsLayoutMeasurement operator+=(double v)
Adds a scalar value to the measurement.
 
bool operator==(QgsLayoutMeasurement other) const
 
QgsLayoutMeasurement operator+(double v) const
Adds a scalar value to the measurement.
 
QgsLayoutMeasurement(double length, Qgis::LayoutUnit units=Qgis::LayoutUnit::Millimeters)
Constructor for QgsLayoutMeasurement.
 
QgsLayoutMeasurement operator-=(double v)
Subtracts a scalar value from the measurement.
 
double length() const
Returns the length of the measurement.
 
bool operator!=(QgsLayoutMeasurement other) const
 
QgsLayoutMeasurement operator*(double v) const
Multiplies the measurement by a scalar value.
 
QgsLayoutMeasurement operator/(double v) const
Divides the measurement by a scalar value.
 
static Q_INVOKABLE Qgis::LayoutUnit decodeLayoutUnit(const QString &string, bool *ok=nullptr)
Decodes a layout unit from a string.
 
static Q_INVOKABLE QString encodeUnit(Qgis::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)