QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
QgsMapCanvasMap Class Reference

A rectangular graphics item representing the map on the canvas. More...

#include <qgsmapcanvasmap.h>

Inheritance diagram for QgsMapCanvasMap:
Inheritance graph
[legend]

Public Member Functions

 QgsMapCanvasMap (QgsMapCanvas *canvas)
 constructor
 ~QgsMapCanvasMap ()
QImage contentImage () const
Q_DECL_DEPRECATED void enableAntiAliasing (bool flag)
virtual void paint (QPainter *painter) override
 function to be implemented by derived classes
Q_DECL_DEPRECATED QPaintDevice & paintDevice ()
Q_DECL_DEPRECATED void refresh ()
Q_DECL_DEPRECATED void render ()
Q_DECL_DEPRECATED void resize (QSize size)
Q_DECL_DEPRECATED void setBackgroundColor (const QColor &color)
void setContent (const QImage &image, const QgsRectangle &rect)
Q_DECL_DEPRECATED void setPanningOffset (const QPoint &point)
Q_DECL_DEPRECATED void updateContents ()
- Public Member Functions inherited from QgsMapCanvasItem
virtual QRectF boundingRect () const override
 default implementation for canvas items
QgsRectangle rect () const
 returns canvas item rectangle in map units
void setRect (const QgsRectangle &r, bool resetRotation=true)
 sets canvas item rectangle in map units
QPointF toCanvasCoordinates (const QgsPoint &point) const
 transformation from map coordinates to screen coordinates
QgsPoint toMapCoordinates (const QPoint &point) const
 transformation from screen coordinates to map coordinates
virtual void updatePosition ()
 called on changed extent or resize event to update position of the item

Additional Inherited Members

- Protected Member Functions inherited from QgsMapCanvasItem
 QgsMapCanvasItem (QgsMapCanvas *mapCanvas)
 protected constructor: cannot be constructed directly
virtual ~QgsMapCanvasItem ()
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) override
 paint function called by map canvas
bool setRenderContextVariables (QPainter *p, QgsRenderContext &context) const
 Sets render context parameters.
void updateCanvas ()
 schedules map canvas for repaint
- Protected Attributes inherited from QgsMapCanvasItem
QSizeF mItemSize
 cached size of the item (to return in boundingRect())
QgsMapCanvasmMapCanvas
 pointer to map canvas
QPoint mPanningOffset
 offset from normal position due current panning operation, used when converting map coordinates to move map canvas items
QgsRectangle mRect
 cached canvas item rectangle in map coordinates encodes position (xmin,ymax) and size (width/height) used to re-position and re-size the item on zoom/pan while waiting for the renderer to complete.
double mRectRotation

Detailed Description

A rectangular graphics item representing the map on the canvas.

Definition at line 34 of file qgsmapcanvasmap.h.

Constructor & Destructor Documentation

QgsMapCanvasMap::QgsMapCanvasMap ( QgsMapCanvas canvas)

constructor

Definition at line 25 of file qgsmapcanvasmap.cpp.

QgsMapCanvasMap::~QgsMapCanvasMap ( )

Definition at line 31 of file qgsmapcanvasmap.cpp.

Member Function Documentation

QImage QgsMapCanvasMap::contentImage ( ) const
inline
Note
added in 2.4

Definition at line 47 of file qgsmapcanvasmap.h.

Q_DECL_DEPRECATED void QgsMapCanvasMap::enableAntiAliasing ( bool  flag)
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 58 of file qgsmapcanvasmap.h.

void QgsMapCanvasMap::paint ( QPainter *  painter)
overridevirtual

function to be implemented by derived classes

Implements QgsMapCanvasItem.

Definition at line 47 of file qgsmapcanvasmap.cpp.

QPaintDevice & QgsMapCanvasMap::paintDevice ( )
Deprecated:
in 2.4

Definition at line 78 of file qgsmapcanvasmap.cpp.

Q_DECL_DEPRECATED void QgsMapCanvasMap::refresh ( )
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 52 of file qgsmapcanvasmap.h.

Q_DECL_DEPRECATED void QgsMapCanvasMap::render ( )
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 61 of file qgsmapcanvasmap.h.

Q_DECL_DEPRECATED void QgsMapCanvasMap::resize ( QSize  size)
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 55 of file qgsmapcanvasmap.h.

Q_DECL_DEPRECATED void QgsMapCanvasMap::setBackgroundColor ( const QColor &  color)
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 64 of file qgsmapcanvasmap.h.

void QgsMapCanvasMap::setContent ( const QImage &  image,
const QgsRectangle rect 
)
Note
added in 2.4

Definition at line 35 of file qgsmapcanvasmap.cpp.

Q_DECL_DEPRECATED void QgsMapCanvasMap::setPanningOffset ( const QPoint &  point)
inline
Deprecated:
in 2.4 - not called by QgsMapCanvas anymore

Reimplemented from QgsMapCanvasItem.

Definition at line 67 of file qgsmapcanvasmap.h.

Q_DECL_DEPRECATED void QgsMapCanvasMap::updateContents ( )
inline
Deprecated:
in 2.4 - does nothing. Kept for API compatibility

Definition at line 73 of file qgsmapcanvasmap.h.


The documentation for this class was generated from the following files: