QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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]

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

QgsMapRendererQImageJobmJob = nullptr
 for rendering overview
 
QgsMapCanvasmMapCanvas = 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
 

Detailed Description

A widget that displays an overview map.

Definition at line 38 of file qgsmapoverviewcanvas.h.

Constructor & Destructor Documentation

◆ QgsMapOverviewCanvas()

QgsMapOverviewCanvas::QgsMapOverviewCanvas ( QWidget *  parent = nullptr,
QgsMapCanvas mapCanvas = nullptr 
)

Definition at line 36 of file qgsmapoverviewcanvas.cpp.

Member Function Documentation

◆ destinationCrsChanged()

void QgsMapOverviewCanvas::destinationCrsChanged ( )
protected

Should be called when the canvas destination CRS is changed.

Definition at line 312 of file qgsmapoverviewcanvas.cpp.

◆ drawExtentRect()

void QgsMapOverviewCanvas::drawExtentRect ( )
protected

used for overview canvas to reflect changed extent in main map canvas

Definition at line 89 of file qgsmapoverviewcanvas.cpp.

◆ enableAntiAliasing()

void QgsMapOverviewCanvas::enableAntiAliasing ( bool  flag)
inline

Definition at line 57 of file qgsmapoverviewcanvas.h.

◆ layerRepaintRequested

void QgsMapOverviewCanvas::layerRepaintRequested ( bool  deferred = false)
protectedslot

Triggered when a layer in the overview requests a repaint.

Definition at line 244 of file qgsmapoverviewcanvas.cpp.

◆ layers()

QList< QgsMapLayer * > QgsMapOverviewCanvas::layers ( ) const

Returns list of layers visible in the overview.

Definition at line 322 of file qgsmapoverviewcanvas.cpp.

◆ mapRenderingFinished

void QgsMapOverviewCanvas::mapRenderingFinished ( )
protectedslot

Definition at line 232 of file qgsmapoverviewcanvas.cpp.

◆ mouseMoveEvent()

void QgsMapOverviewCanvas::mouseMoveEvent ( QMouseEvent *  e)
overrideprotected

Overridden mouse move event.

Definition at line 177 of file qgsmapoverviewcanvas.cpp.

◆ mousePressEvent()

void QgsMapOverviewCanvas::mousePressEvent ( QMouseEvent *  e)
overrideprotected

Overridden mouse press event.

Definition at line 114 of file qgsmapoverviewcanvas.cpp.

◆ mouseReleaseEvent()

void QgsMapOverviewCanvas::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

Overridden mouse release event.

Definition at line 135 of file qgsmapoverviewcanvas.cpp.

◆ paintEvent()

void QgsMapOverviewCanvas::paintEvent ( QPaintEvent *  pe)
overrideprotected

Overridden paint event.

Definition at line 75 of file qgsmapoverviewcanvas.cpp.

◆ refresh()

void QgsMapOverviewCanvas::refresh ( )

renders overview and updates panning widget

Definition at line 194 of file qgsmapoverviewcanvas.cpp.

◆ resizeEvent()

void QgsMapOverviewCanvas::resizeEvent ( QResizeEvent *  e)
overrideprotected

Overridden resize event.

Definition at line 56 of file qgsmapoverviewcanvas.cpp.

◆ setBackgroundColor()

void QgsMapOverviewCanvas::setBackgroundColor ( const QColor &  color)

changes background color

Definition at line 251 of file qgsmapoverviewcanvas.cpp.

◆ setLayers()

void QgsMapOverviewCanvas::setLayers ( const QList< QgsMapLayer * > &  layers)

updates layer set for overview

Definition at line 261 of file qgsmapoverviewcanvas.cpp.

◆ showEvent()

void QgsMapOverviewCanvas::showEvent ( QShowEvent *  e)
overrideprotected

Overridden show event.

Definition at line 69 of file qgsmapoverviewcanvas.cpp.

◆ transformContextChanged()

void QgsMapOverviewCanvas::transformContextChanged ( )
protected

Called when the canvas transform context is changed.

Definition at line 317 of file qgsmapoverviewcanvas.cpp.

◆ updateFullExtent()

void QgsMapOverviewCanvas::updateFullExtent ( )

Definition at line 280 of file qgsmapoverviewcanvas.cpp.

◆ updatePanningWidget()

void QgsMapOverviewCanvas::updatePanningWidget ( QPoint  pos)
protected

called when panning to reflect mouse movement

Definition at line 187 of file qgsmapoverviewcanvas.cpp.

◆ wheelEvent()

void QgsMapOverviewCanvas::wheelEvent ( QWheelEvent *  e)
overrideprotected

Overridden mouse release event.

Definition at line 153 of file qgsmapoverviewcanvas.cpp.

Member Data Documentation

◆ mJob

QgsMapRendererQImageJob* QgsMapOverviewCanvas::mJob = nullptr
protected

for rendering overview

Definition at line 124 of file qgsmapoverviewcanvas.h.

◆ mMapCanvas

QgsMapCanvas* QgsMapOverviewCanvas::mMapCanvas = nullptr
protected

main map canvas - used to get/set extent

Definition at line 115 of file qgsmapoverviewcanvas.h.

◆ mPanningCursorOffset

QPoint QgsMapOverviewCanvas::mPanningCursorOffset
protected

position of cursor inside panning widget

Definition at line 112 of file qgsmapoverviewcanvas.h.

◆ mPanningWidget

QgsPanningWidget* QgsMapOverviewCanvas::mPanningWidget = nullptr
protected

widget for panning map in overview

Definition at line 109 of file qgsmapoverviewcanvas.h.

◆ mPixmap

QPixmap QgsMapOverviewCanvas::mPixmap
protected

pixmap where the map is stored

Definition at line 118 of file qgsmapoverviewcanvas.h.

◆ mSettings

QgsMapSettings QgsMapOverviewCanvas::mSettings
protected

map settings used for rendering of the overview map

Definition at line 121 of file qgsmapoverviewcanvas.h.


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