QGIS API Documentation  master-59fd5e0
QgsMapCanvasMap Class Reference

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

#include <qgsmapcanvasmap.h>

+ Collaboration diagram for QgsMapCanvasMap:

List of all members.

Public Member Functions

 QgsMapCanvasMap (QgsMapCanvas *canvas)
 constructor
QRectF boundingRect () const
void enableAntiAliasing (bool flag)
void paint (QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
QPaintDevice & paintDevice ()
void render ()
 renders map using QgsMapRenderer to mPixmap
void resize (QSize size)
 resize canvas item and pixmap
void setBackgroundColor (const QColor &color)
void setPanningOffset (const QPoint &point)
void updateContents ()
 Update contents - can be called while drawing to show the status.
void useImageToRender (bool flag)

Private Attributes

bool mAntiAliasing
 indicates whether antialiasing will be used for rendering
QColor mBgColor
QgsMapCanvasmCanvas
QImage mImage
QPoint mOffset
QPixmap mPixmap
bool mUseQImageToRender
 Whether to use a QPixmap or a QImage for the rendering.

Detailed Description

A rectangular graphics item representing the map on the canvas.

Definition at line 30 of file qgsmapcanvasmap.h.


Constructor & Destructor Documentation

constructor

Definition at line 23 of file qgsmapcanvasmap.cpp.

References mUseQImageToRender, and resize().


Member Function Documentation

Definition at line 38 of file qgsmapcanvasmap.cpp.

References mPixmap.

void QgsMapCanvasMap::enableAntiAliasing ( bool  flag) [inline]

Definition at line 40 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::enableAntiAliasing().

void QgsMapCanvasMap::paint ( QPainter *  p,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)

Definition at line 32 of file qgsmapcanvasmap.cpp.

References mPixmap.

Referenced by render().

void QgsMapCanvasMap::setBackgroundColor ( const QColor &  color) [inline]

Definition at line 47 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::setCanvasColor().

void QgsMapCanvasMap::setPanningOffset ( const QPoint &  point)

Definition at line 55 of file qgsmapcanvasmap.cpp.

References mOffset.

Referenced by QgsMapCanvas::moveCanvasContents().

Update contents - can be called while drawing to show the status.

Added in version 1.2

Definition at line 113 of file qgsmapcanvasmap.cpp.

References mImage, mPixmap, and mUseQImageToRender.

Referenced by QgsMapCanvas::updateMap().

void QgsMapCanvasMap::useImageToRender ( bool  flag) [inline]

Definition at line 42 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::useImageToRender().


Member Data Documentation

indicates whether antialiasing will be used for rendering

Definition at line 64 of file qgsmapcanvasmap.h.

Referenced by render().

QColor QgsMapCanvasMap::mBgColor [private]

Definition at line 75 of file qgsmapcanvasmap.h.

Referenced by render(), and resize().

Definition at line 73 of file qgsmapcanvasmap.h.

Referenced by render(), and resize().

QImage QgsMapCanvasMap::mImage [private]

Definition at line 70 of file qgsmapcanvasmap.h.

Referenced by render(), resize(), and updateContents().

QPoint QgsMapCanvasMap::mOffset [private]

Definition at line 77 of file qgsmapcanvasmap.h.

Referenced by setPanningOffset().

QPixmap QgsMapCanvasMap::mPixmap [private]

Definition at line 69 of file qgsmapcanvasmap.h.

Referenced by boundingRect(), paint(), paintDevice(), render(), resize(), and updateContents().

Whether to use a QPixmap or a QImage for the rendering.

Definition at line 67 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvasMap(), render(), and updateContents().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines