mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-10-31 00:06:02 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			372 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			372 lines
		
	
	
		
			10 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/layout/qgslayoutrendercontext.h                             *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 | |
| 
 | |
| 
 | |
| 
 | |
| class QgsLayoutRenderContext : QObject
 | |
| {
 | |
| %Docstring(signature="appended")
 | |
| Stores information relating to the current rendering settings for a layout.
 | |
| 
 | |
| .. versionadded:: 3.0
 | |
| %End
 | |
| 
 | |
| %TypeHeaderCode
 | |
| #include "qgslayoutrendercontext.h"
 | |
| %End
 | |
|   public:
 | |
| 
 | |
|     enum Flag
 | |
|     {
 | |
|       FlagDebug,
 | |
|       FlagOutlineOnly,
 | |
|       FlagAntialiasing,
 | |
|       FlagUseAdvancedEffects,
 | |
|       FlagForceVectorOutput,
 | |
|       FlagHideCoverageLayer,
 | |
|       FlagDrawSelection,
 | |
|       FlagDisableTiledRasterLayerRenders,
 | |
|       FlagRenderLabelsByMapLayer,
 | |
|       FlagLosslessImageRendering,
 | |
|     };
 | |
|     typedef QFlags<QgsLayoutRenderContext::Flag> Flags;
 | |
| 
 | |
| 
 | |
|     QgsLayoutRenderContext( QgsLayout *layout /TransferThis/ );
 | |
| %Docstring
 | |
| Constructor for QgsLayoutRenderContext.
 | |
| %End
 | |
| 
 | |
|     void setFlags( QgsLayoutRenderContext::Flags flags );
 | |
| %Docstring
 | |
| Sets the combination of ``flags`` that will be used for rendering the layout.
 | |
| 
 | |
| .. seealso:: :py:func:`setFlag`
 | |
| 
 | |
| .. seealso:: :py:func:`flags`
 | |
| 
 | |
| .. seealso:: :py:func:`testFlag`
 | |
| %End
 | |
| 
 | |
|     void setFlag( QgsLayoutRenderContext::Flag flag, bool on = true );
 | |
| %Docstring
 | |
| Enables or disables a particular rendering ``flag`` for the layout. Other existing
 | |
| flags are not affected.
 | |
| 
 | |
| .. seealso:: :py:func:`setFlags`
 | |
| 
 | |
| .. seealso:: :py:func:`flags`
 | |
| 
 | |
| .. seealso:: :py:func:`testFlag`
 | |
| %End
 | |
| 
 | |
|     QgsLayoutRenderContext::Flags flags() const;
 | |
| %Docstring
 | |
| Returns the current combination of flags used for rendering the layout.
 | |
| 
 | |
| .. seealso:: :py:func:`setFlags`
 | |
| 
 | |
| .. seealso:: :py:func:`setFlag`
 | |
| 
 | |
| .. seealso:: :py:func:`testFlag`
 | |
| %End
 | |
| 
 | |
|     bool testFlag( Flag flag ) const;
 | |
| %Docstring
 | |
| Check whether a particular rendering ``flag`` is enabled for the layout.
 | |
| 
 | |
| .. seealso:: :py:func:`setFlags`
 | |
| 
 | |
| .. seealso:: :py:func:`setFlag`
 | |
| 
 | |
| .. seealso:: :py:func:`flags`
 | |
| %End
 | |
| 
 | |
|     Qgis::RenderContextFlags renderContextFlags() const;
 | |
| %Docstring
 | |
| Returns the combination of render context flags matched to the layout context's settings.
 | |
| %End
 | |
| 
 | |
|     void setDpi( double dpi );
 | |
| %Docstring
 | |
| Sets the ``dpi`` for outputting the layout. This also sets the
 | |
| corresponding DPI for the context's :py:func:`~QgsLayoutRenderContext.measurementConverter`.
 | |
| 
 | |
| .. seealso:: :py:func:`dpi`
 | |
| %End
 | |
| 
 | |
|     double dpi() const;
 | |
| %Docstring
 | |
| Returns the ``dpi`` for outputting the layout.
 | |
| 
 | |
| .. seealso:: :py:func:`setDpi`
 | |
| %End
 | |
| 
 | |
|     void setSelectionColor( const QColor &color );
 | |
| %Docstring
 | |
| Sets color that is used for drawing of selected vector features
 | |
| 
 | |
| .. seealso:: :py:func:`selectionColor`
 | |
| 
 | |
| .. versionadded:: 3.4
 | |
| %End
 | |
| 
 | |
|     QColor selectionColor() const;
 | |
| %Docstring
 | |
| Gets color that is used for drawing of selected vector features
 | |
| 
 | |
| .. seealso:: :py:func:`setSelectionColor`
 | |
| 
 | |
| .. versionadded:: 3.4
 | |
| %End
 | |
| 
 | |
| 
 | |
|     QgsLayoutMeasurementConverter &measurementConverter();
 | |
| %Docstring
 | |
| 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.
 | |
| %End
 | |
| 
 | |
|     bool isPreviewRender() const;
 | |
| %Docstring
 | |
| 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).
 | |
