mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
376 lines
9.6 KiB
Plaintext
376 lines
9.6 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/textrenderer/qgstextshadowsettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
class QgsTextShadowSettings
|
|
{
|
|
%Docstring(signature="appended")
|
|
Container for settings relating to a text shadow.
|
|
|
|
.. note::
|
|
|
|
:py:class:`QgsTextShadowSettings` objects are implicitly shared.
|
|
|
|
.. versionadded:: 3.0
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgstextshadowsettings.h"
|
|
%End
|
|
public:
|
|
|
|
enum ShadowPlacement
|
|
{
|
|
ShadowLowest,
|
|
ShadowText,
|
|
ShadowBuffer,
|
|
ShadowShape
|
|
};
|
|
|
|
QgsTextShadowSettings();
|
|
|
|
QgsTextShadowSettings( const QgsTextShadowSettings &other );
|
|
%Docstring
|
|
Copy constructor.
|
|
|
|
:param other: source QgsTextShadowSettings
|
|
%End
|
|
|
|
|
|
~QgsTextShadowSettings();
|
|
|
|
bool operator==( const QgsTextShadowSettings &other ) const;
|
|
bool operator!=( const QgsTextShadowSettings &other ) const;
|
|
|
|
bool enabled() const;
|
|
%Docstring
|
|
Returns whether the shadow is enabled.
|
|
|
|
.. seealso:: :py:func:`setEnabled`
|
|
%End
|
|
|
|
void setEnabled( bool enabled );
|
|
%Docstring
|
|
Sets whether the text shadow will be drawn.
|
|
|
|
:param enabled: set to ``True`` to draw shadow
|
|
|
|
.. seealso:: :py:func:`enabled`
|
|
%End
|
|
|
|
QgsTextShadowSettings::ShadowPlacement shadowPlacement() const;
|
|
%Docstring
|
|
Returns the placement for the drop shadow. The placement determines
|
|
both the z-order stacking position for the shadow and the what shape (e.g., text,
|
|
background shape) is used for casting the shadow.
|
|
|
|
.. seealso:: :py:func:`setShadowPlacement`
|
|
%End
|
|
|
|
void setShadowPlacement( QgsTextShadowSettings::ShadowPlacement placement );
|
|
%Docstring
|
|
Sets the placement for the drop shadow. The placement determines
|
|
both the z-order stacking position for the shadow and the what shape (e.g., text,
|
|
background shape) is used for casting the shadow.
|
|
|
|
:param placement: shadow placement
|
|
|
|
.. seealso:: :py:func:`shadowPlacement`
|
|
%End
|
|
|
|
int offsetAngle() const;
|
|
%Docstring
|
|
Returns the angle for offsetting the position of the shadow from the text.
|
|
|
|
.. seealso:: :py:func:`setOffsetAngle`
|
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
|
%End
|
|
|
|
void setOffsetAngle( int angle );
|
|
%Docstring
|
|
Sets the angle for offsetting the position of the shadow from the text.
|
|
|
|
:param angle: offset angle in degrees
|
|
|
|
.. seealso:: :py:func:`offsetAngle`
|
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
|
%End
|
|
|
|
double offsetDistance() const;
|
|
%Docstring
|
|
Returns the distance for offsetting the position of the shadow from the text. Offset units
|
|
are retrieved via :py:func:`~QgsTextShadowSettings.offsetUnit`.
|
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
|
%End
|
|
|
|
void setOffsetDistance( double distance );
|
|
%Docstring
|
|
Sets the distance for offsetting the position of the shadow from the text. Offset units
|
|
are specified via :py:func:`~QgsTextShadowSettings.setOffsetUnit`.
|
|
|
|
:param distance: offset distance
|
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
|
%End
|
|
|
|
QgsUnitTypes::RenderUnit offsetUnit() const;
|
|
%Docstring
|
|
Returns the units used for the shadow's offset.
|
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
|
|
|
.. seealso:: :py:func:`offsetDistance`
|
|
%End
|
|
|
|
void setOffsetUnit( QgsUnitTypes::RenderUnit units );
|
|
%Docstring
|
|
Sets the units used for the shadow's offset.
|
|
|
|
:param units: shadow distance units
|
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
|
|
|
.. seealso:: :py:func:`setOffsetDistance`
|
|
%End
|
|
|
|
QgsMapUnitScale offsetMapUnitScale() const;
|
|
%Docstring
|
|
Returns the map unit scale object for the shadow offset distance. This is only used if the
|
|
:py:func:`~QgsTextShadowSettings.offsetUnit` is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
|
|
|
|
.. seealso:: :py:func:`setOffsetMapUnitScale`
|
|
|
|
.. seealso:: :py:func:`offsetUnit`
|
|
%End
|
|
|
|
void setOffsetMapUnitScale( const QgsMapUnitScale &scale );
|
|
%Docstring
|
|
Sets the map unit scale object for the shadow offset distance. This is only used if the
|
|
:py:func:`~QgsTextShadowSettings.offsetUnit` is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
|
|
|
|
:param scale: scale for shadow offset
|
|
|
|
.. seealso:: :py:func:`offsetMapUnitScale`
|
|
|
|
.. seealso:: :py:func:`setOffsetUnit`
|
|
%End
|
|
|
|
bool offsetGlobal() const;
|
|
%Docstring
|
|
Returns ``True`` if the global shadow offset will be used.
|
|
|
|
.. seealso:: :py:func:`setOffsetGlobal`
|
|
%End
|
|
|
|
void setOffsetGlobal( bool global );
|
|
%Docstring
|
|
Sets whether the global shadow offset should be used.
|
|
|
|
:param global: set to ``True`` to use global shadow offset.
|
|
%End
|
|
|
|
double blurRadius() const;
|
|
%Docstring
|
|
Returns the blur radius for the shadow. Radius units are retrieved via :py:func:`~QgsTextShadowSettings.blurRadiusUnits`.
|
|
|
|
.. seealso:: :py:func:`setBlurRadius`
|
|
|
|
.. seealso:: :py:func:`blurRadiusUnit`
|
|
%End
|
|
|
|
void setBlurRadius( double blurRadius );
|
|
%Docstring
|
|
Sets the blur radius for the shadow. Radius units are specified via :py:func:`~QgsTextShadowSettings.setBlurRadiusUnits`.
|
|
|
|
:param blurRadius: blur radius
|
|
|
|
.. seealso:: :py:func:`blurRadius`
|
|
|
|
.. seealso:: :py:func:`setBlurRadiusUnit`
|
|
%End
|
|
|
|
QgsUnitTypes::RenderUnit blurRadiusUnit() const;
|
|
%Docstring
|
|
Returns the units used for the shadow's blur radius.
|
|
|
|
.. seealso:: :py:func:`setBlurRadiusUnit`
|
|
|
|
.. seealso:: :py:func:`blurRadius`
|
|
%End
|
|
|
|
void setBlurRadiusUnit( QgsUnitTypes::RenderUnit units );
|
|
%Docstring
|
|
Sets the units used for the shadow's blur radius.
|
|
|
|
:param units: shadow blur radius units
|
|
|
|
.. seealso:: :py:func:`blurRadiusUnit`
|
|
|
|
.. seealso:: :py:func:`setBlurRadius`
|
|
%End
|
|
|
|
QgsMapUnitScale blurRadiusMapUnitScale() const;
|
|
%Docstring
|
|
Returns the map unit scale object for the shadow blur radius. This is only used if the
|
|
:py:func:`~QgsTextShadowSettings.blurRadiusUnit` is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
|
|
|
|
.. seealso:: :py:func:`setBlurRadiusMapUnitScale`
|
|
|
|
.. seealso:: :py:func:`blurRadiusUnit`
|
|
%End
|
|
|
|
void setBlurRadiusMapUnitScale( const QgsMapUnitScale &scale );
|
|
%Docstring
|
|
Sets the map unit scale object for the shadow blur radius. This is only used if the
|
|
:py:func:`~QgsTextShadowSettings.blurRadiusUnit` is set to :py:class:`QgsUnitTypes`.RenderMapUnit.
|
|
|
|
:param scale: scale for shadow blur radius
|
|
|
|
.. seealso:: :py:func:`blurRadiusMapUnitScale`
|
|
|
|
.. seealso:: :py:func:`setBlurRadiusUnit`
|
|
%End
|
|
|
|
bool blurAlphaOnly() const;
|
|
%Docstring
|
|
Returns whether only the alpha channel for the shadow will be blurred.
|
|
|
|
.. seealso:: :py:func:`setBlurAlphaOnly`
|
|
%End
|
|
|
|
void setBlurAlphaOnly( bool alphaOnly );
|
|
%Docstring
|
|
Sets whether only the alpha channel for the shadow should be blurred.
|
|
|
|
:param alphaOnly: set to ``True`` to blur only the alpha channel. If ``False``, all channels (including
|
|
red, green and blue channel) will be blurred.
|
|
|
|
.. seealso:: :py:func:`blurAlphaOnly`
|
|
%End
|
|
|
|
double opacity() const;
|
|
%Docstring
|
|
Returns the shadow's 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 shadow's opacity.
|
|
|
|
:param opacity: opacity as a double value between 0 (fully transparent) and 1 (totally
|
|
opaque)
|
|
|
|
.. seealso:: :py:func:`opacity`
|
|
%End
|
|
|
|
int scale() const;
|
|
%Docstring
|
|
Returns the scaling used for the drop shadow (in percentage of original size).
|
|
|
|
.. seealso:: :py:func:`setScale`
|
|
%End
|
|
|
|
void setScale( int scale );
|
|
%Docstring
|
|
Sets the scaling used for the drop shadow (in percentage of original size).
|
|
|
|
:param scale: scale percent for drop shadow
|
|
|
|
.. seealso:: :py:func:`scale`
|
|
%End
|
|
|
|
QColor color() const;
|
|
%Docstring
|
|
Returns the color of the drop shadow.
|
|
|
|
.. seealso:: :py:func:`setColor`
|
|
%End
|
|
|
|
void setColor( const QColor &color );
|
|
%Docstring
|
|
Sets the color for the drop shadow.
|
|
|
|
:param color: shadow color
|
|
|
|
.. seealso:: :py:func:`color`
|
|
%End
|
|
|
|
QPainter::CompositionMode blendMode() const;
|
|
%Docstring
|
|
Returns the blending mode used for drawing the drop shadow.
|
|
|
|
.. seealso:: :py:func:`setBlendMode`
|
|
%End
|
|
|
|
void setBlendMode( QPainter::CompositionMode mode );
|
|
%Docstring
|
|
Sets the blending mode used for drawing the drop shadow.
|
|
|
|
: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
|
|
|
|
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/qgstextshadowsettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|