mirror of
				https://github.com/qgis/QGIS.git
				synced 2025-11-04 00:04:25 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			270 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			270 lines
		
	
	
		
			6.5 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/textrenderer/qgstextbuffersettings.h                        *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
 | 
						|
class QgsTextBufferSettings
 | 
						|
{
 | 
						|
%Docstring(signature="appended")
 | 
						|
Container for settings relating to a text buffer.
 | 
						|
 | 
						|
.. note::
 | 
						|
 | 
						|
   :py:class:`QgsTextBufferSettings` objects are implicitly shared.
 | 
						|
 | 
						|
.. versionadded:: 3.0
 | 
						|
%End
 | 
						|
 | 
						|
%TypeHeaderCode
 | 
						|
#include "qgstextbuffersettings.h"
 | 
						|
%End
 | 
						|
  public:
 | 
						|
 | 
						|
    QgsTextBufferSettings();
 | 
						|
 | 
						|
    QgsTextBufferSettings( const QgsTextBufferSettings &other );
 | 
						|
%Docstring
 | 
						|
Copy constructor.
 | 
						|
 | 
						|
:param other: source settings
 | 
						|
%End
 | 
						|
 | 
						|
 | 
						|
    ~QgsTextBufferSettings();
 | 
						|
 | 
						|
    bool operator==( const QgsTextBufferSettings &other ) const;
 | 
						|
    bool operator!=( const QgsTextBufferSettings &other ) const;
 | 
						|
 | 
						|
    bool enabled() const;
 | 
						|
%Docstring
 | 
						|
Returns whether the buffer is enabled.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setEnabled`
 | 
						|
%End
 | 
						|
 | 
						|
    void setEnabled( bool enabled );
 | 
						|
%Docstring
 | 
						|
Sets whether the text buffer will be drawn.
 | 
						|
 | 
						|
:param enabled: set to ``True`` to draw buffer
 | 
						|
 | 
						|
.. seealso:: :py:func:`enabled`
 | 
						|
%End
 | 
						|
 | 
						|
    double size() const;
 | 
						|
%Docstring
 | 
						|
Returns the size of the buffer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSize`
 | 
						|
%End
 | 
						|
 | 
						|
    void setSize( double size );
 | 
						|
%Docstring
 | 
						|
Sets the size of the buffer. The size units are specified using :py:func:`~QgsTextBufferSettings.setSizeUnit`.
 | 
						|
 | 
						|
:param size: buffer size
 | 
						|
 | 
						|
.. seealso:: :py:func:`size`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsUnitTypes::RenderUnit sizeUnit() const;
 | 
						|
%Docstring
 | 
						|
Returns the units for the buffer size.
 | 
						|
 | 
						|
.. seealso:: :py:func:`size`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    void setSizeUnit( QgsUnitTypes::RenderUnit unit );
 | 
						|
%Docstring
 | 
						|
Sets the units used for the buffer size.
 | 
						|
 | 
						|
:param unit: size unit
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSize`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    QgsMapUnitScale sizeMapUnitScale() const;
 | 
						|
%Docstring
 | 
						|
Returns the map unit scale object for the buffer size. This is only used if the
 | 
						|
buffer size is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    void setSizeMapUnitScale( const QgsMapUnitScale &scale );
 | 
						|
%Docstring
 | 
						|
Sets the map unit scale object for the buffer size. This is only used if the
 | 
						|
buffer size is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
 | 
						|
 | 
						|
:param scale: scale for buffer size
 | 
						|
 | 
						|
.. seealso:: :py:func:`sizeMapUnitScale`
 | 
						|
 | 
						|
.. seealso:: :py:func:`setSizeUnit`
 | 
						|
%End
 | 
						|
 | 
						|
    QColor color() const;
 | 
						|
%Docstring
 | 
						|
Returns the color of the buffer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setColor`
 | 
						|
%End
 | 
						|
 | 
						|
    void setColor( const QColor &color );
 | 
						|
%Docstring
 | 
						|
Sets the color for the buffer.
 | 
						|
 | 
						|
:param color: buffer color
 | 
						|
 | 
						|
.. seealso:: :py:func:`color`
 | 
						|
%End
 | 
						|
 | 
						|
    bool fillBufferInterior() const;
 | 
						|
%Docstring
 | 
						|
Returns whether the interior of the buffer will be filled in. If ``False``, only the stroke
 | 
						|
of the text will be drawn as the buffer. The effect of this setting is only visible for
 | 
						|
semi-transparent text.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setFillBufferInterior`
 | 
						|
%End
 | 
						|
 | 
						|
    void setFillBufferInterior( bool fill );
 | 
						|
%Docstring
 | 
						|
Sets whether the interior of the buffer will be filled in.
 | 
						|
 | 
						|
:param fill: set to ``False`` to drawn only the stroke of the text as the buffer, or ``True`` to also
 | 
						|
             shade the area inside the text. The effect of this setting is only visible for semi-transparent text.
 | 
						|
 | 
						|
.. seealso:: :py:func:`fillBufferInterior`
 | 
						|
%End
 | 
						|
 | 
						|
    double opacity() const;
 | 
						|
%Docstring
 | 
						|
Returns the buffer opacity. The opacity is a double value between 0 (fully transparent) and 1 (totally
 | 
						|
opaque).
 | 
						|
 | 
						|
.. seealso:: :py:func:`setOpacity`
 | 
						|
%End
 | 
						|
 | 
						|
    void setOpacity( double opacity );
 | 
						|
%Docstring
 | 
						|
Sets the buffer opacity.
 | 
						|
 | 
						|
:param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally
 | 
						|
                opaque)
 | 
						|
 | 
						|
.. seealso:: :py:func:`opacity`
 | 
						|
%End
 | 
						|
 | 
						|
    Qt::PenJoinStyle joinStyle() const;
 | 
						|
%Docstring
 | 
						|
Returns the buffer join style.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setJoinStyle`
 | 
						|
%End
 | 
						|
 | 
						|
    void setJoinStyle( Qt::PenJoinStyle style );
 | 
						|
%Docstring
 | 
						|
Sets the join style used for drawing the buffer.
 | 
						|
 | 
						|
:param style: join style
 | 
						|
 | 
						|
.. seealso:: :py:func:`joinStyle`
 | 
						|
%End
 | 
						|
 | 
						|
    QPainter::CompositionMode blendMode() const;
 | 
						|
%Docstring
 | 
						|
Returns the blending mode used for drawing the buffer.
 | 
						|
 | 
						|
.. seealso:: :py:func:`setBlendMode`
 | 
						|
%End
 | 
						|
 | 
						|
    void setBlendMode( QPainter::CompositionMode mode );
 | 
						|
%Docstring
 | 
						|
Sets the blending mode used for drawing the buffer.
 | 
						|
 | 
						|
:param mode: blending mode
 | 
						|
 | 
						|
.. seealso:: :py:func:`blendMode`
 | 
						|
%End
 | 
						|
 | 
						|
    void readFromLayer( QgsVectorLayer *layer );
 | 
						|
%Docstring
 | 
						|
Reads settings from a layer's custom properties (for QGIS 2.x projects).
 | 
						|
 | 
						|
:param layer: source vector layer
 | 
						|
%End
 | 
						|
 | 
						|
    void readXml( const QDomElement &elem );
 | 
						|
%Docstring
 | 
						|
Read settings from a DOM element.
 | 
						|
 | 
						|
.. seealso:: :py:func:`writeXml`
 | 
						|
%End
 | 
						|
 | 
						|
    QDomElement writeXml( QDomDocument &doc ) const;
 | 
						|
%Docstring
 | 
						|
Write settings into a DOM element.
 | 
						|
 | 
						|
.. seealso:: :py:func:`readXml`
 | 
						|
%End
 | 
						|
 | 
						|
    const QgsPaintEffect *paintEffect() const;
 | 
						|
%Docstring
 | 
						|
Returns the current paint effect for the buffer.
 | 
						|
 | 
						|
:return: paint effect
 | 
						|
 | 
						|
.. seealso:: :py:func:`setPaintEffect`
 | 
						|
%End
 | 
						|
 | 
						|
    void setPaintEffect( QgsPaintEffect *effect /Transfer/ );
 | 
						|
%Docstring
 | 
						|
Sets the current paint ``effect`` for the buffer.
 | 
						|
 | 
						|
:param effect: paint effect. Ownership is transferred to the buffer settings.
 | 
						|
 | 
						|
.. seealso:: :py:func:`paintEffect`
 | 
						|
%End
 | 
						|
 | 
						|
    void updateDataDefinedProperties( QgsRenderContext &context, const QgsPropertyCollection &properties );
 | 
						|
%Docstring
 | 
						|
Updates the format by evaluating current values of data defined properties.
 | 
						|
 | 
						|
.. versionadded:: 3.10
 | 
						|
%End
 | 
						|
 | 
						|
    QSet<QString> referencedFields( const QgsRenderContext &context ) const;
 | 
						|
%Docstring
 | 
						|
Returns all field names referenced by the configuration (e.g. from data defined properties).
 | 
						|
 | 
						|
.. versionadded:: 3.14
 | 
						|
%End
 | 
						|
 | 
						|
};
 | 
						|
 | 
						|
/************************************************************************
 | 
						|
 * This file has been generated automatically from                      *
 | 
						|
 *                                                                      *
 | 
						|
 * src/core/textrenderer/qgstextbuffersettings.h                        *
 | 
						|
 *                                                                      *
 | 
						|
 * Do not edit manually ! Edit header and run scripts/sipify.pl again   *
 | 
						|
 ************************************************************************/
 |