| %End
 | |
| 
 | |
|     bool gridVisible() const;
 | |
| %Docstring
 | |
| Returns ``True`` if the page grid should be drawn.
 | |
| 
 | |
| .. seealso:: :py:func:`setGridVisible`
 | |
| %End
 | |
| 
 | |
|     void setGridVisible( bool visible );
 | |
| %Docstring
 | |
| Sets whether the page grid should be ``visible``.
 | |
| 
 | |
| .. seealso:: :py:func:`gridVisible`
 | |
| %End
 | |
| 
 | |
|     bool boundingBoxesVisible() const;
 | |
| %Docstring
 | |
| Returns ``True`` if the item bounding boxes should be drawn.
 | |
| 
 | |
| .. seealso:: :py:func:`setBoundingBoxesVisible`
 | |
| %End
 | |
| 
 | |
|     void setBoundingBoxesVisible( bool visible );
 | |
| %Docstring
 | |
| Sets whether the item bounding boxes should be ``visible``.
 | |
| 
 | |
| .. seealso:: :py:func:`boundingBoxesVisible`
 | |
| %End
 | |
| 
 | |
|     void setPagesVisible( bool visible );
 | |
| %Docstring
 | |
| 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.
 | |
| 
 | |
| .. seealso:: :py:func:`pagesVisible`
 | |
| %End
 | |
| 
 | |
|     bool pagesVisible() const;
 | |
| %Docstring
 | |
| 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.
 | |
| 
 | |
| .. seealso:: :py:func:`setPagesVisible`
 | |
| %End
 | |
| 
 | |
|  void setCurrentExportLayer( int layer = -1 ) /Deprecated/;
 | |
| %Docstring
 | |
| Sets the current item ``layer`` to draw while exporting. :py:class:`QgsLayoutItem` subclasses
 | |
| which support multi-layer SVG exports must check the :py:func:`~QgsLayoutRenderContext.currentExportLayer`
 | |
| and customize their rendering based on the layer.
 | |
| 
 | |
| If ``layer`` is -1, all item layers will be rendered.
 | |
| 
 | |
| .. seealso:: :py:func:`currentExportLayer`
 | |
| 
 | |
| .. deprecated::
 | |
|    Items should now handle this themselves, via :py:func:`QgsLayoutItem.exportLayerBehavior()` and returning :py:func:`QgsLayoutItem.nextExportPart()`.
 | |
| %End
 | |
| 
 | |
|  int currentExportLayer() const /Deprecated/;
 | |
| %Docstring
 | |
| Returns the current item layer to draw while exporting. :py:class:`QgsLayoutItem` subclasses
 | |
| which support multi-layer SVG exports must check this
 | |
| and customize their rendering based on the layer.
 | |
| 
 | |
| If ``layer`` is -1, all item layers should be rendered.
 | |
| 
 | |
| .. seealso:: :py:func:`setCurrentExportLayer`
 | |
| 
 | |
| .. deprecated::
 | |
|    Items should now handle this themselves, via :py:func:`QgsLayoutItem.exportLayerBehavior()` and returning :py:func:`QgsLayoutItem.nextExportPart()`.
 | |
| %End
 | |
| 
 | |
|     Qgis::TextRenderFormat textRenderFormat() const;
 | |
| %Docstring
 | |
| Returns the text render format, which dictates how text is rendered (e.g. as paths or real text objects).
 | |
| 
 | |
| .. seealso:: :py:func:`setTextRenderFormat`
 | |
| 
 | |
| .. versionadded:: 3.4.3
 | |
| %End
 | |
| 
 | |
|     void setTextRenderFormat( Qgis::TextRenderFormat format );
 | |
| %Docstring
 | |
| Sets the text render ``format``, which dictates how text is rendered (e.g. as paths or real text objects).
 | |
| 
 | |
| .. seealso:: :py:func:`textRenderFormat`
 | |
| 
 | |
| .. versionadded:: 3.4.3
 | |
