2017-07-07 13:53:14 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-12-28 15:10:47 +10:00
|
|
|
* src/core/layout/qgslayoutrendercontext.h *
|
2017-07-07 13:53:14 +10:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
class QgsLayoutRenderContext : QObject
|
2017-07-07 13:53:14 +10:00
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-28 15:10:47 +10:00
|
|
|
Stores information relating to the current rendering settings for a layout.
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-07-07 13:53:14 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
2017-12-28 15:10:47 +10:00
|
|
|
#include "qgslayoutrendercontext.h"
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
enum Flag
|
|
|
|
{
|
|
|
|
FlagDebug,
|
|
|
|
FlagOutlineOnly,
|
|
|
|
FlagAntialiasing,
|
|
|
|
FlagUseAdvancedEffects,
|
2017-12-12 17:08:34 +10:00
|
|
|
FlagForceVectorOutput,
|
2017-12-23 17:00:50 +10:00
|
|
|
FlagHideCoverageLayer,
|
2017-07-07 13:53:14 +10:00
|
|
|
};
|
2017-12-28 15:10:47 +10:00
|
|
|
typedef QFlags<QgsLayoutRenderContext::Flag> Flags;
|
2017-07-07 13:53:14 +10:00
|
|
|
|
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
QgsLayoutRenderContext( QgsLayout *layout /TransferThis/ );
|
2017-12-23 15:56:52 +10:00
|
|
|
%Docstring
|
2017-12-28 15:10:47 +10:00
|
|
|
Constructor for QgsLayoutRenderContext.
|
2017-12-23 15:56:52 +10:00
|
|
|
%End
|
2017-07-07 13:53:14 +10:00
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
void setFlags( const QgsLayoutRenderContext::Flags flags );
|
2017-07-07 13:53:14 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the combination of ``flags`` that will be used for rendering the layout.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlag`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`flags`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`testFlag`
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
void setFlag( const QgsLayoutRenderContext::Flag flag, const bool on = true );
|
2017-07-07 13:53:14 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Enables or disables a particular rendering ``flag`` for the layout. Other existing
|
|
|
|
flags are not affected.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlags`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`flags`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`testFlag`
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
QgsLayoutRenderContext::Flags flags() const;
|
2017-07-07 13:53:14 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the current combination of flags used for rendering the layout.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlags`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlag`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`testFlag`
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool testFlag( const Flag flag ) const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Check whether a particular rendering ``flag`` is enabled for the layout.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlags`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlag`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`flags`
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-25 11:21:10 +10:00
|
|
|
QgsRenderContext::Flags renderContextFlags() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the combination of render context flags matched to the layout context's settings.
|
2017-07-07 13:53:14 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-07 14:26:02 +10:00
|
|
|
void setDpi( double dpi );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``dpi`` for outputting the layout. This also sets the
|
|
|
|
corresponding DPI for the context's measurementConverter().
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`dpi`
|
2017-07-07 14:26:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double dpi() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the ``dpi`` for outputting the layout.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setDpi`
|
2017-07-07 14:26:02 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
QgsLayoutMeasurementConverter &measurementConverter();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the layout measurement converter to be used in the layout. This converter is used
|
|
|
|
for translating between other measurement units and the layout's native unit.
|
2017-07-07 14:26:02 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-16 14:43:29 +10:00
|
|
|
bool isPreviewRender() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true if the render current being conducted is a preview render,
|
|
|
|
i.e. it is being rendered inside a QGraphicsView widget as opposed to a destination
|
|
|
|
device (such as an image).
|
2017-10-16 14:43:29 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-24 07:57:25 +10:00
|
|
|
bool gridVisible() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true if the page grid should be drawn.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setGridVisible`
|
2017-07-24 07:57:25 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-24 21:56:13 +10:00
|
|
|
void setGridVisible( bool visible );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether the page grid should be ``visible``.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`gridVisible`
|
2017-09-29 17:09:32 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool boundingBoxesVisible() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns true if the item bounding boxes should be drawn.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setBoundingBoxesVisible`
|
2017-09-29 17:09:32 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setBoundingBoxesVisible( bool visible );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether the item bounding boxes should be ``visible``.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`boundingBoxesVisible`
|
2017-07-24 21:56:13 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-06 16:40:12 +10:00
|
|
|
void setPagesVisible( bool visible );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets whether the page items should be ``visible`` in the layout. Removing
|
|
|
|
them will prevent both display of the page boundaries in layout views and
|
|
|
|
will also prevent them from being rendered in layout exports.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`pagesVisible`
|
2017-10-06 16:40:12 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
bool pagesVisible() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns whether the page items are be visible in the layout. This setting
|
|
|
|
effects both display of the page boundaries in layout views and
|
|
|
|
whether they will be rendered in layout exports.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setPagesVisible`
|
2017-10-06 16:40:12 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-20 14:08:03 +10:00
|
|
|
void setCurrentExportLayer( int layer = -1 );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the current item ``layer`` to draw while exporting. QgsLayoutItem subclasses
|
|
|
|
which support multi-layer SVG exports must check the currentExportLayer()
|
2018-05-26 14:52:50 +10:00
|
|
|
and customize their rendering based on the layer.
|
2017-10-20 14:08:03 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
If ``layer`` is -1, all item layers will be rendered.
|
2017-10-20 14:08:03 +10:00
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`currentExportLayer`
|
2017-10-20 14:08:03 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
int currentExportLayer() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the current item layer to draw while exporting. QgsLayoutItem subclasses
|
|
|
|
which support multi-layer SVG exports must check this
|
2018-05-26 14:52:50 +10:00
|
|
|
and customize their rendering based on the layer.
|
2017-10-20 14:08:03 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
If ``layer`` is -1, all item layers should be rendered.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setCurrentExportLayer`
|
2017-10-20 14:08:03 +10:00
|
|
|
%End
|
|
|
|
|
2017-10-11 07:24:25 +10:00
|
|
|
signals:
|
|
|
|
|
2017-12-28 15:10:47 +10:00
|
|
|
void flagsChanged( QgsLayoutRenderContext::Flags flags );
|
2017-10-11 07:24:25 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Emitted whenever the context's ``flags`` change.
|
|
|
|
|
2018-01-09 17:26:37 -04:00
|
|
|
.. seealso:: :py:func:`setFlags`
|
2017-12-23 15:30:13 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void dpiChanged();
|
|
|
|
%Docstring
|
|
|
|
Emitted when the context's DPI is changed.
|
2017-10-11 07:24:25 +10:00
|
|
|
%End
|
|
|
|
|
2017-07-07 13:53:14 +10:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-11 07:24:25 +10:00
|
|
|
|
2017-07-07 13:53:14 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
2017-12-28 15:10:47 +10:00
|
|
|
* src/core/layout/qgslayoutrendercontext.h *
|
2017-07-07 13:53:14 +10:00
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|