|
QGIS API Documentation
3.6.0-Noosa (5873452)
|
This class provides a method of converting QgsLayoutMeasurements from one unit to another. More...
#include <qgslayoutmeasurementconverter.h>
Public Member Functions | |
| QgsLayoutMeasurementConverter ()=default | |
| Constructor for QgsLayoutMeasurementConverter. More... | |
| QgsLayoutMeasurement | convert (QgsLayoutMeasurement measurement, QgsUnitTypes::LayoutUnit targetUnits) const |
| Converts a measurement from one unit to another. More... | |
| QgsLayoutSize | convert (const QgsLayoutSize &size, QgsUnitTypes::LayoutUnit targetUnits) const |
| Converts a layout size from one unit to another. More... | |
| QgsLayoutPoint | convert (const QgsLayoutPoint &point, QgsUnitTypes::LayoutUnit targetUnits) const |
| Converts a layout point from one unit to another. More... | |
| double | dpi () const |
| Returns the Dots per inch (DPI) of the measurement converter. More... | |
| void | setDpi (const double dpi) |
| Sets the dots per inch (dpi) for the measurement converter. More... | |
This class provides a method of converting QgsLayoutMeasurements from one unit to another.
Conversion to or from pixel units utilizes a specified dots per inch (DPI) property for the converter. Converters default to using 300 DPI.
Definition at line 40 of file qgslayoutmeasurementconverter.h.
|
default |
Constructor for QgsLayoutMeasurementConverter.
| QgsLayoutMeasurement QgsLayoutMeasurementConverter::convert | ( | QgsLayoutMeasurement | measurement, |
| QgsUnitTypes::LayoutUnit | targetUnits | ||
| ) | const |
Converts a measurement from one unit to another.
| measurement | measurement to convert |
| targetUnits | units to convert measurement into |
Definition at line 21 of file qgslayoutmeasurementconverter.cpp.
| QgsLayoutSize QgsLayoutMeasurementConverter::convert | ( | const QgsLayoutSize & | size, |
| QgsUnitTypes::LayoutUnit | targetUnits | ||
| ) | const |
Converts a layout size from one unit to another.
| size | layout size to convert |
| targetUnits | units to convert size into |
Definition at line 52 of file qgslayoutmeasurementconverter.cpp.
| QgsLayoutPoint QgsLayoutMeasurementConverter::convert | ( | const QgsLayoutPoint & | point, |
| QgsUnitTypes::LayoutUnit | targetUnits | ||
| ) | const |
Converts a layout point from one unit to another.
| point | layout point to convert |
| targetUnits | units to convert point into |
Definition at line 93 of file qgslayoutmeasurementconverter.cpp.
|
inline |
Returns the Dots per inch (DPI) of the measurement converter.
This is used when converting measurements to and from pixels.
Definition at line 61 of file qgslayoutmeasurementconverter.h.
|
inline |
Sets the dots per inch (dpi) for the measurement converter.
This is used when converting measurements to and from pixels.
Definition at line 54 of file qgslayoutmeasurementconverter.h.
1.8.13