2017-11-20 15:13:26 +10:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutitemscalebar.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsLayoutItemScaleBar: QgsLayoutItem
|
|
|
|
{
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
A layout item subclass for scale bars.
|
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
.. versionadded:: 3.0
|
|
|
|
%End
|
|
|
|
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgslayoutitemscalebar.h"
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
QgsLayoutItemScaleBar( QgsLayout *layout );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsLayoutItemScaleBar, with the specified parent ``layout``.
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
virtual int type() const;
|
|
|
|
|
2017-12-20 16:39:33 +07:00
|
|
|
virtual QIcon icon() const;
|
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
|
|
|
|
static QgsLayoutItemScaleBar *create( QgsLayout *layout ) /Factory/;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns a new scale bar item for the specified ``layout``.
|
|
|
|
|
|
|
|
The caller takes responsibility for deleting the returned object.
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
2017-11-20 16:45:52 +10:00
|
|
|
virtual QgsLayoutSize minimumSize() const;
|
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
|
|
|
|
int numberOfSegments() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of segments included in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setNumberOfSegments()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`numberOfSegmentsLeft()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setNumberOfSegments( int segments );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the number of ``segments`` included in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`numberOfSegments()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setNumberOfSegmentsLeft()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
int numberOfSegmentsLeft() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of segments included in the left part of the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setNumberOfSegmentsLeft()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`numberOfSegments()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setNumberOfSegmentsLeft( int segments );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the number of ``segments`` included in the left part of the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`numberOfSegmentsLeft()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setNumberOfSegments()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double unitsPerSegment() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of scalebar units per segment.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setUnitsPerSegment()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setUnitsPerSegment( double units );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the number of scalebar ``units`` per segment.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`unitsPerSegment()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsScaleBarSettings::SegmentSizeMode segmentSizeMode() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the size mode for the scale bar segments.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setSegmentSizeMode()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`minBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`maxBarWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setSegmentSizeMode( QgsScaleBarSettings::SegmentSizeMode mode );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the size ``mode`` for scale bar segments.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`segmentSizeMode()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMinimumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMaximumBarWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double minimumBarWidth() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the minimum width (in millimeters) for scale bar segments. This
|
|
|
|
property is only effective if the segmentSizeMode() is set
|
|
|
|
to SegmentSizeFitWidth.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`segmentSizeMode()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMinimumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`maximumBarWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setMinimumBarWidth( double minWidth );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the minimum ``width`` (in millimeters) for scale bar segments. This
|
|
|
|
property is only effective if the segmentSizeMode() is set
|
|
|
|
to SegmentSizeFitWidth.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`minimumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMaximumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setSegmentSizeMode()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double maximumBarWidth() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the maximum width (in millimeters) for scale bar segments. This
|
|
|
|
property is only effective if the segmentSizeMode() is set
|
|
|
|
to SegmentSizeFitWidth.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`segmentSizeMode()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMaximumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`minimumBarWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setMaximumBarWidth( double maxWidth );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the maximum ``width`` (in millimeters) for scale bar segments. This
|
|
|
|
property is only effective if the segmentSizeMode() is set
|
|
|
|
to SegmentSizeFitWidth.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`minimumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMinimumBarWidth()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setSegmentSizeMode()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double mapUnitsPerScaleBarUnit() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the number of map units per scale bar unit used by the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setMapUnitsPerScaleBarUnit()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setMapUnitsPerScaleBarUnit( double units );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the number of map ``units`` per scale bar unit used by the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`mapUnitsPerScaleBarUnit()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QString unitLabel() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the label for units.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setUnitLabel()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setUnitLabel( const QString &label );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``label`` for units.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`unitLabel()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QFont font() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the font used for drawing text in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFont()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setFont( const QFont &font );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``font`` used for drawing text in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFont()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QColor fontColor() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the color used for drawing text in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFontColor()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`font()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setFontColor( const QColor &color );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``color`` used for drawing text in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`fontColor()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFont()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QColor fillColor() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the color used for fills in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFillColor()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`fillColor2()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setFillColor( const QColor &color );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``color`` used for fills in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`fillColor()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFillColor2()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QColor fillColor2() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the secondary color used for fills in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFillColor2()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`fillColor()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setFillColor2( const QColor &color );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the secondary ``color`` used for fills in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`fillColor2()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setFillColor2()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QColor lineColor() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the color used for lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setLineColor()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setLineColor( const QColor &color );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``color`` used for lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`lineColor()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double lineWidth() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the line width in millimeters for lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setLineWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setLineWidth( double width );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the line ``width`` in millimeters for lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`lineWidth()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QPen pen() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the pen used for drawing outlines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setPen()`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`brush()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QBrush brush() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the primary brush for the scalebar.
|
|
|
|
|
|
|
|
:return: QBrush used for filling the scalebar
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setBrush`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`brush2`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`pen`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QBrush brush2() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the secondary brush for the scalebar. This is used for alternating color style scalebars, such
|
|
|
|
as single and double box styles.
|
|
|
|
|
|
|
|
:return: QBrush used for secondary color areas
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setBrush2`
|
2017-12-15 10:36:55 -04:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`brush`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double height() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the scalebar height (in millimeters).
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setHeight()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setHeight( double height );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the scalebar ``height`` (in millimeters).
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`height()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
2018-01-07 14:53:29 +10:00
|
|
|
void setLinkedMap( QgsLayoutItemMap *map );
|
2017-11-20 15:13:26 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``map`` item linked to the scalebar.
|
|
|
|
|
2018-01-07 14:53:29 +10:00
|
|
|
.. seealso:: :py:func:`linkedMap()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
2018-01-07 14:53:29 +10:00
|
|
|
QgsLayoutItemMap *linkedMap() const;
|
2017-11-20 15:13:26 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the map item linked to the scalebar.
|
|
|
|
|
2018-01-07 14:53:29 +10:00
|
|
|
.. seealso:: :py:func:`setLinkedMap()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double labelBarSpace() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the spacing (in millimeters) between labels and the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setLabelBarSpace()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setLabelBarSpace( double space );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the spacing (in millimeters) between labels and the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`labelBarSpace()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
double boxContentSpace() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the spacing (margin) between the scalebar box and content in millimeters.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setBoxContentSpace()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setBoxContentSpace( double space );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the ``space`` (margin) between the scalebar box and content in millimeters.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`boxContentSpace()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsScaleBarSettings::Alignment alignment() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the scalebar alignment.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setAlignment()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setAlignment( QgsScaleBarSettings::Alignment alignment );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the scalebar ``alignment``.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`alignment()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QgsUnitTypes::DistanceUnit units() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the distance units used by the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setUnits()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setUnits( QgsUnitTypes::DistanceUnit units );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the distance ``units`` used by the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`units()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
Qt::PenJoinStyle lineJoinStyle() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the join style used for drawing lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setLineJoinStyle()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setLineJoinStyle( Qt::PenJoinStyle style );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the join ``style`` used when drawing the lines in the scalebar
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`lineJoinStyle()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
Qt::PenCapStyle lineCapStyle() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the cap style used for drawing lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setLineCapStyle()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void setLineCapStyle( Qt::PenCapStyle style );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the cap ``style`` used when drawing the lines in the scalebar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`lineCapStyle()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void applyDefaultSettings();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Applies the default scalebar settings to the scale bar.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`applyDefaultSize()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
2017-11-21 12:05:41 +10:00
|
|
|
QgsUnitTypes::DistanceUnit guessUnits() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Attempts to guess the most reasonable unit choice for the scalebar, given
|
|
|
|
the current linked map's scale.
|
|
|
|
|
|
|
|
This method also considers the linked map's CRS, in order to determine if
|
|
|
|
metric or imperial units are more appropriate.
|
2017-11-21 12:05:41 +10:00
|
|
|
%End
|
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
void applyDefaultSize( QgsUnitTypes::DistanceUnit units = QgsUnitTypes::DistanceMeters );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Applies the default size to the scale bar (scale bar 1/5 of map item width)
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`applyDefaultSettings()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
2017-11-21 11:00:46 +10:00
|
|
|
void resizeToMinimumWidth();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Resizes the scale bar to its minimum width, without changing the height.
|
2017-11-21 11:00:46 +10:00
|
|
|
%End
|
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
void setStyle( const QString &name );
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets the scale bar style by ``name``.
|
2017-11-20 15:13:26 +10:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
The ``name`` parameter gives the (untranslated) style name.
|
|
|
|
Possibilities are: 'Single Box', 'Double Box', 'Line Ticks Middle',
|
|
|
|
'Line Ticks Down', 'Line Ticks Up', 'Numeric'
|
2017-11-20 15:13:26 +10:00
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`style()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
QString style() const;
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Returns the scale bar style name.
|
|
|
|
|
2017-12-05 20:04:14 -04:00
|
|
|
.. seealso:: :py:func:`setStyle()`
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
|
|
|
|
|
|
|
void update();
|
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Adjusts the scale bar box size and updates the item.
|
2017-11-20 15:13:26 +10:00
|
|
|
%End
|
2017-11-20 16:45:52 +10:00
|
|
|
|
2017-11-20 15:13:26 +10:00
|
|
|
virtual void refreshDataDefinedProperty( const QgsLayoutObject::DataDefinedProperty property = QgsLayoutObject::AllProperties );
|
|
|
|
|
2017-11-30 08:08:40 +10:00
|
|
|
virtual void finalizeRestoreFromXml();
|
2017-11-20 15:13:26 +10:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = 0 );
|
|
|
|
|
|
|
|
virtual bool writePropertiesToElement( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const;
|
|
|
|
|
|
|
|
virtual bool readPropertiesFromElement( const QDomElement &element, const QDomDocument &document, const QgsReadWriteContext &context );
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/layout/qgslayoutitemscalebar.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|