QGIS API Documentation
2.0.1-Dufour
|
A widget that displays an overview map. More...
#include <qgsmapoverviewcanvas.h>
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 | |
QgsPanningWidget * | mPanningWidget |
widget for panning map in overview | |
QPoint | mPanningCursorOffset |
position of cursor inside panning widget | |
QgsMapCanvas * | mMapCanvas |
main map canvas - used to get/set extent | |
QgsMapRenderer * | mMapRenderer |
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 |
A widget that displays an overview map.
Definition at line 37 of file qgsmapoverviewcanvas.h.
QgsMapOverviewCanvas::QgsMapOverviewCanvas | ( | QWidget * | parent = 0 , |
QgsMapCanvas * | mapCanvas = NULL |
||
) |
Definition at line 70 of file qgsmapoverviewcanvas.cpp.
References QgsMapRenderer::enableOverviewMode(), mMapRenderer, mPanningWidget, and setBackgroundColor().
QgsMapOverviewCanvas::~QgsMapOverviewCanvas | ( | ) |
Definition at line 82 of file qgsmapoverviewcanvas.cpp.
References mMapRenderer.
|
slot |
Definition at line 322 of file qgsmapoverviewcanvas.cpp.
References QgsMapRenderer::destinationCrs(), QgsMapCanvas::mapRenderer(), mMapCanvas, mMapRenderer, and QgsMapRenderer::setDestinationCrs().
void QgsMapOverviewCanvas::drawExtentRect | ( | ) |
used for overview canvas to reflect changed extent in main map canvas
Definition at line 108 of file qgsmapoverviewcanvas.cpp.
References QgsMapRenderer::coordinateTransform(), QgsMapCanvas::extent(), QgsMapRenderer::extent(), QgsRectangle::isEmpty(), mMapCanvas, mMapRenderer, mPanningWidget, QgsDebugMsg, QgsMapToPixel::transform(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
Referenced by refresh(), QgsMapCanvas::setExtent(), updateFullExtent(), QgsMapCanvas::zoomToNextExtent(), and QgsMapCanvas::zoomToPreviousExtent().
|
inline |
Definition at line 60 of file qgsmapoverviewcanvas.h.
Referenced by QgsMapCanvas::enableAntiAliasing().
|
slot |
Definition at line 317 of file qgsmapoverviewcanvas.cpp.
References mMapRenderer, and QgsMapRenderer::setProjectionsEnabled().
QStringList & QgsMapOverviewCanvas::layerSet | ( | ) |
Definition at line 328 of file qgsmapoverviewcanvas.cpp.
References QgsMapRenderer::layerSet(), and mMapRenderer.
Referenced by QgsMapCanvas::setLayerSet().
|
protected |
Overridden mouse move event.
Definition at line 239 of file qgsmapoverviewcanvas.cpp.
References updatePanningWidget().
|
protected |
Overridden mouse press event.
Definition at line 191 of file qgsmapoverviewcanvas.cpp.
References mPanningCursorOffset, mPanningWidget, and updatePanningWidget().
|
protected |
Overridden mouse release event.
Definition at line 212 of file qgsmapoverviewcanvas.cpp.
References QgsMapRenderer::coordinateTransform(), QgsMapCanvas::extent(), QgsRectangle::height(), mMapCanvas, mMapRenderer, mPanningWidget, QgsDebugMsg, QgsMapCanvas::refresh(), QgsMapCanvas::setExtent(), QgsRectangle::setXMaximum(), QgsRectangle::setXMinimum(), QgsRectangle::setYMaximum(), QgsRectangle::setYMinimum(), QgsMapToPixel::toMapCoordinates(), QgsRectangle::width(), QgsPoint::x(), and QgsPoint::y().
|
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().
|
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 | ) |
updates layer set for overview
Definition at line 294 of file qgsmapoverviewcanvas.cpp.
References mMapRenderer, QgsDebugMsg, QgsMapRenderer::setLayerSet(), updateFullExtent(), and QgsMapRenderer::updateFullExtent().
Referenced by QgsMapCanvas::setLayerSet().
void QgsMapOverviewCanvas::updateFullExtent | ( | ) |
Definition at line 303 of file qgsmapoverviewcanvas.cpp.
References drawExtentRect(), QgsMapRenderer::fullExtent(), QgsMapRenderer::layerSet(), mMapRenderer, QgsRectangle::scale(), and QgsMapRenderer::setExtent().
Referenced by paintEvent(), and setLayerSet().
|
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().
|
protected |
indicates whether antialiasing will be used for rendering
Definition at line 109 of file qgsmapoverviewcanvas.h.
Referenced by refresh().
|
protected |
background color
Definition at line 106 of file qgsmapoverviewcanvas.h.
Referenced by refresh(), and setBackgroundColor().
|
protected |
main map canvas - used to get/set extent
Definition at line 97 of file qgsmapoverviewcanvas.h.
Referenced by destinationSrsChanged(), drawExtentRect(), and mouseReleaseEvent().
|
protected |
for rendering overview
Definition at line 100 of file qgsmapoverviewcanvas.h.
Referenced by destinationSrsChanged(), drawExtentRect(), hasCrsTransformEnabled(), layerSet(), mouseReleaseEvent(), paintEvent(), QgsMapOverviewCanvas(), refresh(), setLayerSet(), updateFullExtent(), and ~QgsMapOverviewCanvas().
|
protected |
resized canvas size
Definition at line 112 of file qgsmapoverviewcanvas.h.
Referenced by paintEvent(), and resizeEvent().
|
protected |
position of cursor inside panning widget
Definition at line 94 of file qgsmapoverviewcanvas.h.
Referenced by mousePressEvent(), and updatePanningWidget().
|
protected |
widget for panning map in overview
Definition at line 91 of file qgsmapoverviewcanvas.h.
Referenced by drawExtentRect(), mousePressEvent(), mouseReleaseEvent(), QgsMapOverviewCanvas(), and updatePanningWidget().
|
protected |
pixmap where the map is stored
Definition at line 103 of file qgsmapoverviewcanvas.h.
Referenced by paintEvent(), and refresh().