Subgroup: Layout
Class: QgsLayoutMeasurement¶
-
class
qgis.core.
QgsLayoutMeasurement
(length: float, units: QgsUnitTypes.LayoutUnit = QgsUnitTypes.LayoutMillimeters)¶ Bases:
sip.wrapper
Constructor for QgsLayoutMeasurement.
Parameters: - length – measurement length
- units – measurement units
QgsLayoutMeasurement(QgsLayoutMeasurement)
This class provides a method of storing measurements for use in QGIS layouts using a variety of different measurement units.
See also
New in version 3.0: Methods
decodeMeasurement
Decodes a measurement from a string
.encodeMeasurement
Encodes the layout measurement to a string length
Returns the length of the measurement. setLength
Sets the length
of the measurement.setUnits
Sets the units
for the measurement.units
Returns the units for the measurement. Signals
Attributes
-
decodeMeasurement
(string: str) → QgsLayoutMeasurement¶ Decodes a measurement from a
string
.See also
-
encodeMeasurement
(self) → str¶ Encodes the layout measurement to a string
See also
-
length
(self) → float¶ Returns the length of the measurement.
See also
-
setUnits
(self, units: QgsUnitTypes.LayoutUnit)¶ Sets the
units
for the measurement. Does not alter the stored length, ie. no length conversion is done.See also
-
units
(self) → QgsUnitTypes.LayoutUnit¶ Returns the units for the measurement.
See also