QGIS API Documentation
3.0.2-Girona (307d082)
|
This class provides a method of storing measurements for use in QGIS layouts using a variety of different measurement units. More...
#include <qgslayoutmeasurement.h>
Public Member Functions | |
QgsLayoutMeasurement (const double length, const QgsUnitTypes::LayoutUnit units=QgsUnitTypes::LayoutMillimeters) | |
Constructor for QgsLayoutMeasurement. More... | |
QString | encodeMeasurement () const |
Encodes the layout measurement to a string. More... | |
double | length () const |
Returns the length of the measurement. More... | |
bool | operator!= (const QgsLayoutMeasurement &other) const |
QgsLayoutMeasurement | operator* (const double v) const |
Multiplies the measurement by a scalar value. More... | |
QgsLayoutMeasurement | operator*= (const double v) |
Multiplies the measurement by a scalar value. More... | |
QgsLayoutMeasurement | operator+ (const double v) const |
Adds a scalar value to the measurement. More... | |
QgsLayoutMeasurement | operator+= (const double v) |
Adds a scalar value to the measurement. More... | |
QgsLayoutMeasurement | operator- (const double v) const |
Subtracts a scalar value from the measurement. More... | |
QgsLayoutMeasurement | operator-= (const double v) |
Subtracts a scalar value from the measurement. More... | |
QgsLayoutMeasurement | operator/ (const double v) const |
Divides the measurement by a scalar value. More... | |
QgsLayoutMeasurement | operator/= (const double v) |
Divides the measurement by a scalar value. More... | |
bool | operator== (const QgsLayoutMeasurement &other) const |
void | setLength (const double length) |
Sets the length of the measurement. More... | |
void | setUnits (const QgsUnitTypes::LayoutUnit units) |
Sets the units for the measurement. More... | |
QgsUnitTypes::LayoutUnit | units () const |
Returns the units for the measurement. More... | |
Static Public Member Functions | |
static QgsLayoutMeasurement | decodeMeasurement (const QString &string) |
Decodes a measurement from a string. More... | |
This class provides a method of storing measurements for use in QGIS layouts using a variety of different measurement units.
Definition at line 33 of file qgslayoutmeasurement.h.
|
explicit |
Constructor for QgsLayoutMeasurement.
length | measurement length |
units | measurement units |
Definition at line 22 of file qgslayoutmeasurement.cpp.
|
static |
Decodes a measurement from a string.
Definition at line 33 of file qgslayoutmeasurement.cpp.
QString QgsLayoutMeasurement::encodeMeasurement | ( | ) | const |
Encodes the layout measurement to a string.
Definition at line 28 of file qgslayoutmeasurement.cpp.
|
inline |
Returns the length of the measurement.
Definition at line 48 of file qgslayoutmeasurement.h.
bool QgsLayoutMeasurement::operator!= | ( | const QgsLayoutMeasurement & | other | ) | const |
Definition at line 48 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator* | ( | const double | v | ) | const |
Multiplies the measurement by a scalar value.
Definition at line 75 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator*= | ( | const double | v | ) |
Multiplies the measurement by a scalar value.
Definition at line 80 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator+ | ( | const double | v | ) | const |
Adds a scalar value to the measurement.
Definition at line 53 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator+= | ( | const double | v | ) |
Adds a scalar value to the measurement.
Definition at line 58 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator- | ( | const double | v | ) | const |
Subtracts a scalar value from the measurement.
Definition at line 64 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator-= | ( | const double | v | ) |
Subtracts a scalar value from the measurement.
Definition at line 69 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator/ | ( | const double | v | ) | const |
Divides the measurement by a scalar value.
Definition at line 86 of file qgslayoutmeasurement.cpp.
QgsLayoutMeasurement QgsLayoutMeasurement::operator/= | ( | const double | v | ) |
Divides the measurement by a scalar value.
Definition at line 91 of file qgslayoutmeasurement.cpp.
bool QgsLayoutMeasurement::operator== | ( | const QgsLayoutMeasurement & | other | ) | const |
Definition at line 43 of file qgslayoutmeasurement.cpp.
|
inline |
Sets the length of the measurement.
Definition at line 54 of file qgslayoutmeasurement.h.
|
inline |
Sets the units for the measurement.
Does not alter the stored length, ie. no length conversion is done.
Definition at line 67 of file qgslayoutmeasurement.h.
|
inline |
Returns the units for the measurement.
Definition at line 60 of file qgslayoutmeasurement.h.