QGIS/python/core/layout/qgslayoutitemmapoverview.sip

239 lines
6.8 KiB
Plaintext
Raw Normal View History

2017-10-21 14:37:54 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemmapoverview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsLayoutItemMapOverviewStack : QgsLayoutItemMapItemStack
{
%Docstring
A collection of overviews which are drawn above the map content in a
2017-12-15 10:36:55 -04:00
QgsLayoutItemMap. The overview stack controls which overviews 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:`QgsLayoutItemMapOverview`
2017-10-21 14:37:54 +10:00
%End
%TypeHeaderCode
#include "qgslayoutitemmapoverview.h"
%End
public:
QgsLayoutItemMapOverviewStack( QgsLayoutItemMap *map );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutItemMapOverviewStack, attached to the specified
``map``.
2017-10-21 14:37:54 +10:00
%End
void addOverview( QgsLayoutItemMapOverview *overview /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Adds a new map ``overview`` to the stack and takes ownership of the overview.
The overview will be added to the end of the stack, and rendered
above any existing map overviews already present in the stack.
2017-10-21 14:37:54 +10:00
.. note::
After adding a overview to the stack, update()
2017-12-15 10:36:55 -04:00
should be called for the QgsLayoutItemMap to prevent rendering artifacts.
.. seealso:: :py:func:`removeOverview`
2017-10-21 14:37:54 +10:00
%End
void removeOverview( const QString &overviewId );
%Docstring
2017-12-19 11:43:52 -04:00
Removes an overview with matching overviewId from the stack and deletes the corresponding :py:class:`QgsLayoutItemMapOverview`
2017-12-15 10:36:55 -04:00
2017-10-21 14:37:54 +10:00
.. note::
After removing an overview from the stack, update()
2017-12-15 10:36:55 -04:00
should be called for the QgsLayoutItemMap to prevent rendering artifacts.
.. seealso:: :py:func:`addOverview`
2017-10-21 14:37:54 +10:00
%End
void moveOverviewUp( const QString &overviewId );
%Docstring
2017-12-15 10:36:55 -04:00
Moves an overview with matching overviewId up the stack, causing it to be rendered above other overviews.
2017-10-21 14:37:54 +10:00
.. note::
After moving an overview 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 overview stack order.
.. seealso:: :py:func:`moveOverviewDown`
2017-10-21 14:37:54 +10:00
%End
void moveOverviewDown( const QString &overviewId );
%Docstring
2017-12-15 10:36:55 -04:00
Moves an overview with matching overviewId down the stack, causing it to be rendered below other overviews.
2017-10-21 14:37:54 +10:00
.. note::
After moving an overview 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 overview stack order.
.. seealso:: :py:func:`moveOverviewUp`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapOverview *overview( const QString &overviewId ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to an overview with matching overviewId within the stack.
.. seealso:: :py:func:`constOverview`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapOverview *overview( const int index ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a reference to an overview at the specified ``index`` within the stack.
.. seealso:: :py:func:`constOverview`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMapOverview &operator[]( int index );
QList< QgsLayoutItemMapOverview * > asList() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns a list of QgsLayoutItemMapOverviews contained by the stack.
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
};
class QgsLayoutItemMapOverview : QgsLayoutItemMapItem
{
%Docstring
An individual overview which is drawn above the map content in a
2017-12-19 11:43:52 -04:00
:py:class:`QgsLayoutItemMap`, and shows the extent of another :py:class:`QgsLayoutItemMap`.
2017-12-15 10:36:55 -04:00
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:`QgsLayoutItemMapOverviewStack`
2017-10-21 14:37:54 +10:00
%End
%TypeHeaderCode
#include "qgslayoutitemmapoverview.h"
%End
public:
QgsLayoutItemMapOverview( const QString &name, QgsLayoutItemMap *map );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutItemMapOverview.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param name: friendly display name for overview
:param map: QgsLayoutItemMap the overview 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
virtual bool usesAdvancedEffects() const;
void setLinkedMap( QgsLayoutItemMap *map );
2017-10-21 14:37:54 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``map`` to show the overview extent of.
.. seealso:: :py:func:`linkedMap`
2017-10-21 14:37:54 +10:00
%End
QgsLayoutItemMap *linkedMap();
2017-10-21 14:37:54 +10:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the source map to show the overview extent of.
.. seealso:: :py:func:`setLinkedMap`
2017-10-21 14:37:54 +10:00
%End
void setFrameSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the fill ``symbol`` used for drawing the overview extent. Ownership
is transferred to the overview.
.. seealso:: :py:func:`frameSymbol`
2017-10-21 14:37:54 +10:00
%End
QgsFillSymbol *frameSymbol();
%Docstring
2017-12-15 10:36:55 -04:00
Returns the fill symbol used for drawing the overview extent.
.. seealso:: :py:func:`setFrameSymbol`
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 overview.
.. seealso:: :py:func:`setBlendMode`
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 overview.
.. seealso:: :py:func:`blendMode`
2017-10-21 14:37:54 +10:00
%End
bool inverted() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the overview frame is inverted, ie, whether the shaded area is drawn outside
the extent of the overview map.
.. seealso:: :py:func:`setInverted`
2017-10-21 14:37:54 +10:00
%End
void setInverted( const bool inverted );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the overview frame is ``inverted``, ie, whether the shaded area is drawn outside
the extent of the overview map.
.. seealso:: :py:func:`inverted`
2017-10-21 14:37:54 +10:00
%End
bool centered() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the extent of the map is forced to center on the overview.
.. seealso:: :py:func:`setCentered`
2017-10-21 14:37:54 +10:00
%End
void setCentered( const bool centered );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the extent of the map is forced to center on the overview
.. seealso:: :py:func:`centered`
2017-10-21 14:37:54 +10:00
%End
void connectSignals();
%Docstring
2017-12-15 10:36:55 -04:00
Reconnects signals for overview map, so that overview correctly follows changes to source
map's extent.
2017-10-21 14:37:54 +10:00
%End
public slots:
void overviewExtentChanged();
%Docstring
2017-12-15 10:36:55 -04:00
Handles recentering of the map and redrawing of the map's overview
2017-10-21 14:37:54 +10:00
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayoutitemmapoverview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/