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

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

#include <qgsmapoverviewcanvas.h>

Inheritance diagram for QgsMapOverviewCanvas:
Inheritance graph
[legend]
Collaboration diagram for QgsMapOverviewCanvas:
Collaboration graph
[legend]

Public Slots

void drawExtentRect ()
 used for overview canvas to reflect changed extent in main map canvas More...
 
void hasCrsTransformEnabled (bool flag)
 
void destinationSrsChanged ()
 

Public Member Functions

 QgsMapOverviewCanvas (QWidget *parent=0, QgsMapCanvas *mapCanvas=NULL)
 
 ~QgsMapOverviewCanvas ()
 
void refresh ()
 renders overview and updates panning widget More...
 
void setBackgroundColor (const QColor &color)
 changes background color More...
 
void setLayerSet (const QStringList &layerSet)
 updates layer set for overview More...
 
QStringList layerSet () const
 
void enableAntiAliasing (bool flag)
 
void updateFullExtent ()
 

Protected Slots

void mapRenderingFinished ()
 

Protected Member Functions

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

Protected Attributes

QgsPanningWidgetmPanningWidget
 widget for panning map in overview More...
 
QPoint mPanningCursorOffset
 position of cursor inside panning widget More...
 
QgsMapCanvasmMapCanvas
 main map canvas - used to get/set extent More...
 
QPixmap mPixmap
 pixmap where the map is stored More...
 
QgsMapSettings mSettings
 map settings used for rendering of the overview map More...
 
QgsMapRendererQImageJobmJob
 for rendering overview More...
 

Detailed Description

A widget that displays an overview map.

Definition at line 39 of file qgsmapoverviewcanvas.h.

Constructor & Destructor Documentation

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

Definition at line 85 of file qgsmapoverviewcanvas.cpp.

Member Function Documentation

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

Definition at line 59 of file qgsmapoverviewcanvas.h.

References QgsMapSettings::Antialiasing.

Referenced by QgsMapCanvas::enableAntiAliasing().

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

Definition at line 346 of file qgsmapoverviewcanvas.cpp.

References QgsMapSettings::layers(), and mSettings.

Referenced by QgsMapCanvas::setLayerSet().

void QgsMapOverviewCanvas::mapRenderingFinished ( )
protectedslot

Definition at line 291 of file qgsmapoverviewcanvas.cpp.

References mJob, mPixmap, QgsDebugMsg, and QgsMapRendererQImageJob::renderedImage().

Referenced by refresh().

void QgsMapOverviewCanvas::mouseMoveEvent ( QMouseEvent *  e)
protected

Overridden mouse move event.

Definition at line 241 of file qgsmapoverviewcanvas.cpp.

References updatePanningWidget().

void QgsMapOverviewCanvas::mousePressEvent ( QMouseEvent *  e)
protected

Overridden mouse press event.

Definition at line 193 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 102 of file qgsmapoverviewcanvas.cpp.

References mPixmap.

void QgsMapOverviewCanvas::refresh ( )
void QgsMapOverviewCanvas::resizeEvent ( QResizeEvent *  e)
protected

Overridden resize event.

Definition at line 89 of file qgsmapoverviewcanvas.cpp.

References mPixmap, mSettings, refresh(), QgsMapSettings::setOutputSize(), and updateFullExtent().

void QgsMapOverviewCanvas::setBackgroundColor ( const QColor &  color)

changes background color

Definition at line 304 of file qgsmapoverviewcanvas.cpp.

References mSettings, and QgsMapSettings::setBackgroundColor().

Referenced by QgsMapOverviewCanvas().

void QgsMapOverviewCanvas::setLayerSet ( const QStringList &  layerSet)

updates layer set for overview

Definition at line 314 of file qgsmapoverviewcanvas.cpp.

References mSettings, QgsDebugMsg, QgsMapSettings::setLayers(), and updateFullExtent().

Referenced by QgsMapCanvas::setLayerSet().

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

called when panning to reflect mouse movement

Definition at line 251 of file qgsmapoverviewcanvas.cpp.

References mPanningCursorOffset, and mPanningWidget.

Referenced by mouseMoveEvent(), and mousePressEvent().

Member Data Documentation

QgsMapRendererQImageJob* QgsMapOverviewCanvas::mJob
protected

for rendering overview

Definition at line 114 of file qgsmapoverviewcanvas.h.

Referenced by mapRenderingFinished(), and refresh().

QgsMapCanvas* QgsMapOverviewCanvas::mMapCanvas
protected

main map canvas - used to get/set extent

Definition at line 105 of file qgsmapoverviewcanvas.h.

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

QPoint QgsMapOverviewCanvas::mPanningCursorOffset
protected

position of cursor inside panning widget

Definition at line 102 of file qgsmapoverviewcanvas.h.

Referenced by mousePressEvent(), and updatePanningWidget().

QgsPanningWidget* QgsMapOverviewCanvas::mPanningWidget
protected

widget for panning map in overview

Definition at line 99 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 108 of file qgsmapoverviewcanvas.h.

Referenced by mapRenderingFinished(), paintEvent(), refresh(), and resizeEvent().

QgsMapSettings QgsMapOverviewCanvas::mSettings
protected

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