2017-07-25 11:47:20 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutgridsettings.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-01 12:50:04 +10:00
|
|
|
class QgsLayoutGridSettings : QgsLayoutSerializableObject
|
2017-07-25 11:47:20 +10:00
|
|
|
{
|
|
|
|
%Docstring
|
|
|
|
Contains settings relating to the appearance, spacing and offset for layout grids.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-07-25 11:47:20 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslayoutgridsettings.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum Style
|
|
|
|
{
|
|
|
|
StyleLines,
|
|
|
|
StyleDots,
|
|
|
|
StyleCrosses
|
|
|
|
};
|
|
|
|
|
2017-09-01 12:50:04 +10:00
|
|
|
QgsLayoutGridSettings( QgsLayout *layout );
|
2017-07-25 11:47:20 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsLayoutGridSettings.
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
2017-09-01 12:50:04 +10:00
|
|
|
virtual QString stringType() const;
|
|
|
|
virtual QgsLayout *layout();
|
|
|
|
|
|
|
|
|
2017-07-25 11:47:20 +10:00
|
|
|
void setResolution( const QgsLayoutMeasurement &resolution );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the page/snap grid ``resolution``.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`resolution`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setOffset`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutMeasurement resolution() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the page/snap grid resolution.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setResolution`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`offset`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setOffset( const QgsLayoutPoint offset );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``offset`` of the page/snap grid.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`offset`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setResolution`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsLayoutPoint offset() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the offset of the page/snap grid.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setOffset`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`resolution`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setPen( const QPen &pen );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``pen`` used for drawing page/snap grids.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`pen`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setStyle`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QPen pen() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the pen used for drawing page/snap grids.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setPen`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`style`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setStyle( const Style style );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``style`` used for drawing the page/snap grids.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`style`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setPen`
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
Style style() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the style used for drawing the page/snap grids.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setStyle`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`pen`
|
2018-01-16 21:31:35 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void loadFromSettings();
|
|
|
|
%Docstring
|
|
|
|
Loads grid settings from the application layout settings.
|
2017-07-25 11:47:20 +10:00
|
|
|
%End
|
|
|
|
|
2017-09-01 12:50:04 +10:00
|
|
|
virtual bool writeXml( QDomElement &parentElement, QDomDocument &document, const QgsReadWriteContext &context ) const;
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Stores the grid's state in a DOM element. The ``parentElement`` should refer to the parent layout's DOM element.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`readXml`
|
2017-09-01 12:50:04 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual bool readXml( const QDomElement &gridElement, const QDomDocument &document, const QgsReadWriteContext &context );
|
|
|
|
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the grid's state from a DOM element. gridElement is the DOM node corresponding to the grid.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`writeXml`
|
2017-09-01 12:50:04 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-25 11:47:20 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutgridsettings.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|