QGIS/python/core/auto_generated/layout/qgslayoutmeasurementconverter.sip.in

91 lines
2.9 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutmeasurementconverter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutMeasurementConverter
{
%Docstring
This class provides a method of converting QgsLayoutMeasurements from
2017-12-15 10:36:55 -04:00
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.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:class:`QgsLayoutMeasurement`
2017-12-15 10:36:55 -04:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayoutmeasurementconverter.h"
%End
public:
QgsLayoutMeasurementConverter();
2017-06-26 11:17:04 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutMeasurementConverter.
2017-06-26 11:17:04 +10:00
%End
void setDpi( const double dpi );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the dots per inch (``dpi``) for the measurement converter. This is used
when converting measurements to and from pixels.
.. seealso:: :py:func:`dpi`
%End
double dpi() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the Dots per inch (DPI) of the measurement converter. This is used
when converting measurements to and from pixels.
.. seealso:: :py:func:`setDpi`
%End
QgsLayoutMeasurement convert( const QgsLayoutMeasurement &measurement, const QgsUnitTypes::LayoutUnit targetUnits ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a measurement from one unit to another.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param measurement: measurement to convert
:param targetUnits: units to convert measurement into
:return: measurement converted to target units
%End
QgsLayoutSize convert( const QgsLayoutSize &size, const QgsUnitTypes::LayoutUnit targetUnits ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a layout size from one unit to another.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param size: layout size to convert
:param targetUnits: units to convert size into
:return: size converted to target units
%End
QgsLayoutPoint convert( const QgsLayoutPoint &point, const QgsUnitTypes::LayoutUnit targetUnits ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Converts a layout point from one unit to another.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param point: layout point to convert
:param targetUnits: units to convert point into
:return: point converted to target units
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutmeasurementconverter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/