QGIS/python/core/auto_generated/scalebar/qgsscalebarsettings.sip.in
Nyall Dawson 3f6b490218 Sipify
2025-04-02 11:11:10 +10:00

809 lines
20 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/scalebar/qgsscalebarsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsScaleBarSettings
{
%Docstring(signature="appended")
Stores the appearance and layout settings for scalebar drawing with
:py:class:`QgsScaleBarRenderer`.
%End
%TypeHeaderCode
#include "qgsscalebarsettings.h"
%End
public:
QgsScaleBarSettings();
~QgsScaleBarSettings();
QgsScaleBarSettings( const QgsScaleBarSettings &other );
int numberOfSegments() const;
%Docstring
Returns the number of segments included in the scalebar.
.. seealso:: :py:func:`setNumberOfSegments`
.. seealso:: :py:func:`numberOfSegmentsLeft`
%End
void setNumberOfSegments( int segments );
%Docstring
Sets the number of ``segments`` included in the scalebar.
.. seealso:: :py:func:`numberOfSegments`
.. seealso:: :py:func:`setNumberOfSegmentsLeft`
%End
int numberOfSegmentsLeft() const;
%Docstring
Returns the number of segments included in the left part of the
scalebar.
.. seealso:: :py:func:`setNumberOfSegmentsLeft`
.. seealso:: :py:func:`numberOfSegments`
%End
void setNumberOfSegmentsLeft( int segments );
%Docstring
Sets the number of ``segments`` included in the left part of the
scalebar.
.. seealso:: :py:func:`numberOfSegmentsLeft`
.. seealso:: :py:func:`setNumberOfSegments`
%End
int numberOfSubdivisions() const;
%Docstring
Returns the number of subdivisions for segments included in the right
part of the scalebar (only used for some scalebar types).
.. note::
The number of subdivisions represents the number of subdivision segments, not the number of subdivision lines. E.g.
if the number is 1 then NO subdivision lines will be shown.
.. seealso:: :py:func:`setNumberOfSubdivisions`
.. versionadded:: 3.14
%End
void setNumberOfSubdivisions( int subdivisions );
%Docstring
Sets the number of ``subdivisions`` for segments included in the right
part of the scalebar (only used for some scalebar types).
.. note::
The number of subdivisions represents the number of subdivision segments, not the number of subdivision lines. E.g.
if the number is 1 then NO subdivision lines will be shown.
.. seealso:: :py:func:`numberOfSubdivisions`
.. versionadded:: 3.14
%End
double subdivisionsHeight() const;
%Docstring
Returns the scalebar subdivisions height (in millimeters) for segments
included in the right part of the scalebar (only used for some scalebar
types).
.. seealso:: :py:func:`setSubdivisionsHeight`
.. versionadded:: 3.14
%End
void setSubdivisionsHeight( double height );
%Docstring
Sets the scalebar subdivisions ``height`` (in millimeters) for segments
included in the right part of the scalebar (only used for some scalebar
types).
.. seealso:: :py:func:`subdivisionsHeight`
.. versionadded:: 3.14
%End
double unitsPerSegment() const;
%Docstring
Returns the number of scalebar units per segment.
.. seealso:: :py:func:`setUnitsPerSegment`
%End
void setUnitsPerSegment( double units );
%Docstring
Sets the number of scalebar ``units`` per segment.
.. seealso:: :py:func:`unitsPerSegment`
%End
Qgis::ScaleBarSegmentSizeMode segmentSizeMode() const;
%Docstring
Returns the size mode for the scale bar segments.
.. seealso:: :py:func:`setSegmentSizeMode`
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`maximumBarWidth`
%End
void setSegmentSizeMode( Qgis::ScaleBarSegmentSizeMode mode );
%Docstring
Sets the size ``mode`` for scale bar segments.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`setMaximumBarWidth`
%End
double minimumBarWidth() const;
%Docstring
Returns the minimum width (in millimeters) for scale bar segments. This
property is only effective if the
:py:func:`~QgsScaleBarSettings.segmentSizeMode` is set to
SegmentSizeFitWidth.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`maximumBarWidth`
%End
void setMinimumBarWidth( double width );
%Docstring
Sets the minimum ``width`` (in millimeters) for scale bar segments. This
property is only effective if the
:py:func:`~QgsScaleBarSettings.segmentSizeMode` is set to
SegmentSizeFitWidth.
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`setMaximumBarWidth`
.. seealso:: :py:func:`setSegmentSizeMode`
%End
double maximumBarWidth() const;
%Docstring
Returns the maximum width (in millimeters) for scale bar segments. This
property is only effective if the
:py:func:`~QgsScaleBarSettings.segmentSizeMode` is set to
SegmentSizeFitWidth.
.. seealso:: :py:func:`segmentSizeMode`
.. seealso:: :py:func:`setMaximumBarWidth`
.. seealso:: :py:func:`minimumBarWidth`
%End
void setMaximumBarWidth( double width );
%Docstring
Sets the maximum ``width`` (in millimeters) for scale bar segments. This
property is only effective if the
:py:func:`~QgsScaleBarSettings.segmentSizeMode` is set to
SegmentSizeFitWidth.
.. seealso:: :py:func:`minimumBarWidth`
.. seealso:: :py:func:`setMinimumBarWidth`
.. seealso:: :py:func:`setSegmentSizeMode`
%End
Qgis::DistanceUnit units() const;
%Docstring
Returns the distance units used by the scalebar.
.. seealso:: :py:func:`setUnits`
%End
void setUnits( Qgis::DistanceUnit units );
%Docstring
Sets the distance ``units`` used by the scalebar.
.. seealso:: :py:func:`units`
%End
double mapUnitsPerScaleBarUnit() const;
%Docstring
Returns the number of map units per scale bar unit used by the scalebar.
.. seealso:: :py:func:`setMapUnitsPerScaleBarUnit`
%End
void setMapUnitsPerScaleBarUnit( double units );
%Docstring
Sets the number of map ``units`` per scale bar unit used by the
scalebar.
.. seealso:: :py:func:`mapUnitsPerScaleBarUnit`
%End
QString unitLabel() const;
%Docstring
Returns the label for units.
.. seealso:: :py:func:`setUnitLabel`
%End
void setUnitLabel( const QString &label );
%Docstring
Sets the ``label`` for units.
.. seealso:: :py:func:`unitLabel`
%End
QgsTextFormat &textFormat();
%Docstring
Returns the text format used for drawing text in the scalebar.
.. seealso:: :py:func:`setTextFormat`
.. versionadded:: 3.2
%End
void setTextFormat( const QgsTextFormat &format );
%Docstring
Sets the text ``format`` used for drawing text in the scalebar.
.. seealso:: :py:func:`textFormat`
.. versionadded:: 3.2
%End
QFont font() const /Deprecated="Since 3.40. Use textFormat() instead."/;
%Docstring
Returns the font used for drawing text in the scalebar.
.. seealso:: :py:func:`setFont`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.textFormat` instead.
%End
void setFont( const QFont &font ) /Deprecated="Since 3.40. Use setTextFormat() instead."/;
%Docstring
Sets the ``font`` used for drawing text in the scalebar.
.. seealso:: :py:func:`font`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setTextFormat` instead.
%End
QColor fontColor() const /Deprecated="Since 3.40. Use textFormat() instead."/;
%Docstring
Returns the color used for drawing text in the scalebar.
.. seealso:: :py:func:`setFontColor`
.. seealso:: :py:func:`font`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.textFormat` instead.
%End
void setFontColor( const QColor &color ) /Deprecated="Since 3.40. Use textFormat() instead."/;
%Docstring
Sets the ``color`` used for drawing text in the scalebar.
.. seealso:: :py:func:`fontColor`
.. seealso:: :py:func:`setFont`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.textFormat` instead.
%End
QColor fillColor() const /Deprecated="Since 3.40. Use fillSymbol() instead."/;
%Docstring
Returns the color used for fills in the scalebar.
.. seealso:: :py:func:`setFillColor`
.. seealso:: :py:func:`fillColor2`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.fillSymbol` instead.
%End
void setFillColor( const QColor &color ) /Deprecated="Since 3.40. Use setFillSymbol() instead."/;
%Docstring
Sets the ``color`` used for fills in the scalebar.
.. seealso:: :py:func:`fillColor`
.. seealso:: :py:func:`setFillColor2`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setFillSymbol` instead.
%End
QColor fillColor2() const /Deprecated="Since 3.40. Use alternateFillSymbol() instead."/;
%Docstring
Returns the secondary color used for fills in the scalebar.
.. seealso:: :py:func:`setFillColor2`
.. seealso:: :py:func:`fillColor`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.alternateFillSymbol` instead.
%End
void setFillColor2( const QColor &color ) /Deprecated="Since 3.40. Use setAlternateFillSymbol() instead."/;
%Docstring
Sets the secondary ``color`` used for fills in the scalebar.
.. seealso:: :py:func:`fillColor2`
.. seealso:: :py:func:`setFillColor2`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setAlternateFillSymbol` instead.
%End
QColor lineColor() const /Deprecated="Since 3.40. Use lineSymbol() instead."/;
%Docstring
Returns the color used for lines in the scalebar.
.. seealso:: :py:func:`setLineColor`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.lineSymbol` instead.
%End
void setLineColor( const QColor &color ) /Deprecated="Since 3.40. Use setLineSymbol() instead."/;
%Docstring
Sets the ``color`` used for lines in the scalebar.
.. seealso:: :py:func:`lineColor`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setLineSymbol` instead.
%End
double lineWidth() const /Deprecated="Since 3.40. Use lineSymbol() instead."/;
%Docstring
Returns the line width in millimeters for lines in the scalebar.
.. seealso:: :py:func:`setLineWidth`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.lineSymbol` instead.
%End
void setLineWidth( double width ) /Deprecated="Since 3.40. Use setLineSymbol() instead."/;
%Docstring
Sets the line ``width`` in millimeters for lines in the scalebar.
.. seealso:: :py:func:`lineWidth`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setLineSymbol` instead.
%End
QPen pen() const /Deprecated="Since 3.40. Use lineSymbol() instead."/;
%Docstring
Returns the pen used for drawing outlines in the scalebar.
.. seealso:: :py:func:`setPen`
.. seealso:: :py:func:`brush`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.lineSymbol` instead.
%End
void setPen( const QPen &pen ) /Deprecated="Since 3.40. Use setLineSymbol() instead."/;
%Docstring
Sets the pen used for drawing outlines in the scalebar.
.. seealso:: :py:func:`pen`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setLineSymbol` instead.
%End
QgsLineSymbol *lineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar (only used for some
scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`divisionLineSymbol`
.. seealso:: :py:func:`subdivisionLineSymbol`
.. versionadded:: 3.14
%End
void setLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar (only used for some
scalebar types). Ownership of ``symbol`` is transferred to the scalebar.
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`setDivisionLineSymbol`
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsLineSymbol *divisionLineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar divisions (only used
for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setDivisionLineSymbol`
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`subdivisionLineSymbol`
.. versionadded:: 3.14
%End
void setDivisionLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar divisions (only
used for some scalebar types). Ownership of ``symbol`` is transferred to
the scalebar.
.. seealso:: :py:func:`divisionLineSymbol`
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsLineSymbol *subdivisionLineSymbol() const;
%Docstring
Returns the line symbol used to render the scalebar subdivisions (only
used for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setSubdivisionLineSymbol`
.. seealso:: :py:func:`lineSymbol`
.. seealso:: :py:func:`divisionLineSymbol`
.. versionadded:: 3.14
%End
void setSubdivisionLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
Sets the line ``symbol`` used to render the scalebar subdivisions (only
used for some scalebar types). Ownership of ``symbol`` is transferred to
the scalebar.
.. seealso:: :py:func:`subdivisionLineSymbol`
.. seealso:: :py:func:`setLineSymbol`
.. seealso:: :py:func:`setDivisionLineSymbol`
.. versionadded:: 3.14
%End
QgsFillSymbol *fillSymbol() const;
%Docstring
Returns the primary fill symbol used to render the scalebar (only used
for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setFillSymbol`
.. seealso:: :py:func:`alternateFillSymbol`
.. versionadded:: 3.14
%End
void setFillSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the primary fill ``symbol`` used to render the scalebar (only used
for some scalebar types). Ownership of ``symbol`` is transferred to the
scalebar.
.. seealso:: :py:func:`fillSymbol`
.. seealso:: :py:func:`setAlternateFillSymbol`
.. versionadded:: 3.14
%End
QgsFillSymbol *alternateFillSymbol() const;
%Docstring
Returns the secondary fill symbol used to render the scalebar (only used
for some scalebar types).
Ownership is not transferred.
.. seealso:: :py:func:`setAlternateFillSymbol`
.. seealso:: :py:func:`fillSymbol`
.. versionadded:: 3.14
%End
void setAlternateFillSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the secondary fill ``symbol`` used to render the scalebar (only
used for some scalebar types). Ownership of ``symbol`` is transferred to
the scalebar.
.. seealso:: :py:func:`alternateFillSymbol`
.. seealso:: :py:func:`setFillSymbol`
.. versionadded:: 3.14
%End
QBrush brush() const /Deprecated="Since 3.40. Use fillSymbol() instead."/;
%Docstring
Returns the primary brush used for filling the scalebar.
.. seealso:: :py:func:`setBrush`
.. seealso:: :py:func:`brush2`
.. seealso:: :py:func:`pen`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.fillSymbol` instead.
%End
void setBrush( const QBrush &brush ) /Deprecated="Since 3.40. Use setFillSymbol() instead."/;
%Docstring
Sets the primary brush used for filling the scalebar.
.. seealso:: :py:func:`brush`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setFillSymbol` instead.
%End
QBrush brush2() const /Deprecated="Since 3.40. Use alternateFillSymbol() instead."/;
%Docstring
Returns the secondary brush for the scalebar. This is used for
alternating color style scalebars, such as single and double box styles.
.. seealso:: :py:func:`setBrush2`
.. seealso:: :py:func:`brush`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.alternateFillSymbol` instead.
%End
void setBrush2( const QBrush &brush ) /Deprecated="Since 3.40. Use setAlternateFillSymbol() instead."/;
%Docstring
Sets the secondary brush used for filling the scalebar.
.. seealso:: :py:func:`brush`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setAlternateFillSymbol` instead.
%End
double height() const;
%Docstring
Returns the scalebar height (in millimeters).
.. seealso:: :py:func:`setHeight`
%End
void setHeight( double height );
%Docstring
Sets the scalebar ``height`` (in millimeters).
.. seealso:: :py:func:`height`
%End
double labelBarSpace() const;
%Docstring
Returns the spacing (in millimeters) between labels and the scalebar.
.. seealso:: :py:func:`setLabelBarSpace`
%End
void setLabelBarSpace( double space );
%Docstring
Sets the spacing (in millimeters) between labels and the scalebar.
.. seealso:: :py:func:`labelBarSpace`
%End
Qgis::ScaleBarDistanceLabelVerticalPlacement labelVerticalPlacement() const;
%Docstring
Returns the vertical placement of text labels.
.. seealso:: :py:func:`setLabelVerticalPlacement`
.. versionadded:: 3.10
%End
void setLabelVerticalPlacement( Qgis::ScaleBarDistanceLabelVerticalPlacement placement );
%Docstring
Sets the vertical ``placement`` of text labels.
.. seealso:: :py:func:`labelVerticalPlacement`
.. versionadded:: 3.10
%End
Qgis::ScaleBarDistanceLabelHorizontalPlacement labelHorizontalPlacement() const;
%Docstring
Returns the horizontal placement of text labels.
.. seealso:: :py:func:`setLabelHorizontalPlacement`
.. versionadded:: 3.10
%End
void setLabelHorizontalPlacement( Qgis::ScaleBarDistanceLabelHorizontalPlacement placement );
%Docstring
Sets the horizontal ``placement`` of text labels.
.. seealso:: :py:func:`labelHorizontalPlacement`
.. versionadded:: 3.10
%End
double boxContentSpace() const;
%Docstring
Returns the spacing (margin) between the scalebar box and content in
millimeters.
.. seealso:: :py:func:`setBoxContentSpace`
%End
void setBoxContentSpace( double space );
%Docstring
Sets the ``space`` (margin) between the scalebar box and content in
millimeters.
.. seealso:: :py:func:`boxContentSpace`
%End
Qgis::ScaleBarAlignment alignment() const;
%Docstring
Returns the scalebar alignment.
.. seealso:: :py:func:`setAlignment`
%End
void setAlignment( Qgis::ScaleBarAlignment alignment );
%Docstring
Sets the scalebar ``alignment``.
.. seealso:: :py:func:`alignment`
%End
Qt::PenJoinStyle lineJoinStyle() const /Deprecated="Since 3.40. Use lineSymbol() instead."/;
%Docstring
Returns the join style used for drawing lines in the scalebar.
.. seealso:: :py:func:`setLineJoinStyle`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.lineSymbol` instead.
%End
void setLineJoinStyle( Qt::PenJoinStyle style ) /Deprecated="Since 3.40. Use setLineSymbol() instead."/;
%Docstring
Sets the join ``style`` used when drawing the lines in the scalebar
.. seealso:: :py:func:`lineJoinStyle`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setLineSymbol` instead.
%End
Qt::PenCapStyle lineCapStyle() const /Deprecated="Since 3.40. Use lineSymbol() instead."/;
%Docstring
Returns the cap style used for drawing lines in the scalebar.
.. seealso:: :py:func:`setLineCapStyle`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.lineSymbol` instead.
%End
void setLineCapStyle( Qt::PenCapStyle style ) /Deprecated="Since 3.40. Use setLineSymbol() instead."/;
%Docstring
Sets the cap ``style`` used when drawing the lines in the scalebar.
.. seealso:: :py:func:`lineCapStyle`
.. deprecated:: 3.40
Use :py:func:`~QgsScaleBarSettings.setLineSymbol` instead.
%End
const QgsNumericFormat *numericFormat() const;
%Docstring
Returns the numeric format used for numbers in the scalebar.
.. seealso:: :py:func:`setNumericFormat`
.. versionadded:: 3.12
%End
void setNumericFormat( QgsNumericFormat *format /Transfer/ );
%Docstring
Sets the numeric ``format`` used for numbers in the scalebar.
Ownership of ``format`` is transferred to the settings.
.. seealso:: :py:func:`numericFormat`
.. versionadded:: 3.12
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/scalebar/qgsscalebarsettings.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/