2017-05-23 14:49:24 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmapcanvasitem.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2007-03-03 11:13:57 +00:00
|
|
|
class QgsMapCanvasItem : QGraphicsItem
|
2007-01-09 02:39:15 +00:00
|
|
|
{
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
An abstract class for items that can be placed on the
|
|
|
|
map canvas.
|
2007-01-09 02:39:15 +00:00
|
|
|
%End
|
2013-01-12 23:48:58 +01:00
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
%TypeHeaderCode
|
|
|
|
#include "qgsmapcanvasitem.h"
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
protected:
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsMapCanvasItem( QgsMapCanvas *mapCanvas /TransferThis/ );
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
protected constructor: cannot be constructed directly
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
~QgsMapCanvasItem();
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-05-03 07:45:22 +02:00
|
|
|
virtual void paint( QPainter *painter ) = 0;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
function to be implemented by derived classes
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
virtual void paint( QPainter *painter,
|
|
|
|
const QStyleOptionGraphicsItem *option,
|
|
|
|
QWidget *widget = 0 );
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
void updateCanvas();
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
schedules map canvas for repaint
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
bool setRenderContextVariables( QPainter *p, QgsRenderContext &context ) const;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Sets render context parameters
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param p: painter for rendering
|
|
|
|
:param context: out: configured context
|
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
:return: true in case of success *
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
virtual void updatePosition();
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
called on changed extent or resize event to update position of the item
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
|
|
|
virtual QRectF boundingRect() const;
|
|
|
|
|
2017-12-15 08:57:22 +10:00
|
|
|
|
2008-11-09 00:14:12 +00:00
|
|
|
QgsRectangle rect() const;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
returns canvas item rectangle in map units
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setRect( const QgsRectangle &r, bool resetRotation = true );
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
sets canvas item rectangle in map units
|
|
|
|
%End
|
2012-09-24 02:28:15 +02:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
QgsPointXY toMapCoordinates( QPoint point ) const;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
transformation from screen coordinates to map coordinates
|
|
|
|
%End
|
2007-01-09 02:39:15 +00:00
|
|
|
|
2017-06-01 12:18:43 +02:00
|
|
|
QPointF toCanvasCoordinates( const QgsPointXY &point ) const;
|
2017-05-23 14:49:24 +02:00
|
|
|
%Docstring
|
|
|
|
transformation from map coordinates to screen coordinates
|
|
|
|
%End
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-09 02:39:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-05-23 14:49:24 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/gui/qgsmapcanvasitem.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|