| %End
 | |
| 
 | |
|     void setSimplifyMethod( const QgsVectorSimplifyMethod &method );
 | |
| %Docstring
 | |
| Sets the simplification setting to use when rendering vector layers.
 | |
| 
 | |
| If the simplify ``method`` is enabled, it apply to all vector layers rendered inside map items.
 | |
| 
 | |
| This can be used to specify global simplification methods to apply during map exports,
 | |
| e.g. to allow vector layers to be simplified to an appropriate maximum level of detail
 | |
| during PDF exports (avoiding excessive PDF size due to huge numbers of vertices).
 | |
| 
 | |
| The default is to use no simplification.
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    This simplification method is only used during non-preview renders.
 | |
| 
 | |
| .. seealso:: :py:func:`simplifyMethod`
 | |
| 
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     const QgsVectorSimplifyMethod &simplifyMethod() const;
 | |
| %Docstring
 | |
| Returns the simplification settings to use when rendering vector layers.
 | |
| 
 | |
| If enabled, it will apply to all vector layers rendered for the map.
 | |
| 
 | |
| The default is to use no simplification.
 | |
| 
 | |
| .. note::
 | |
| 
 | |
|    This simplification method is only used during non-preview renders.
 | |
| 
 | |
| .. seealso:: :py:func:`setSimplifyMethod`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     QStringList exportThemes() const;
 | |
| %Docstring
 | |
| Returns a list of map themes to use during the export.
 | |
| 
 | |
| Items which handle layered exports (e.g. maps) may utilize this list to export different
 | |
| representations of the item as export layers, as they iterate through these included themes.
 | |
| 
 | |
| .. seealso:: :py:func:`setExportThemes`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     void setExportThemes( const QStringList &themes );
 | |
| %Docstring
 | |
| Sets a list of map ``themes`` to use during the export.
 | |
| 
 | |
| Items which handle layered exports (e.g. maps) may utilize this list to export different
 | |
| representations of the item as export layers, as they iterate through these included themes.
 | |
| 
 | |
| .. seealso:: :py:func:`exportThemes`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     void setPredefinedScales( const QVector<qreal> &scales );
 | |
| %Docstring
 | |
| Sets the list of predefined ``scales`` to use with the layout. This is used
 | |
| for maps which are set to the predefined atlas scaling mode.
 | |
| 
 | |
| .. seealso:: :py:func:`predefinedScales`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     QVector<qreal> predefinedScales() const;
 | |
| %Docstring
 | |
| Returns the current list of predefined scales for use with the layout.
 | |
| 
 | |
| .. seealso:: :py:func:`setPredefinedScales`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
|     QgsFeatureFilterProvider *featureFilterProvider() const;
 | |
| %Docstring
 | |
| Returns the possibly NULL feature filter provider.
 | |
| 
 | |
| A feature filter provider for filtering visible features or attributes.
 | |
| It is currently used by QGIS Server Access Control Plugins.
 | |
| 
 | |
| .. versionadded:: 3.18
 | |
| %End
 | |
| 
 | |
|     void setFeatureFilterProvider( QgsFeatureFilterProvider *featureFilterProvider );
 | |
| %Docstring
 | |
| Sets feature filter provider to ``featureFilterProvider``.
 | |
| 
 | |
| A feature filter provider for filtering visible features or attributes.
 | |
| It is currently used by QGIS Server Access Control Plugins.
 | |
| 
 | |
| .. versionadded:: 3.18
 | |
| %End
 | |
| 
 | |
|   signals:
 | |
| 
 | |
|     void flagsChanged( QgsLayoutRenderContext::Flags flags );
 | |
| %Docstring
 | |
| Emitted whenever the context's ``flags`` change.
 | |
| 
 | |
| .. seealso:: :py:func:`setFlags`
 | |
| %End
 | |
| 
 | |
|     void dpiChanged();
 | |
| %Docstring
 | |
| Emitted when the context's DPI is changed.
 | |
| %End
 | |
| 
 | |
|     void predefinedScalesChanged();
 | |
| %Docstring
 | |
| Emitted when the list of predefined scales changes.
 | |
| 
 | |
| .. seealso:: :py:func:`predefinedScales`
 | |
| 
 | |
| .. versionadded:: 3.10
 | |
| %End
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| /************************************************************************
 | |
|  * This file has been generated automatically from                      *
 | |
|  *                                                                      *
 | |
|  * src/core/layout/qgslayoutrendercontext.h                             *
 | |
|  *                                                                      *
 | |
|  * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | |
|  ************************************************************************/
 |