QGIS/python/gui/qgsmapcanvasitem.sip

102 lines
2.7 KiB
Plaintext
Raw Normal View History

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 *
************************************************************************/
class QgsMapCanvasItem : QGraphicsItem
{
2017-05-23 14:49:24 +02:00
%Docstring
An abstract class for items that can be placed on the
map canvas.
%End
2017-05-23 14:49:24 +02:00
%TypeHeaderCode
#include "qgsmapcanvasitem.h"
%End
protected:
QgsMapCanvasItem( QgsMapCanvas *mapCanvas /TransferThis/ );
2017-05-23 14:49:24 +02:00
%Docstring
protected constructor: cannot be constructed directly
%End
virtual ~QgsMapCanvasItem();
virtual void paint( QPainter *painter ) = 0;
2017-05-23 14:49:24 +02:00
%Docstring
function to be implemented by derived classes
%End
2017-05-23 14:49:24 +02:00
virtual void paint( QPainter *painter,
const QStyleOptionGraphicsItem *option,
QWidget *widget = 0 );
void updateCanvas();
2017-05-23 14:49:24 +02:00
%Docstring
schedules map canvas for repaint
%End
bool setRenderContextVariables( QPainter *p, QgsRenderContext &context ) const;
2017-05-23 14:49:24 +02:00
%Docstring
Sets render context parameters
\param p painter for rendering
\param context out: configured context
:return: true in case of success *
:rtype: bool
%End
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
virtual QRectF boundingRect() const;
QgsRectangle rect() const;
2017-05-23 14:49:24 +02:00
%Docstring
returns canvas item rectangle in map units
:rtype: QgsRectangle
%End
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
QgsPointXY toMapCoordinates( QPoint point ) const;
2017-05-23 14:49:24 +02:00
%Docstring
transformation from screen coordinates to map coordinates
:rtype: QgsPointXY
2017-05-23 14:49:24 +02:00
%End
QPointF toCanvasCoordinates( const QgsPointXY &point ) const;
2017-05-23 14:49:24 +02:00
%Docstring
transformation from map coordinates to screen coordinates
:rtype: QPointF
%End
protected:
};
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 *
************************************************************************/