QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
A widget that displays an overview map. More...
#include <qgsmapoverviewcanvas.h>
Public Member Functions | |
QgsMapOverviewCanvas (QWidget *parent=nullptr, QgsMapCanvas *mapCanvas=nullptr) | |
void | enableAntiAliasing (bool flag) |
QList< QgsMapLayer * > | layers () const |
Returns list of layers visible in the overview. | |
void | refresh () |
renders overview and updates panning widget | |
void | setBackgroundColor (const QColor &color) |
changes background color | |
void | setLayers (const QList< QgsMapLayer * > &layers) |
updates layer set for overview | |
void | updateFullExtent () |
Protected Slots | |
void | layerRepaintRequested (bool deferred=false) |
Triggered when a layer in the overview requests a repaint. | |
void | mapRenderingFinished () |
Protected Member Functions | |
void | destinationCrsChanged () |
Should be called when the canvas destination CRS is changed. | |
void | drawExtentRect () |
used for overview canvas to reflect changed extent in main map canvas | |
void | mouseMoveEvent (QMouseEvent *e) override |
Overridden mouse move event. | |
void | mousePressEvent (QMouseEvent *e) override |
Overridden mouse press event. | |
void | mouseReleaseEvent (QMouseEvent *e) override |
Overridden mouse release event. | |
void | paintEvent (QPaintEvent *pe) override |
Overridden paint event. | |
void | resizeEvent (QResizeEvent *e) override |
Overridden resize event. | |
void | showEvent (QShowEvent *e) override |
Overridden show event. | |
void | transformContextChanged () |
Called when the canvas transform context is changed. | |
void | updatePanningWidget (QPoint pos) |
called when panning to reflect mouse movement | |
void | wheelEvent (QWheelEvent *e) override |
Overridden mouse release event. | |
Protected Attributes | |
QgsMapRendererQImageJob * | mJob = nullptr |
for rendering overview | |
QgsMapCanvas * | mMapCanvas = nullptr |
main map canvas - used to get/set extent | |
QPoint | mPanningCursorOffset |
position of cursor inside panning widget | |
QgsPanningWidget * | mPanningWidget = nullptr |
widget for panning map in overview | |
QPixmap | mPixmap |
pixmap where the map is stored | |
QgsMapSettings | mSettings |
map settings used for rendering of the overview map | |
A widget that displays an overview map.
Definition at line 38 of file qgsmapoverviewcanvas.h.
QgsMapOverviewCanvas::QgsMapOverviewCanvas | ( | QWidget * | parent = nullptr , |
QgsMapCanvas * | mapCanvas = nullptr |
||
) |
Definition at line 37 of file qgsmapoverviewcanvas.cpp.
|
protected |
Should be called when the canvas destination CRS is changed.
Definition at line 320 of file qgsmapoverviewcanvas.cpp.
|
protected |
used for overview canvas to reflect changed extent in main map canvas
Definition at line 95 of file qgsmapoverviewcanvas.cpp.
|
inline |
Definition at line 57 of file qgsmapoverviewcanvas.h.
|
protectedslot |
Triggered when a layer in the overview requests a repaint.
Definition at line 252 of file qgsmapoverviewcanvas.cpp.
QList< QgsMapLayer * > QgsMapOverviewCanvas::layers | ( | ) | const |
Returns list of layers visible in the overview.
Definition at line 330 of file qgsmapoverviewcanvas.cpp.
|
protectedslot |
Definition at line 240 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden mouse move event.
Definition at line 183 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden mouse press event.
Definition at line 120 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden mouse release event.
Definition at line 141 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden paint event.
Definition at line 76 of file qgsmapoverviewcanvas.cpp.
void QgsMapOverviewCanvas::refresh | ( | ) |
renders overview and updates panning widget
Definition at line 200 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden resize event.
Definition at line 57 of file qgsmapoverviewcanvas.cpp.
void QgsMapOverviewCanvas::setBackgroundColor | ( | const QColor & | color | ) |
changes background color
Definition at line 259 of file qgsmapoverviewcanvas.cpp.
void QgsMapOverviewCanvas::setLayers | ( | const QList< QgsMapLayer * > & | layers | ) |
updates layer set for overview
Definition at line 269 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden show event.
Definition at line 70 of file qgsmapoverviewcanvas.cpp.
|
protected |
Called when the canvas transform context is changed.
Definition at line 325 of file qgsmapoverviewcanvas.cpp.
void QgsMapOverviewCanvas::updateFullExtent | ( | ) |
Definition at line 288 of file qgsmapoverviewcanvas.cpp.
|
protected |
called when panning to reflect mouse movement
Definition at line 193 of file qgsmapoverviewcanvas.cpp.
|
overrideprotected |
Overridden mouse release event.
Definition at line 159 of file qgsmapoverviewcanvas.cpp.
|
protected |
for rendering overview
Definition at line 124 of file qgsmapoverviewcanvas.h.
|
protected |
main map canvas - used to get/set extent
Definition at line 115 of file qgsmapoverviewcanvas.h.
|
protected |
position of cursor inside panning widget
Definition at line 112 of file qgsmapoverviewcanvas.h.
|
protected |
widget for panning map in overview
Definition at line 109 of file qgsmapoverviewcanvas.h.
|
protected |
pixmap where the map is stored
Definition at line 118 of file qgsmapoverviewcanvas.h.
|
protected |
map settings used for rendering of the overview map
Definition at line 121 of file qgsmapoverviewcanvas.h.