QGIS API Documentation  2.2.0-Valmiera
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsMapOverviewCanvas Class Reference

A widget that displays an overview map. More...

#include <qgsmapoverviewcanvas.h>

Collaboration diagram for QgsMapOverviewCanvas:
Collaboration graph
[legend]

Public Slots

void hasCrsTransformEnabled (bool flag)
void destinationSrsChanged ()

Public Member Functions

 QgsMapOverviewCanvas (QWidget *parent=0, QgsMapCanvas *mapCanvas=NULL)
 ~QgsMapOverviewCanvas ()
void drawExtentRect ()
 used for overview canvas to reflect changed extent in main map canvas
void refresh ()
 renders overview and updates panning widget
void setBackgroundColor (const QColor &color)
 changes background color
void setLayerSet (const QStringList &layerSet)
 updates layer set for overview
QStringList & layerSet ()
void enableAntiAliasing (bool flag)
void updateFullExtent ()

Protected Member Functions

void paintEvent (QPaintEvent *pe)
 Overridden paint event.
void resizeEvent (QResizeEvent *e)
 Overridden resize event.
void mouseMoveEvent (QMouseEvent *e)
 Overridden mouse move event.
void mousePressEvent (QMouseEvent *e)
 Overridden mouse press event.
void mouseReleaseEvent (QMouseEvent *e)
 Overridden mouse release event.
void updatePanningWidget (const QPoint &pos)
 called when panning to reflect mouse movement

Protected Attributes

QgsPanningWidgetmPanningWidget
 widget for panning map in overview
QPoint mPanningCursorOffset
 position of cursor inside panning widget
QgsMapCanvasmMapCanvas
 main map canvas - used to get/set extent
QgsMapRenderermMapRenderer
 for rendering overview
QPixmap mPixmap
 pixmap where the map is stored
QColor mBgColor
 background color
bool mAntiAliasing
 indicates whether antialiasing will be used for rendering
QSize mNewSize
 resized canvas size

Detailed Description

A widget that displays an overview map.

Definition at line 37 of file qgsmapoverviewcanvas.h.

Constructor & Destructor Documentation

QgsMapOverviewCanvas::QgsMapOverviewCanvas ( QWidget *  parent = 0,
QgsMapCanvas mapCanvas = NULL 
)
QgsMapOverviewCanvas::~QgsMapOverviewCanvas ( )

Definition at line 82 of file qgsmapoverviewcanvas.cpp.

References mMapRenderer.

Member Function Documentation

void QgsMapOverviewCanvas::destinationSrsChanged ( )
slot
void QgsMapOverviewCanvas::drawExtentRect ( )
void QgsMapOverviewCanvas::enableAntiAliasing ( bool  flag)
inline

Definition at line 60 of file qgsmapoverviewcanvas.h.

Referenced by QgsMapCanvas::enableAntiAliasing().

void QgsMapOverviewCanvas::hasCrsTransformEnabled ( bool  flag)
slot
QStringList & QgsMapOverviewCanvas::layerSet ( )

Definition at line 328 of file qgsmapoverviewcanvas.cpp.

References QgsMapRenderer::layerSet(), and mMapRenderer.

Referenced by QgsMapCanvas::setLayerSet().

void QgsMapOverviewCanvas::mouseMoveEvent ( QMouseEvent *  e)
protected

Overridden mouse move event.

Definition at line 239 of file qgsmapoverviewcanvas.cpp.

References updatePanningWidget().

void QgsMapOverviewCanvas::mousePressEvent ( QMouseEvent *  e)
protected

Overridden mouse press event.

Definition at line 191 of file qgsmapoverviewcanvas.cpp.

References mPanningCursorOffset, mPanningWidget, and updatePanningWidget().

void QgsMapOverviewCanvas::mouseReleaseEvent ( QMouseEvent *  e)
protected
void QgsMapOverviewCanvas::paintEvent ( QPaintEvent *  pe)
protected

Overridden paint event.

Definition at line 92 of file qgsmapoverviewcanvas.cpp.

References mMapRenderer, mNewSize, mPixmap, refresh(), QgsMapRenderer::setOutputSize(), and updateFullExtent().

void QgsMapOverviewCanvas::refresh ( )

renders overview and updates panning widget

Definition at line 257 of file qgsmapoverviewcanvas.cpp.

References drawExtentRect(), mAntiAliasing, mBgColor, mMapRenderer, mPixmap, and QgsMapRenderer::render().

Referenced by paintEvent(), and QgsMapCanvas::updateOverview().

void QgsMapOverviewCanvas::resizeEvent ( QResizeEvent *  e)
protected

Overridden resize event.

Definition at line 87 of file qgsmapoverviewcanvas.cpp.

References mNewSize.

void QgsMapOverviewCanvas::setBackgroundColor ( const QColor &  color)

changes background color

Definition at line 284 of file qgsmapoverviewcanvas.cpp.

References mBgColor.

Referenced by QgsMapOverviewCanvas().

void QgsMapOverviewCanvas::setLayerSet ( const QStringList &  layerSet)
void QgsMapOverviewCanvas::updateFullExtent ( )
void QgsMapOverviewCanvas::updatePanningWidget ( const QPoint &  pos)
protected

called when panning to reflect mouse movement

Definition at line 249 of file qgsmapoverviewcanvas.cpp.

References mPanningCursorOffset, and mPanningWidget.

Referenced by mouseMoveEvent(), and mousePressEvent().

Member Data Documentation

bool QgsMapOverviewCanvas::mAntiAliasing
protected

indicates whether antialiasing will be used for rendering

Definition at line 109 of file qgsmapoverviewcanvas.h.

Referenced by refresh().

QColor QgsMapOverviewCanvas::mBgColor
protected

background color

Definition at line 106 of file qgsmapoverviewcanvas.h.

Referenced by refresh(), and setBackgroundColor().

QgsMapCanvas* QgsMapOverviewCanvas::mMapCanvas
protected

main map canvas - used to get/set extent

Definition at line 97 of file qgsmapoverviewcanvas.h.

Referenced by destinationSrsChanged(), drawExtentRect(), and mouseReleaseEvent().

QgsMapRenderer* QgsMapOverviewCanvas::mMapRenderer
protected
QSize QgsMapOverviewCanvas::mNewSize
protected

resized canvas size

Definition at line 112 of file qgsmapoverviewcanvas.h.

Referenced by paintEvent(), and resizeEvent().

QPoint QgsMapOverviewCanvas::mPanningCursorOffset
protected

position of cursor inside panning widget

Definition at line 94 of file qgsmapoverviewcanvas.h.

Referenced by mousePressEvent(), and updatePanningWidget().

QgsPanningWidget* QgsMapOverviewCanvas::mPanningWidget
protected

widget for panning map in overview

Definition at line 91 of file qgsmapoverviewcanvas.h.

Referenced by drawExtentRect(), mousePressEvent(), mouseReleaseEvent(), QgsMapOverviewCanvas(), and updatePanningWidget().

QPixmap QgsMapOverviewCanvas::mPixmap
protected

pixmap where the map is stored

Definition at line 103 of file qgsmapoverviewcanvas.h.

Referenced by paintEvent(), and refresh().


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