QgsMapCanvasMap Class Reference
[QGIS gui library.]

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

#include <qgsmapcanvasmap.h>

Collaboration diagram for QgsMapCanvasMap:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Private Attributes

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


Detailed Description

A rectangular graphics item representing the map on the canvas.

Definition at line 30 of file qgsmapcanvasmap.h.


Constructor & Destructor Documentation

QgsMapCanvasMap::QgsMapCanvasMap ( QgsMapCanvas canvas  ) 

constructor

Definition at line 24 of file qgsmapcanvasmap.cpp.

References mUseQImageToRender, and resize().


Member Function Documentation

void QgsMapCanvasMap::resize ( QSize  size  ) 

resize canvas item and pixmap

Definition at line 45 of file qgsmapcanvasmap.cpp.

References QgsMapCanvas::mapRenderer(), mBgColor, mCanvas, mImage, mPixmap, and QgsMapRenderer::setOutputSize().

Referenced by QgsMapCanvasMap(), and QgsMapCanvas::resizeEvent().

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

Definition at line 40 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::enableAntiAliasing().

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

Definition at line 42 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::useImageToRender().

void QgsMapCanvasMap::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().

QPixmap& QgsMapCanvasMap::pixmap (  )  [inline]

Definition at line 53 of file qgsmapcanvasmap.h.

Referenced by QgsMapCanvas::canvasPixmap(), and QgsMapCanvas::saveAsImage().

QPaintDevice & QgsMapCanvasMap::paintDevice (  ) 

Definition at line 107 of file qgsmapcanvasmap.cpp.

References mPixmap.

Referenced by QgsMapCanvas::refresh().

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

Definition at line 33 of file qgsmapcanvasmap.cpp.

References mPixmap.

Referenced by render().

QRectF QgsMapCanvasMap::boundingRect (  )  const

Definition at line 39 of file qgsmapcanvasmap.cpp.

References mPixmap.

void QgsMapCanvasMap::updateContents (  ) 

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

Added in version 1.2

Definition at line 112 of file qgsmapcanvasmap.cpp.

References mImage, mPixmap, and mUseQImageToRender.

Referenced by QgsMapCanvas::updateMap().


Member Data Documentation

indicates whether antialiasing will be used for rendering

Definition at line 68 of file qgsmapcanvasmap.h.

Referenced by render().

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

Definition at line 71 of file qgsmapcanvasmap.h.

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

QPixmap QgsMapCanvasMap::mPixmap [private]

Definition at line 73 of file qgsmapcanvasmap.h.

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

QImage QgsMapCanvasMap::mImage [private]

Definition at line 74 of file qgsmapcanvasmap.h.

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

Definition at line 77 of file qgsmapcanvasmap.h.

Referenced by render(), and resize().

QColor QgsMapCanvasMap::mBgColor [private]

Definition at line 79 of file qgsmapcanvasmap.h.

Referenced by render(), and resize().

QPoint QgsMapCanvasMap::mOffset [private]

Definition at line 81 of file qgsmapcanvasmap.h.

Referenced by setPanningOffset().


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

Generated on Sat Feb 4 19:17:38 2012 for Quantum GIS API Documentation by  doxygen 1.5.6