QGIS/python/core/layout/qgslayoutitemmapgrid.sip

925 lines
22 KiB
Plaintext
Raw Normal View History

2017-10-21 14:37:54 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemmapgrid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutItemMapGridStack : QgsLayoutItemMapItemStack
{
%Docstring
A collection of grids which is drawn above the map content in a
2017-12-15 10:36:55 -04:00
QgsLayoutItemMap. The grid stack controls which grids are drawn and the
order they are drawn in.
2017-10-21 14:37:54 +10:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:class:`QgsLayoutItemMapGrid`
2017-10-21 14:37:54 +10:00
%End
%TypeHeaderCode
#include "qgslayoutitemmapgrid.h"
%End
public:
QgsLayoutItemMapGridStack( QgsLayoutItemMap *map );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutItemMapGridStack, attached to the specified ``map``.
2017-10-21 14:37:54 +10:00
%End
void addGrid( QgsLayoutItemMapGrid *grid /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Adds a new map ``grid`` to the stack and takes ownership of the grid.
The grid will be added to the end of the stack, and rendered
above any existing map grids already present in the stack.
2017-10-21 14:37:54 +10:00
.. note::
After adding a grid to the stack, updateBoundingRect() and update()
2017-12-15 10:36:55 -04:00
should be called for the QgsLayoutItemMap to prevent rendering artifacts.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`removeGrid()`
2017-10-21 14:37:54 +10:00
%End
void removeGrid( const QString &gridId );
%Docstring
2017-12-15 10:36:55 -04:00
Removes a grid with matching ``gridId`` from the stack and deletes the corresponding QgsLayoutItemMapGrid.
2017-10-21 14:37:54 +10:00
.. note::
After removing a grid from the stack, updateBoundingRect() and update()
2017-12-15 10:36:55 -04:00
should be called for the QgsLayoutItemMap to prevent rendering artifacts.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`addGrid()`
2017-10-21 14:37:54 +10:00
%End
void moveGridUp( const QString &gridId );
%Docstring
2017-12-15 10:36:55 -04:00
Moves a grid with matching ``gridId`` up the stack, causing it to be rendered above other grids.
2017-10-21 14:37:54 +10:00
.. note::
After moving a grid within the stack, update() should be
2017-12-15 10:36:55 -04:00
called for the QgsLayoutItemMap to redraw the map with the new grid stack order.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`moveGridDown()`
2017-10-21 14:37:54 +10:00
%End
void moveGridDown( const QString &gridId );
%Docstring
2017-12-15 10:36:55 -04:00
Moves a grid with matching ``gridId`` down the stack, causing it to be rendered below other grids.
2017-10-21 14:37:54 +10:00
.. note::
After moving a grid within the stack, update() should be
2017-12-15 10:36:55 -04:00
called for the QgsLayoutItemMap to redraw the map with the new grid stack order.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`moveGridUp()`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapGrid *grid( const QString &gridId ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to a grid with matching ``gridId`` within the stack.
:rtype: QgsLayoutItemMapGrid
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`constGrid()`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapGrid *grid( int index ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to a grid at the specified ``index`` within the stack.
:rtype: QgsLayoutItemMapGrid
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`constGrid()`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapGrid &operator[]( int index );
QList< QgsLayoutItemMapGrid * > asList() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of QgsLayoutItemMapGrids contained by the stack.
:rtype: list of QgsLayoutItemMapGrid
2017-10-21 14:37:54 +10:00
%End
2017-10-24 12:02:57 +10:00
virtual bool readXml( const QDomElement &elem, const QDomDocument &doc, const QgsReadWriteContext &context );
2017-10-21 14:37:54 +10:00
double maxGridExtension() const;
%Docstring
2017-12-15 10:36:55 -04:00
Calculates the maximum distance grids within the stack extend
beyond the QgsLayoutItemMap's item rect.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`calculateMaxGridExtension()`
2017-10-21 14:37:54 +10:00
%End
void calculateMaxGridExtension( double &top, double &right, double &bottom, double &left ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Calculates the maximum distance grids within the stack extend beyond the
QgsLayoutItemMap's item rect. This method calculates the distance for each side of the
map item separately.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`maxGridExtension()`
2017-10-21 14:37:54 +10:00
%End
};
class QgsLayoutItemMapGrid : QgsLayoutItemMapItem
{
%Docstring
An individual grid which is drawn above the map content in a
2017-12-15 10:36:55 -04:00
QgsLayoutItemMap.
2017-10-21 14:37:54 +10:00
.. versionadded:: 3.0
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:class:`QgsLayoutItemMapGridStack`
2017-10-21 14:37:54 +10:00
%End
%TypeHeaderCode
#include "qgslayoutitemmapgrid.h"
%End
public:
enum GridUnit
{
MapUnit,
MM,
CM
};
enum GridStyle
{
Solid,
Cross,
Markers,
FrameAnnotationsOnly
};
enum DisplayMode
{
ShowAll,
LatitudeOnly,
LongitudeOnly,
HideAll
};
enum AnnotationPosition
{
InsideMapFrame,
OutsideMapFrame,
};
enum AnnotationDirection
{
Horizontal,
Vertical,
VerticalDescending,
BoundaryDirection
};
enum AnnotationFormat
{
Decimal,
DegreeMinute,
DegreeMinuteSecond,
DecimalWithSuffix,
DegreeMinuteNoSuffix,
DegreeMinutePadded,
DegreeMinuteSecondNoSuffix,
DegreeMinuteSecondPadded,
CustomFormat
};
enum BorderSide
{
Left,
Right,
Bottom,
Top
};
enum FrameStyle
{
NoFrame,
Zebra,
InteriorTicks,
ExteriorTicks,
InteriorExteriorTicks,
LineBorder
};
enum FrameSideFlag
{
FrameLeft,
FrameRight,
FrameTop,
FrameBottom
};
typedef QFlags<QgsLayoutItemMapGrid::FrameSideFlag> FrameSideFlags;
enum AnnotationCoordinate
{
Longitude,
Latitude
};
QgsLayoutItemMapGrid( const QString &name, QgsLayoutItemMap *map );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutItemMapGrid.
:param name: friendly display name for grid
:param map: QgsLayoutItemMap the grid is attached to
2017-10-21 14:37:54 +10:00
%End
virtual void draw( QPainter *painter );
2017-10-24 12:02:57 +10:00
virtual bool writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;
2017-10-21 14:37:54 +10:00
2017-10-24 12:02:57 +10:00
virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc, const QgsReadWriteContext &context );
2017-10-21 14:37:54 +10:00
void setCrs( const QgsCoordinateReferenceSystem &crs );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``crs`` for the grid.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`crs()`
2017-10-21 14:37:54 +10:00
%End
QgsCoordinateReferenceSystem crs() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the CRS for the grid.
:rtype: QgsCoordinateReferenceSystem
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setCrs()`
2017-10-21 14:37:54 +10:00
%End
void setBlendMode( const QPainter::CompositionMode mode );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the blending ``mode`` used for drawing the grid.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`blendMode()`
2017-10-21 14:37:54 +10:00
%End
QPainter::CompositionMode blendMode() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the blending mode used for drawing the grid.
:rtype: QPainter.CompositionMode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBlendMode()`
2017-10-21 14:37:54 +10:00
%End
virtual bool usesAdvancedEffects() const;
double maxExtension() const;
%Docstring
2017-12-15 10:36:55 -04:00
Calculates the maximum distance the grid extends beyond the QgsLayoutItemMap's
item rect (in layout units).
:rtype: float
2017-10-21 14:37:54 +10:00
%End
void calculateMaxExtension( double &top, double &right, double &bottom, double &left ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Calculates the maximum distance the grid extends beyond the
QgsLayoutItemMap's item rect. This method calculates the distance for each side of the
map item separately.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`maxExtension()`
2017-10-21 14:37:54 +10:00
%End
void setUnits( GridUnit unit );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``unit`` to use for grid measurements such as the interval
and offset for grid lines.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`units`
2017-10-21 14:37:54 +10:00
%End
GridUnit units() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the units used for grid measurements such as the interval
and offset for grid lines.
:rtype: GridUnit
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setUnits()`
2017-10-21 14:37:54 +10:00
%End
void setIntervalX( double interval );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``interval`` between grid lines in the x-direction. The units
are controlled through the setUnits method
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setIntervalY()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`intervalX()`
2017-10-21 14:37:54 +10:00
%End
double intervalX() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval between grid lines in the x-direction. The units
are retrieved through the units() method.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setIntervalX()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`intervalY()`
2017-10-21 14:37:54 +10:00
%End
void setIntervalY( double interval );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``interval`` between grid lines in the y-direction. The units
are controlled through the setUnits method
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setIntervalX()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`intervalY()`
2017-10-21 14:37:54 +10:00
%End
double intervalY() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the interval between grid lines in the y-direction. The units
are retrieved through the units() method.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setIntervalY()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`intervalX()`
2017-10-21 14:37:54 +10:00
%End
void setOffsetX( const double offset );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``offset`` for grid lines in the x-direction. The units
are controlled through the setUnits method.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetY()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetX()`
2017-10-21 14:37:54 +10:00
%End
double offsetX() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the offset for grid lines in the x-direction. The units
are retrieved through the units() method.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetX()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetY()`
2017-10-21 14:37:54 +10:00
%End
void setOffsetY( const double offset );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``offset`` for grid lines in the y-direction. The units
are controlled through the setUnits method.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetX()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetY()`
2017-10-21 14:37:54 +10:00
%End
double offsetY() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the offset for grid lines in the y-direction. The units
are retrieved through the units() method.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setOffsetY()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`offsetX()`
2017-10-21 14:37:54 +10:00
%End
void setStyle( const GridStyle style );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the grid ``style``, which controls how the grid is drawn
over the map's contents.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`style()`
2017-10-21 14:37:54 +10:00
%End
GridStyle style() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the grid's style, which controls how the grid is drawn
over the map's contents.
:rtype: GridStyle
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setStyle()`
2017-10-21 14:37:54 +10:00
%End
void setCrossLength( const double length );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``length`` (in layout units) of the cross segments drawn for the grid. This is only used for grids
with QgsLayoutItemMapGrid.Cross styles.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`crossLength()`
2017-10-21 14:37:54 +10:00
%End
double crossLength() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the length (in layout units) of the cross segments drawn for the grid. This is only used for grids
with QgsLayoutItemMapGrid.Cross styles.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setCrossLength()`
2017-10-21 14:37:54 +10:00
%End
void setGridLineWidth( const double width );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``width`` of grid lines (in layout units). This is only used for grids with QgsLayoutItemMapGrid.Solid
or QgsLayoutItemMapGrid.Cross styles. For more control over grid line appearance, use
setLineSymbol instead.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setGridLineColor()`
2017-10-21 14:37:54 +10:00
%End
void setGridLineColor( const QColor &color );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``color`` of grid lines. This is only used for grids with QgsLayoutItemMapGrid.Solid
or QgsLayoutItemMapGrid.Cross styles. For more control over grid line appearance, use
setLineSymbol instead.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setGridLineWidth()`
2017-10-21 14:37:54 +10:00
%End
void setLineSymbol( QgsLineSymbol *symbol /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the line ``symbol`` used for drawing grid lines. This is only used for grids with
QgsLayoutItemMapGrid.Solid or QgsLayoutItemMapGrid.Cross styles.
Ownership of ``symbol`` is transferred to the grid.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`lineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMarkerSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setStyle()`
2017-10-21 14:37:54 +10:00
%End
QgsLineSymbol *lineSymbol();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the line symbol used for drawing grid lines. This is only used for grids with
QgsLayoutItemMapGrid.Solid or QgsLayoutItemMapGrid.Cross styles.
:rtype: QgsLineSymbol
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`markerSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`style()`
2017-10-21 14:37:54 +10:00
%End
void setMarkerSymbol( QgsMarkerSymbol *symbol /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the marker ``symbol`` used for drawing grid points. This is only used for grids with a
QgsLayoutItemMapGrid.Markers style.
Ownership of ``symbol`` is transferred to the grid.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`markerSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setStyle()`
2017-10-21 14:37:54 +10:00
%End
QgsMarkerSymbol *markerSymbol();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the marker symbol used for drawing grid points. This is only used for grids with a
QgsLayoutItemMapGrid.Markers style.
:rtype: QgsMarkerSymbol
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setMarkerSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`lineSymbol()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`style()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationEnabled( const bool enabled );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether annotations should be shown for the grid.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationEnabled()`
2017-10-21 14:37:54 +10:00
%End
bool annotationEnabled() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether annotations are shown for the grid.
:rtype: bool
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationEnabled()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationFont( const QFont &font );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``font`` used for drawing grid annotations.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationFont()`
2017-10-21 14:37:54 +10:00
%End
QFont annotationFont() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the font used for drawing grid annotations.
:rtype: QFont
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationFont()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationFontColor( const QColor &color );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the font ``color`` used for drawing grid annotations.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationFontColor()`
2017-10-21 14:37:54 +10:00
%End
QColor annotationFontColor() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the font color used for drawing grid annotations.
:rtype: QColor
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationFontColor()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationPrecision( const int precision );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the coordinate ``precision`` for grid annotations.
The ``precision`` indicates the number of decimal places to show when drawing grid annotations.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationPrecision()`
2017-10-21 14:37:54 +10:00
%End
int annotationPrecision() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the coordinate precision for grid annotations, which is the
number of decimal places shown when drawing grid annotations.
:rtype: int
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationPrecision()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationDisplay( const DisplayMode display, const BorderSide border );
%Docstring
2017-12-15 10:36:55 -04:00
Sets what types of grid annotations should be drawn for a specified side of the map frame,
or whether grid annotations should be disabled for the side.
:param display: display mode for annotations
:param border: side of map for annotations
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationDisplay()`
2017-10-21 14:37:54 +10:00
%End
DisplayMode annotationDisplay( const BorderSide border ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the display mode for the grid annotations on a specified side of the map
frame. This property also specifies whether annotations have been disabled
from a side of the map frame.
:param border: side of map for annotations
:return: display mode for grid annotations
:rtype: DisplayMode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationDisplay()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationPosition( const AnnotationPosition position, const BorderSide side );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``position`` for the grid annotations on a specified ``side`` of the map
frame.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationPosition()`
2017-10-21 14:37:54 +10:00
%End
AnnotationPosition annotationPosition( const BorderSide side ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the position for the grid annotations on a specified ``side`` of the map
frame.
:rtype: AnnotationPosition
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationPosition()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationFrameDistance( const double distance );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``distance`` between the map frame and annotations. Units are layout units.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationFrameDistance()`
2017-10-21 14:37:54 +10:00
%End
double annotationFrameDistance() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the distance between the map frame and annotations. Units are in layout units.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationFrameDistance()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationDirection( const AnnotationDirection direction, const BorderSide side );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``direction`` for drawing frame annotations for the specified map ``side``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationDirection()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationDirection( const AnnotationDirection direction );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``direction`` for drawing all frame annotations.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationDirection()`
2017-10-21 14:37:54 +10:00
%End
AnnotationDirection annotationDirection( const BorderSide border ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the direction for drawing frame annotations, on the specified ``side``
of the map.
:rtype: AnnotationDirection
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationDirection()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationFormat( const AnnotationFormat format );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``format`` for drawing grid annotations.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationFormat()`
2017-10-21 14:37:54 +10:00
%End
AnnotationFormat annotationFormat() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the format for drawing grid annotations.
:rtype: AnnotationFormat
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationFormat()`
2017-10-21 14:37:54 +10:00
%End
void setAnnotationExpression( const QString &expression );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``expression`` used for drawing grid annotations. This is only used when annotationFormat()
is QgsLayoutItemMapGrid.CustomFormat.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`annotationExpression()`
2017-10-21 14:37:54 +10:00
%End
QString annotationExpression() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the expression used for drawing grid annotations. This is only used when annotationFormat()
is QgsLayoutItemMapGrid.CustomFormat.
:rtype: str
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAnnotationExpression()`
2017-10-21 14:37:54 +10:00
%End
void setFrameStyle( const FrameStyle style );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the grid frame ``style``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameStyle()`
2017-10-21 14:37:54 +10:00
%End
FrameStyle frameStyle() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the grid frame style.
:rtype: FrameStyle
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameStyle()`
2017-10-21 14:37:54 +10:00
%End
void setFrameDivisions( const DisplayMode divisions, const BorderSide side );
%Docstring
2017-12-15 10:36:55 -04:00
Sets what type of grid ``divisions`` should be used for frames on a specified ``side`` of the map.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameDivisions()`
2017-10-21 14:37:54 +10:00
%End
DisplayMode frameDivisions( const BorderSide side ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the type of grid divisions which are used for frames on a specified ``side`` of the map.
:rtype: DisplayMode
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameDivisions()`
2017-10-21 14:37:54 +10:00
%End
void setFrameSideFlags( QgsLayoutItemMapGrid::FrameSideFlags flags );
%Docstring
2017-12-15 10:36:55 -04:00
Sets ``flags`` for grid frame sides. Setting these flags controls which sides
of the map item the grid frame is drawn on.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlag()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameSideFlags()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`testFrameSideFlag()`
2017-10-21 14:37:54 +10:00
%End
void setFrameSideFlag( const QgsLayoutItemMapGrid::FrameSideFlag flag, bool on = true );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the grid frame is drawn for a certain side of the map item.
:param flag: flag for grid frame side
:param on: set to true to draw grid frame on that side of the map
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlags()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameSideFlags()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`testFrameSideFlag()`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapGrid::FrameSideFlags frameSideFlags() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the flags which control which sides of the map item the grid frame
is drawn on.
:rtype: QgsLayoutItemMapGrid.FrameSideFlags
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlags()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlag()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`testFrameSideFlag()`
2017-10-21 14:37:54 +10:00
%End
bool testFrameSideFlag( const FrameSideFlag flag ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Tests whether the grid frame should be drawn on a specified side of the map
item.
:param flag: flag for grid frame side
:return: true if grid frame should be drawn for that side of the map
:rtype: bool
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlags()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameSideFlag()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameSideFlags()`
2017-10-21 14:37:54 +10:00
%End
void setFrameWidth( const double width );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the grid frame ``width`` (in layout units). This property controls how wide the grid frame is.
The size of the line outlines drawn in the frame is controlled through the
setFramePenSize method.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameWidth()`
2017-10-21 14:37:54 +10:00
%End
double frameWidth() const;
%Docstring
2017-12-15 10:36:55 -04:00
Gets the grid frame width in layout units. This property controls how wide the grid frame is.
The size of the line outlines drawn in the frame can be retrieved via the
framePenSize method.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameWidth()`
2017-10-21 14:37:54 +10:00
%End
void setFramePenSize( const double width );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``width`` of the stroke drawn in the grid frame.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenSize()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenColor()`
2017-10-21 14:37:54 +10:00
%End
double framePenSize() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the width of the stroke drawn in the grid frame.
:rtype: float
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenSize()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenColor()`
2017-10-21 14:37:54 +10:00
%End
void setFramePenColor( const QColor &color );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``color`` of the stroke drawn in the grid frame.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenColor()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenSize()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor1()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor2()`
2017-10-21 14:37:54 +10:00
%End
QColor framePenColor() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the color of the stroke drawn in the grid frame.
:rtype: QColor
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenColor()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenSize()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor1()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor2()`
2017-10-21 14:37:54 +10:00
%End
void setFrameFillColor1( const QColor &color );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the first fill ``color`` used for the grid frame.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor1()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenColor()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor2()`
2017-10-21 14:37:54 +10:00
%End
QColor frameFillColor1() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the first fill color for the grid frame.
:rtype: QColor
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor1()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenColor()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor2()`
2017-10-21 14:37:54 +10:00
%End
void setFrameFillColor2( const QColor &color );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the second fill ``color`` used for the grid frame.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor2()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFramePenColor()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor1()`
2017-10-21 14:37:54 +10:00
%End
QColor frameFillColor2() const;
%Docstring
2017-12-15 10:36:55 -04:00
Retrieves the second fill color for the grid frame.
:rtype: QColor
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setFrameFillColor2()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`framePenColor`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`frameFillColor1()`
2017-10-21 14:37:54 +10:00
%End
virtual QgsExpressionContext createExpressionContext() const;
public:
};
QFlags<QgsLayoutItemMapGrid::FrameSideFlag> operator|(QgsLayoutItemMapGrid::FrameSideFlag f1, QFlags<QgsLayoutItemMapGrid::FrameSideFlag> f2);
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemmapgrid.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/