|
QGIS API Documentation
master-6227475
|
Map canvas is a class for displaying all GIS data types on a canvas. More...
#include <qgsmapcanvas.h>
Collaboration diagram for QgsMapCanvas:Classes | |
| class | CanvasProperties |
Public Types | |
| enum | WheelAction { WheelZoom, WheelZoomAndRecenter, WheelZoomToMouseCursor, WheelNothing } |
Public Slots | |
| bool | hasCrsTransformEnabled () |
| A simple helper method to find out if on the fly projections are enabled or not. | |
| void | layerStateChange () |
| This slot is connected to the visibility change of one or more layers. | |
| void | mapUnitsChanged () |
| The map units may have changed, so cope with that. | |
| void | readProject (const QDomDocument &) |
| called to read map canvas settings from project | |
| void | refresh () |
| Repaints the canvas map. | |
| bool | renderFlag () |
| State of render suppression flag. | |
| void | saveAsImage (QString theFileName, QPixmap *QPixmap=0, QString="PNG") |
| Save the convtents of the map canvas to disk as an image. | |
| void | selectionChangedSlot () |
| Receives signal about selection change, and pass it on with layer info. | |
| void | setRenderFlag (bool theFlag) |
| Whether to suppress rendering or not. | |
| void | showError (QgsMapLayer *mapLayer) |
| show whatever error is exposed by the QgsMapLayer. | |
| void | updateMap () |
| updates pixmap on render progress | |
| void | writeProject (QDomDocument &) |
| called to write map canvas settings to project | |
Signals | |
| void | extentsChanged () |
| Emitted when the extents of the map change. | |
| void | keyPressed (QKeyEvent *e) |
| Emit key press event. | |
| void | keyReleased (QKeyEvent *e) |
| Emit key release event. | |
| void | layersChanged () |
| Emitted when a new set of layers has been received. | |
| void | mapCanvasRefreshed () |
| Emitted when canvas finished a refresh request. | |
| void | mapToolSet (QgsMapTool *tool) |
| Emit map tool changed event. | |
| void | renderComplete (QPainter *) |
| Emitted when the canvas has rendered. | |
| void | renderStarting () |
| Emitted when the canvas is about to be rendered. | |
| void | scaleChanged (double) |
| Emitted when the scale of the map changes. | |
| void | selectionChanged (QgsMapLayer *layer) |
| Emitted when selection in any layer gets changed. | |
| void | setProgress (int, int) |
| Let the owner know how far we are with render operations. | |
| void | xyCoordinates (const QgsPoint &p) |
| emits current mouse position | |
| void | zoomLastStatusChanged (bool) |
| Emitted when zoom last status changed. | |
| void | zoomNextStatusChanged (bool) |
| Emitted when zoom next status changed. | |
Public Member Functions | |
| QgsMapCanvas (QWidget *parent=0, const char *name=0) | |
| Constructor. | |
| ~QgsMapCanvas () | |
| Destructor. | |
| bool | antiAliasingEnabled () const |
| true if antialising is enabled | |
| virtual QColor | canvasColor () const |
| Read property of QColor bgColor. | |
| QPaintDevice & | canvasPaintDevice () |
| Accessor for the canvas paint device. | |
| void | clear () |
| Clear the map canvas. | |
| void | clearExtentHistory () |
| QgsMapLayer * | currentLayer () |
| returns current layer (set by legend widget) | |
| void | enableAntiAliasing (bool theFlag) |
| used to determine if anti-aliasing is enabled or not | |
| void | enableOverviewMode (QgsMapOverviewCanvas *overview) |
| QgsRectangle | extent () const |
| Returns the current zoom exent of the map canvas. | |
| void | freeze (bool frz=true) |
| QgsRectangle | fullExtent () const |
| Returns the combined exent for all layers on the map canvas. | |
| const QgsMapToPixel * | getCoordinateTransform () |
| Get the current coordinate transform. | |
| bool | isDirty () const |
| Return the state of the canvas (dirty or not) | |
| bool | isDrawing () |
| true if canvas currently drawing | |
| bool | isFrozen () |
| QgsMapLayer * | layer (int index) |
| return the map layer at position index in the layer stack | |
| int | layerCount () const |
| return number of layers on the map | |
| QList< QgsMapLayer * > | layers () const |
| return list of layers within map canvas. Added in v1.5 | |
| QgsMapCanvasMap * | map () |
| QgsMapRenderer * | mapRenderer () |
| QgsMapTool * | mapTool () |
| Returns the currently active tool. | |
| QGis::UnitType | mapUnits () const |
| Get the current canvas map units. | |
| double | mapUnitsPerPixel () const |
| Returns the mapUnitsPerPixel (map units per pixel) for the canvas. | |
| QPoint | mouseLastXY () |
| returns last position of mouse cursor | |
| void | panAction (QMouseEvent *event) |
| Called when mouse is moving and pan is activated. | |
| void | panActionEnd (QPoint releasePoint) |
| Ends pan action and redraws the canvas. | |
| void | panToSelected (QgsVectorLayer *layer=NULL) |
| Pan to the selected features of current (vector) layer keeping same extent. | |
| double | scale () |
| Get the last reported scale of the canvas. | |
| virtual void | setCanvasColor (const QColor &_newVal) |
| Write property of QColor bgColor. | |
| void | setCurrentLayer (QgsMapLayer *layer) |
| void | setDirty (bool _dirty) |
| Flag the canvas as dirty and needed a refresh. | |
| void | setExtent (const QgsRectangle &r) |
| Set the extent of the map canvas. | |
| void | setLayerSet (QList< QgsMapCanvasLayer > &layers) |
| void | setMapTool (QgsMapTool *mapTool) |
| Sets the map tool currently being used on the canvas. | |
| void | setMapUnits (QGis::UnitType mapUnits) |
| Set map units (needed by project properties dialog) | |
| void | setWheelAction (WheelAction action, double factor=2) |
| set wheel action and zoom factor (should be greater than 1) | |
| void | unsetMapTool (QgsMapTool *mapTool) |
| Unset the current map tool or last non zoom tool. | |
| void | updateFullExtent () |
| Updates the full extent. | |
| void | updateOverview () |
| void | updateScale () |
| Emits signal scaleChanged to update scale in main window. | |
| void | useImageToRender (bool theFlag) |
| Select which Qt class to render with. | |
| void | zoomByFactor (double scaleFactor) |
| Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in. | |
| void | zoomIn () |
| Zoom in with fixed factor. | |
| void | zoomOut () |
| Zoom out with fixed factor. | |
| void | zoomScale (double scale) |
| Zoom to a specific scale. | |
| void | zoomToFullExtent () |
| Zoom to the full extent of all layers. | |
| void | zoomToNextExtent () |
| Zoom to the next extent (view) | |
| void | zoomToPreviousExtent () |
| Zoom to the previous extent (view) | |
| void | zoomToSelected (QgsVectorLayer *layer=NULL) |
| Zoom to the extent of the selected features of current (vector) layer. | |
| void | zoomWithCenter (int x, int y, bool zoomIn) |
| Zooms in/out with a given center. | |
Protected Member Functions | |
| void | dragEnterEvent (QDragEnterEvent *e) |
| Overridden drag enter event. | |
| void | keyPressEvent (QKeyEvent *e) |
| Overridden key press event. | |
| void | keyReleaseEvent (QKeyEvent *e) |
| Overridden key release event. | |
| void | mouseDoubleClickEvent (QMouseEvent *e) |
| Overridden mouse double click 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 | moveCanvasContents (bool reset=false) |
| called when panning is in action, reset indicates end of panning | |
| void | paintEvent (QPaintEvent *e) |
| Overridden paint event. | |
| void | resizeEvent (QResizeEvent *e) |
| Overridden resize event. | |
| void | updateCanvasItemPositions () |
| called on resize or changed extent to notify canvas items to change their rectangle | |
| void | wheelEvent (QWheelEvent *e) |
| Overridden mouse wheel event. | |
Protected Attributes | |
| std::auto_ptr< CanvasProperties > | mCanvasProperties |
| Handle pattern for implementation object. | |
Private Slots | |
| void | crsTransformEnabled (bool) |
| void | mapToolDestroyed () |
| called when current maptool is destroyed | |
Private Member Functions | |
| QgsMapCanvas (QgsMapCanvas const &) | |
| this class is non-copyable | |
| void | connectNotify (const char *signal) |
| debugging member invoked when a connect() is made to this object | |
Private Attributes | |
| bool | mAntiAliasing |
| indicates whether antialiasing will be used for rendering | |
| bool | mBackbufferEnabled |
| If backbuffering is currently enabled. | |
| QgsMapLayer * | mCurrentLayer |
| current layer in legend | |
| bool | mDirty |
| Flag to track the state of the Map canvas. | |
| bool | mDrawing |
| Flag indicating a map refresh is in progress. | |
| bool | mFrozen |
| Flag indicating if the map canvas is frozen. | |
| QList< QgsRectangle > | mLastExtent |
| recently used extent | |
| int | mLastExtentIndex |
| QgsMapTool * | mLastNonZoomMapTool |
| previous tool if current is for zooming/panning | |
| QgsMapCanvasMap * | mMap |
| owns pixmap with rendered map and controls rendering | |
| QgsMapOverviewCanvas * | mMapOverview |
| map overview widget - it's controlled by QgsMapCanvas | |
| QgsMapRenderer * | mMapRenderer |
| all map rendering is done in this class | |
| QgsMapTool * | mMapTool |
| pointer to current map tool | |
| QSize | mNewSize |
| resize canvas size | |
| bool | mPainting |
| currently in paint event | |
| bool | mRenderFlag |
| determines whether user has requested to suppress rendering | |
| QList< QPair< int, int > > | mResizeQueue |
| Resize events that have been ignored because the canvas is busy with rendering may put their sizes into this list. | |
| QGraphicsScene * | mScene |
| graphics scene manages canvas items | |
| WheelAction | mWheelAction |
| Mouse wheel action. | |
| double | mWheelZoomFactor |
| Scale factor multiple for default zoom in/out. | |
Map canvas is a class for displaying all GIS data types on a canvas.
Definition at line 99 of file qgsmapcanvas.h.
Definition at line 105 of file qgsmapcanvas.h.
| QgsMapCanvas::QgsMapCanvas | ( | QWidget * | parent = 0, |
| const char * | name = 0 |
||
| ) |
Constructor.
Definition at line 81 of file qgsmapcanvas.cpp.
References crsTransformEnabled(), hasCrsTransformEnabled(), QgsProject::instance(), mBackbufferEnabled, mCurrentLayer, mDirty, mDrawing, mFrozen, mLastExtentIndex, mLastNonZoomMapTool, mMap, mMapOverview, mMapRenderer, mMapTool, moveCanvasContents(), mRenderFlag, mScene, readProject(), QgsMapCanvasMap::resize(), setWheelAction(), showError(), size, WheelZoom, and writeProject().
Destructor.
Definition at line 135 of file qgsmapcanvas.cpp.
References QgsMapTool::deactivate(), mLastNonZoomMapTool, mMapRenderer, mMapTool, and mScene.
| QgsMapCanvas::QgsMapCanvas | ( | QgsMapCanvas const & | ) | [private] |
this class is non-copyable
Otherwise std::auto_ptr would pass the object responsiblity on to the copy like a hot potato leaving the copyer in a weird state.
| bool QgsMapCanvas::antiAliasingEnabled | ( | ) | const [inline] |
true if antialising is enabled
Definition at line 253 of file qgsmapcanvas.h.
Referenced by QgsMapCanvasItem::paint().
| QColor QgsMapCanvas::canvasColor | ( | ) | const [virtual] |
Read property of QColor bgColor.
Definition at line 1283 of file qgsmapcanvas.cpp.
References mScene.
| QPaintDevice & QgsMapCanvas::canvasPaintDevice | ( | ) |
Accessor for the canvas paint device.
Definition at line 1328 of file qgsmapcanvas.cpp.
References mMap, and QgsMapCanvasMap::paintDevice().
| void QgsMapCanvas::clear | ( | ) |
Clear the map canvas.
Definition at line 598 of file qgsmapcanvas.cpp.
References setDirty().
Referenced by refresh().
| void QgsMapCanvas::clearExtentHistory | ( | ) |
Definition at line 676 of file qgsmapcanvas.cpp.
References extent(), mLastExtent, mLastExtentIndex, zoomLastStatusChanged(), and zoomNextStatusChanged().
Referenced by readProject().
| void QgsMapCanvas::connectNotify | ( | const char * | signal | ) | [private] |
debugging member invoked when a connect() is made to this object
Definition at line 1370 of file qgsmapcanvas.cpp.
References QgsDebugMsg.
| void QgsMapCanvas::crsTransformEnabled | ( | bool | enabled | ) | [private, slot] |
Definition at line 1568 of file qgsmapcanvas.cpp.
References mMapRenderer, QgsDebugMsg, and refresh().
Referenced by QgsMapCanvas().
returns current layer (set by legend widget)
Definition at line 360 of file qgsmapcanvas.cpp.
References mCurrentLayer.
Referenced by QgsMapToolIdentify::identify(), setLayerSet(), QgsMapCanvasSnapper::snapToBackgroundLayers(), and QgsMapCanvasSnapper::snapToCurrentLayer().
| void QgsMapCanvas::dragEnterEvent | ( | QDragEnterEvent * | e | ) | [protected] |
Overridden drag enter event.
Definition at line 1560 of file qgsmapcanvas.cpp.
| void QgsMapCanvas::enableAntiAliasing | ( | bool | theFlag | ) |
used to determine if anti-aliasing is enabled or not
Definition at line 164 of file qgsmapcanvas.cpp.
References QgsMapCanvasMap::enableAntiAliasing(), QgsMapOverviewCanvas::enableAntiAliasing(), mAntiAliasing, mMap, and mMapOverview.
| void QgsMapCanvas::enableOverviewMode | ( | QgsMapOverviewCanvas * | overview | ) |
Definition at line 324 of file qgsmapcanvas.cpp.
References hasCrsTransformEnabled(), mMapOverview, and mMapRenderer.
| QgsRectangle QgsMapCanvas::extent | ( | ) | const |
Returns the current zoom exent of the map canvas.
Definition at line 517 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), and mMapRenderer.
Referenced by QgsMapToolZoom::canvasReleaseEvent(), clearExtentHistory(), QgsMapOverviewCanvas::drawExtentRect(), QgsMapTip::fetchFeature(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), QgsMapToolIdentify::identify(), QgsMapToolIdentify::identifyVectorLayer(), QgsMapOverviewCanvas::mouseReleaseEvent(), QgsHighlight::paintPoint(), QgsMapToolTouch::pinchTriggered(), setExtent(), QgsFormAnnotationItem::setFeatureForMapPosition(), QgsHtmlAnnotationItem::setFeatureForMapPosition(), QgsHighlight::updateRect(), wheelEvent(), zoomToFullExtent(), and zoomToSelected().
| void QgsMapCanvas::extentsChanged | ( | ) | [signal] |
Emitted when the extents of the map change.
Referenced by paintEvent(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
| void QgsMapCanvas::freeze | ( | bool | frz = true | ) |
Freeze/thaw the map canvas. This is used to prevent the canvas from responding to events while layers are being added/removed etc.
| frz | Boolean specifying if the canvas should be frozen (true) or thawed (false). Default is true. |
Definition at line 1317 of file qgsmapcanvas.cpp.
References mFrozen.
| QgsRectangle QgsMapCanvas::fullExtent | ( | ) | const |
Returns the combined exent for all layers on the map canvas.
Definition at line 522 of file qgsmapcanvas.cpp.
References QgsMapRenderer::fullExtent(), and mMapRenderer.
Referenced by zoomToFullExtent().
| const QgsMapToPixel * QgsMapCanvas::getCoordinateTransform | ( | ) |
Get the current coordinate transform.
Definition at line 229 of file qgsmapcanvas.cpp.
References QgsMapRenderer::coordinateTransform(), and mMapRenderer.
Referenced by QgsMapToolPan::canvasReleaseEvent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapToolTouch::canvasReleaseEvent(), QgsMapToolIdentify::identify(), mouseMoveEvent(), panActionEnd(), QgsMapToolTouch::pinchTriggered(), QgsRubberBand::setToCanvasRectangle(), QgsMapCanvasItem::toCanvasCoordinates(), QgsMapTool::toCanvasCoordinates(), QgsMapCanvasItem::toMapCoordinates(), QgsMapTool::toMapCoordinates(), wheelEvent(), and zoomWithCenter().
| bool QgsMapCanvas::hasCrsTransformEnabled | ( | ) | [slot] |
A simple helper method to find out if on the fly projections are enabled or not.
Definition at line 687 of file qgsmapcanvas.cpp.
References QgsMapRenderer::hasCrsTransformEnabled(), and mMapRenderer.
Referenced by enableOverviewMode(), QgsMapToolIdentify::featureDerivedAttributes(), QgsMapToolIdentify::identifyRasterLayer(), and QgsMapCanvas().
| bool QgsMapCanvas::isDirty | ( | ) | const |
Return the state of the canvas (dirty or not)
Definition at line 214 of file qgsmapcanvas.cpp.
References mDirty.
| bool QgsMapCanvas::isDrawing | ( | ) |
true if canvas currently drawing
Definition at line 221 of file qgsmapcanvas.cpp.
References mDrawing.
Referenced by QgsMapToolIdentify::identify().
| bool QgsMapCanvas::isFrozen | ( | ) |
Accessor for frozen status of canvas
Definition at line 1322 of file qgsmapcanvas.cpp.
References mFrozen.
| void QgsMapCanvas::keyPressed | ( | QKeyEvent * | e | ) | [signal] |
Emit key press event.
Referenced by keyPressEvent().
| void QgsMapCanvas::keyPressEvent | ( | QKeyEvent * | e | ) | [protected] |
Overridden key press event.
Definition at line 785 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), keyPressed(), QgsMapTool::keyPressEvent(), mCanvasProperties, mDrawing, mMapRenderer, mMapTool, QgsDebugMsg, refresh(), setExtent(), QgsRectangle::setXMaximum(), QgsRectangle::setXMinimum(), QgsRectangle::setYMaximum(), QgsRectangle::setYMinimum(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), QgsRectangle::yMinimum(), zoomIn(), and zoomOut().
| void QgsMapCanvas::keyReleased | ( | QKeyEvent * | e | ) | [signal] |
Emit key release event.
Referenced by keyReleaseEvent().
| void QgsMapCanvas::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected] |
Overridden key release event.
Definition at line 885 of file qgsmapcanvas.cpp.
References keyReleased(), QgsMapTool::keyReleaseEvent(), mCanvasProperties, mDrawing, mMapTool, panActionEnd(), and QgsDebugMsg.
| QgsMapLayer * QgsMapCanvas::layer | ( | int | index | ) |
return the map layer at position index in the layer stack
Definition at line 189 of file qgsmapcanvas.cpp.
References QgsMapLayerRegistry::instance(), layers(), QgsMapRenderer::layerSet(), QgsMapLayerRegistry::mapLayer(), and mMapRenderer.
Referenced by QgsMapToolIdentify::identify(), layers(), selectionChangedSlot(), setCurrentLayer(), and setLayerSet().
| int QgsMapCanvas::layerCount | ( | ) | const |
return number of layers on the map
Definition at line 1288 of file qgsmapcanvas.cpp.
References QgsMapRenderer::layerSet(), and mMapRenderer.
Referenced by QgsMapToolIdentify::identify(), and setLayerSet().
| QList< QgsMapLayer * > QgsMapCanvas::layers | ( | ) | const |
return list of layers within map canvas. Added in v1.5
Definition at line 1294 of file qgsmapcanvas.cpp.
References QgsMapLayerRegistry::instance(), layer(), QgsMapRenderer::layerSet(), QgsMapLayerRegistry::mapLayer(), and mMapRenderer.
Referenced by layer(), QgsFormAnnotationItem::updateVisibility(), and QgsHtmlAnnotationItem::updateVisibility().
| void QgsMapCanvas::layersChanged | ( | ) | [signal] |
Emitted when a new set of layers has been received.
Referenced by setLayerSet().
| void QgsMapCanvas::layerStateChange | ( | ) | [slot] |
This slot is connected to the visibility change of one or more layers.
Definition at line 1307 of file qgsmapcanvas.cpp.
References refresh().
Definition at line 178 of file qgsmapcanvas.cpp.
References mMap.
| void QgsMapCanvas::mapCanvasRefreshed | ( | ) | [signal] |
Definition at line 183 of file qgsmapcanvas.cpp.
References mMapRenderer.
Referenced by QgsRubberBand::addGeometry(), QgsMapOverviewCanvas::destinationSrsChanged(), QgsMapToolIdentify::featureDerivedAttributes(), QgsMapTip::fetchFeature(), QgsAttributeTableFilterModel::generateListOfVisibleFeatures(), QgsMapToolIdentify::identifyRasterLayer(), QgsMapToolIdentify::identifyVectorLayer(), QgsHighlight::QgsHighlight(), QgsMapCanvasSnapper::QgsMapCanvasSnapper(), QgsMapCanvasMap::render(), QgsMapCanvasMap::resize(), QgsMapCanvasSnapper::setMapCanvas(), QgsMapCanvasItem::setRenderContextVariables(), QgsMapCanvasSnapper::snapToBackgroundLayers(), QgsMapCanvasSnapper::snapToCurrentLayer(), QgsMapTool::toLayerCoordinates(), and QgsMapTool::toMapCoordinates().
Returns the currently active tool.
Definition at line 1378 of file qgsmapcanvas.cpp.
References mMapTool.
| void QgsMapCanvas::mapToolDestroyed | ( | ) | [private, slot] |
called when current maptool is destroyed
Definition at line 1580 of file qgsmapcanvas.cpp.
References mMapTool, and QgsDebugMsg.
Referenced by setMapTool().
| void QgsMapCanvas::mapToolSet | ( | QgsMapTool * | tool | ) | [signal] |
Emit map tool changed event.
Referenced by setMapTool(), and unsetMapTool().
| QGis::UnitType QgsMapCanvas::mapUnits | ( | ) | const |
Get the current canvas map units.
Definition at line 1346 of file qgsmapcanvas.cpp.
References QgsMapRenderer::mapUnits(), and mMapRenderer.
Referenced by QgsMapToolIdentify::convertMeasurement(), and QgsMapToolIdentify::displayUnits().
| void QgsMapCanvas::mapUnitsChanged | ( | ) | [slot] |
The map units may have changed, so cope with that.
Definition at line 692 of file qgsmapcanvas.cpp.
References refresh(), and updateScale().
| double QgsMapCanvas::mapUnitsPerPixel | ( | ) | const |
Returns the mapUnitsPerPixel (map units per pixel) for the canvas.
Definition at line 1333 of file qgsmapcanvas.cpp.
References QgsMapRenderer::mapUnitsPerPixel(), and mMapRenderer.
Referenced by QgsMapToolIdentify::identify(), and saveAsImage().
| void QgsMapCanvas::mouseDoubleClickEvent | ( | QMouseEvent * | e | ) | [protected] |
Overridden mouse double click event.
Definition at line 923 of file qgsmapcanvas.cpp.
References QgsMapTool::canvasDoubleClickEvent(), mDrawing, and mMapTool.
| QPoint QgsMapCanvas::mouseLastXY | ( | ) |
returns last position of mouse cursor
Definition at line 1502 of file qgsmapcanvas.cpp.
References mCanvasProperties.
| void QgsMapCanvas::mouseMoveEvent | ( | QMouseEvent * | e | ) | [protected] |
Overridden mouse move event.
Definition at line 1185 of file qgsmapcanvas.cpp.
References QgsMapTool::canvasMoveEvent(), getCoordinateTransform(), mCanvasProperties, mDrawing, mMapTool, panAction(), QgsMapToPixel::toMapCoordinates(), and xyCoordinates().
| void QgsMapCanvas::mousePressEvent | ( | QMouseEvent * | e | ) | [protected] |
Overridden mouse press event.
Definition at line 936 of file qgsmapcanvas.cpp.
References QgsMapTool::canvasPressEvent(), mCanvasProperties, mDrawing, and mMapTool.
| void QgsMapCanvas::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected] |
Overridden mouse release event.
Definition at line 968 of file qgsmapcanvas.cpp.
References QgsMapTool::canvasReleaseEvent(), QgsVectorLayer::isEditable(), QgsMapTool::isEditTool(), QgsMapTool::isTransient(), mCanvasProperties, mCurrentLayer, mDrawing, mLastNonZoomMapTool, mMapTool, panActionEnd(), QgsDebugMsg, and setMapTool().
| void QgsMapCanvas::moveCanvasContents | ( | bool | reset = false | ) | [protected] |
called when panning is in action, reset indicates end of panning
Definition at line 1447 of file qgsmapcanvas.cpp.
References mCanvasProperties, mDrawing, mMap, mScene, QgsMapCanvasMap::setPanningOffset(), QgsMapCanvasItem::setPanningOffset(), and updateCanvasItemPositions().
Referenced by panAction(), panActionEnd(), and QgsMapCanvas().
| void QgsMapCanvas::paintEvent | ( | QPaintEvent * | e | ) | [protected] |
Overridden paint event.
Definition at line 1021 of file qgsmapcanvas.cpp.
References extentsChanged(), mDrawing, mMap, mMapRenderer, mNewSize, mPainting, mScene, refresh(), QgsMapRenderer::rendererContext(), QgsMapCanvasMap::resize(), QgsRenderContext::setRenderingStopped(), updateCanvasItemPositions(), and updateScale().
| void QgsMapCanvas::panAction | ( | QMouseEvent * | event | ) |
Called when mouse is moving and pan is activated.
Definition at line 1431 of file qgsmapcanvas.cpp.
References mDrawing, and moveCanvasContents().
Referenced by QgsMapToolPan::canvasMoveEvent(), QgsMapToolTouch::canvasMoveEvent(), and mouseMoveEvent().
| void QgsMapCanvas::panActionEnd | ( | QPoint | releasePoint | ) |
Ends pan action and redraws the canvas.
Definition at line 1383 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), getCoordinateTransform(), mCanvasProperties, mDrawing, mMapRenderer, moveCanvasContents(), refresh(), setExtent(), QgsRectangle::setXMinimum(), QgsMapToPixel::toMapCoordinates(), QgsPoint::x(), and QgsPoint::y().
Referenced by QgsMapToolPan::canvasReleaseEvent(), QgsMapToolTouch::canvasReleaseEvent(), keyReleaseEvent(), and mouseReleaseEvent().
| void QgsMapCanvas::panToSelected | ( | QgsVectorLayer * | layer = NULL | ) |
Pan to the selected features of current (vector) layer keeping same extent.
Definition at line 757 of file qgsmapcanvas.cpp.
References QgsVectorLayer::boundingBoxOfSelected(), QgsRectangle::center(), QgsMapRenderer::layerExtentToOutputExtent(), mCurrentLayer, mDrawing, mMapRenderer, refresh(), QgsVectorLayer::selectedFeatureCount(), and setExtent().
| void QgsMapCanvas::readProject | ( | const QDomDocument & | doc | ) | [slot] |
called to read map canvas settings from project
Definition at line 1507 of file qgsmapcanvas.cpp.
References clearExtentHistory(), mMapRenderer, QgsDebugMsg, and QgsMapRenderer::readXML().
Referenced by QgsMapCanvas().
| void QgsMapCanvas::refresh | ( | ) | [slot] |
Repaints the canvas map.
Definition at line 366 of file qgsmapcanvas.cpp.
References clear(), QgsMessageLog::logMessage(), mapCanvasRefreshed(), mBackbufferEnabled, mDirty, mDrawing, mFrozen, mMap, mMapTool, mRenderFlag, QgsMapCanvasMap::paintDevice(), QgsMapCanvasMap::render(), QgsMapTool::renderComplete(), renderComplete(), renderStarting(), and tr.
Referenced by QgsMapToolPan::canvasReleaseEvent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapToolTouch::canvasReleaseEvent(), crsTransformEnabled(), keyPressEvent(), layerStateChange(), mapUnitsChanged(), QgsMapOverviewCanvas::mouseReleaseEvent(), paintEvent(), panActionEnd(), panToSelected(), QgsMapToolTouch::pinchTriggered(), selectionChangedSlot(), setLayerSet(), setRenderFlag(), updateFullExtent(), useImageToRender(), wheelEvent(), zoomByFactor(), zoomToFullExtent(), zoomToNextExtent(), zoomToPreviousExtent(), zoomToSelected(), and zoomWithCenter().
| void QgsMapCanvas::renderComplete | ( | QPainter * | ) | [signal] |
Emitted when the canvas has rendered.
Passes a pointer to the painter on which the map was drawn. This is useful for plugins that wish to draw on the map after it has been rendered. Passing the painter allows plugins to work when the map is being rendered onto a pixmap other than the mapCanvas own pixmap member.
Referenced by refresh(), and saveAsImage().
| bool QgsMapCanvas::renderFlag | ( | ) | [inline, slot] |
State of render suppression flag.
Definition at line 286 of file qgsmapcanvas.h.
| void QgsMapCanvas::renderStarting | ( | ) | [signal] |
| void QgsMapCanvas::resizeEvent | ( | QResizeEvent * | e | ) | [protected] |
| void QgsMapCanvas::saveAsImage | ( | QString | theFileName, |
| QPixmap * | QPixmap = 0, |
||
| QString | theFormat = "PNG" |
||
| ) | [slot] |
Save the convtents of the map canvas to disk as an image.
Definition at line 462 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), mapUnitsPerPixel(), mMap, mMapRenderer, QgsMapCanvasMap::paintDevice(), QgsMapRenderer::render(), renderComplete(), QgsRectangle::xMinimum(), and QgsRectangle::yMaximum().
| double QgsMapCanvas::scale | ( | ) |
Get the last reported scale of the canvas.
Definition at line 204 of file qgsmapcanvas.cpp.
References mMapRenderer, and QgsMapRenderer::scale().
Referenced by QgsMapCanvasItem::setRenderContextVariables(), updateScale(), and zoomScale().
| void QgsMapCanvas::scaleChanged | ( | double | ) | [signal] |
Emitted when the scale of the map changes.
Referenced by updateScale().
| void QgsMapCanvas::selectionChanged | ( | QgsMapLayer * | layer | ) | [signal] |
Emitted when selection in any layer gets changed.
Referenced by selectionChangedSlot(), and setLayerSet().
| void QgsMapCanvas::selectionChangedSlot | ( | ) | [slot] |
Receives signal about selection change, and pass it on with layer info.
Definition at line 1552 of file qgsmapcanvas.cpp.
References layer(), refresh(), and selectionChanged().
Referenced by setLayerSet().
| void QgsMapCanvas::setCanvasColor | ( | const QColor & | theColor | ) | [virtual] |
Write property of QColor bgColor.
Definition at line 1265 of file qgsmapcanvas.cpp.
References mMap, mScene, and QgsMapCanvasMap::setBackgroundColor().
| void QgsMapCanvas::setCurrentLayer | ( | QgsMapLayer * | layer | ) |
Definition at line 199 of file qgsmapcanvas.cpp.
References layer(), and mCurrentLayer.
| void QgsMapCanvas::setDirty | ( | bool | _dirty | ) |
Flag the canvas as dirty and needed a refresh.
Definition at line 209 of file qgsmapcanvas.cpp.
References mDirty.
Referenced by clear().
| void QgsMapCanvas::setExtent | ( | const QgsRectangle & | r | ) |
Set the extent of the map canvas.
Definition at line 537 of file qgsmapcanvas.cpp.
References QgsRectangle::center(), QgsMapOverviewCanvas::drawExtentRect(), extent(), extentsChanged(), QgsRectangle::height(), QgsRectangle::isEmpty(), mDrawing, mLastExtent, mLastExtentIndex, mMapOverview, mMapRenderer, QgsDebugMsg, QgsMapRenderer::setExtent(), updateCanvasItemPositions(), updateScale(), QgsRectangle::width(), QgsPoint::x(), QgsPoint::y(), zoomLastStatusChanged(), and zoomNextStatusChanged().
Referenced by QgsMapToolPan::canvasReleaseEvent(), QgsMapToolZoom::canvasReleaseEvent(), QgsMapToolTouch::canvasReleaseEvent(), keyPressEvent(), QgsMapOverviewCanvas::mouseReleaseEvent(), panActionEnd(), panToSelected(), QgsMapToolTouch::pinchTriggered(), wheelEvent(), zoomByFactor(), zoomToFullExtent(), zoomToSelected(), and zoomWithCenter().
| void QgsMapCanvas::setLayerSet | ( | QList< QgsMapCanvasLayer > & | layers | ) |
Definition at line 234 of file qgsmapcanvas.cpp.
References currentLayer(), QgsMapLayer::id(), QgsMapCanvasLayer::isInOverview(), QgsMapCanvasLayer::isVisible(), QgsMapCanvasLayer::layer(), layer(), layerCount(), layersChanged(), QgsMapOverviewCanvas::layerSet(), QgsMapRenderer::layerSet(), mDrawing, mMapOverview, mMapRenderer, QgsDebugMsg, refresh(), selectionChanged(), selectionChangedSlot(), QgsMapOverviewCanvas::setLayerSet(), QgsMapRenderer::setLayerSet(), updateMap(), and updateOverview().
| void QgsMapCanvas::setMapTool | ( | QgsMapTool * | mapTool | ) |
Sets the map tool currently being used on the canvas.
Definition at line 1214 of file qgsmapcanvas.cpp.
References QgsMapTool::activate(), QgsMapTool::deactivate(), QgsMapTool::isTransient(), mapToolDestroyed(), mapToolSet(), mLastNonZoomMapTool, and mMapTool.
Referenced by mouseReleaseEvent().
| void QgsMapCanvas::setMapUnits | ( | QGis::UnitType | mapUnits | ) |
Set map units (needed by project properties dialog)
Definition at line 1339 of file qgsmapcanvas.cpp.
References mMapRenderer, QgsDebugMsg, and QgsMapRenderer::setMapUnits().
| void QgsMapCanvas::setProgress | ( | int | , |
| int | |||
| ) | [signal] |
Let the owner know how far we are with render operations.
| void QgsMapCanvas::setRenderFlag | ( | bool | theFlag | ) | [slot] |
Whether to suppress rendering or not.
Definition at line 1352 of file qgsmapcanvas.cpp.
References mMapRenderer, mRenderFlag, refresh(), QgsMapRenderer::rendererContext(), and QgsRenderContext::setRenderingStopped().
| void QgsMapCanvas::setWheelAction | ( | WheelAction | action, |
| double | factor = 2 |
||
| ) |
set wheel action and zoom factor (should be greater than 1)
Definition at line 1147 of file qgsmapcanvas.cpp.
References mWheelAction, and mWheelZoomFactor.
Referenced by QgsMapCanvas().
| void QgsMapCanvas::showError | ( | QgsMapLayer * | mapLayer | ) | [slot] |
show whatever error is exposed by the QgsMapLayer.
Definition at line 1482 of file qgsmapcanvas.cpp.
References QgsMapLayer::lastError(), QgsMapLayer::lastErrorTitle(), QgsMapLayer::name(), QgsMessageViewer::setMessageAsPlainText(), and tr.
Referenced by QgsMapCanvas().
| void QgsMapCanvas::unsetMapTool | ( | QgsMapTool * | mapTool | ) |
Unset the current map tool or last non zoom tool.
This is called from destructor of map tools to make sure that this map tool won't be used any more. You don't have to call it manualy, QgsMapTool takes care of it.
Definition at line 1248 of file qgsmapcanvas.cpp.
References QgsMapTool::deactivate(), mapToolSet(), mLastNonZoomMapTool, and mMapTool.
Referenced by QgsMapTool::~QgsMapTool().
| void QgsMapCanvas::updateCanvasItemPositions | ( | ) | [protected] |
called on resize or changed extent to notify canvas items to change their rectangle
Definition at line 1067 of file qgsmapcanvas.cpp.
References mScene, and QgsMapCanvasItem::updatePosition().
Referenced by moveCanvasContents(), paintEvent(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
| void QgsMapCanvas::updateFullExtent | ( | ) |
Updates the full extent.
Definition at line 527 of file qgsmapcanvas.cpp.
References mMapRenderer, QgsDebugMsg, refresh(), and QgsMapRenderer::updateFullExtent().
| void QgsMapCanvas::updateMap | ( | ) | [slot] |
updates pixmap on render progress
Definition at line 453 of file qgsmapcanvas.cpp.
References mMap, and QgsMapCanvasMap::updateContents().
Referenced by setLayerSet().
| void QgsMapCanvas::updateOverview | ( | ) |
Definition at line 350 of file qgsmapcanvas.cpp.
References mMapOverview, and QgsMapOverviewCanvas::refresh().
Referenced by setLayerSet().
| void QgsMapCanvas::updateScale | ( | ) |
Emits signal scaleChanged to update scale in main window.
Definition at line 590 of file qgsmapcanvas.cpp.
References mMapRenderer, scale(), QgsMapRenderer::scale(), and scaleChanged().
Referenced by mapUnitsChanged(), paintEvent(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
| void QgsMapCanvas::useImageToRender | ( | bool | theFlag | ) |
Select which Qt class to render with.
Definition at line 172 of file qgsmapcanvas.cpp.
References mMap, refresh(), and QgsMapCanvasMap::useImageToRender().
| void QgsMapCanvas::wheelEvent | ( | QWheelEvent * | e | ) | [protected] |
Overridden mouse wheel event.
Definition at line 1085 of file qgsmapcanvas.cpp.
References QgsRectangle::center(), extent(), QgsMapRenderer::extent(), getCoordinateTransform(), mDrawing, mMapRenderer, mMapTool, mWheelAction, mWheelZoomFactor, QgsDebugMsg, refresh(), QgsRectangle::scale(), setExtent(), QgsMapTool::wheelEvent(), WheelNothing, WheelZoom, WheelZoomAndRecenter, WheelZoomToMouseCursor, zoomIn(), zoomOut(), and zoomWithCenter().
| void QgsMapCanvas::writeProject | ( | QDomDocument & | doc | ) | [slot] |
called to write map canvas settings to project
Definition at line 1522 of file qgsmapcanvas.cpp.
References mMapRenderer, QgsDebugMsg, and QgsMapRenderer::writeXML().
Referenced by QgsMapCanvas().
| void QgsMapCanvas::xyCoordinates | ( | const QgsPoint & | p | ) | [signal] |
| void QgsMapCanvas::zoomByFactor | ( | double | scaleFactor | ) |
Zoom with the factor supplied. Factor > 1 zooms out, interval (0,1) zooms in.
Definition at line 1539 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), mDrawing, mMapRenderer, refresh(), QgsRectangle::scale(), and setExtent().
Referenced by zoomIn(), zoomOut(), and zoomScale().
| void QgsMapCanvas::zoomIn | ( | ) |
Zoom in with fixed factor.
Definition at line 1153 of file qgsmapcanvas.cpp.
References mWheelZoomFactor, and zoomByFactor().
Referenced by keyPressEvent(), and wheelEvent().
| void QgsMapCanvas::zoomLastStatusChanged | ( | bool | ) | [signal] |
Emitted when zoom last status changed.
Referenced by clearExtentHistory(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
| void QgsMapCanvas::zoomNextStatusChanged | ( | bool | ) | [signal] |
Emitted when zoom next status changed.
Referenced by clearExtentHistory(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
| void QgsMapCanvas::zoomOut | ( | ) |
Zoom out with fixed factor.
Definition at line 1158 of file qgsmapcanvas.cpp.
References mWheelZoomFactor, and zoomByFactor().
Referenced by keyPressEvent(), QgsMapToolTouch::pinchTriggered(), and wheelEvent().
| void QgsMapCanvas::zoomScale | ( | double | scale | ) |
Zoom to a specific scale.
Definition at line 1163 of file qgsmapcanvas.cpp.
References scale(), and zoomByFactor().
| void QgsMapCanvas::zoomToFullExtent | ( | ) |
Zoom to the full extent of all layers.
Definition at line 607 of file qgsmapcanvas.cpp.
References extent(), fullExtent(), QgsRectangle::isEmpty(), mDrawing, refresh(), QgsRectangle::scale(), and setExtent().
| void QgsMapCanvas::zoomToNextExtent | ( | ) |
Zoom to the next extent (view)
Definition at line 653 of file qgsmapcanvas.cpp.
References QgsMapOverviewCanvas::drawExtentRect(), extentsChanged(), mDrawing, mLastExtent, mLastExtentIndex, mMapOverview, mMapRenderer, refresh(), QgsMapRenderer::setExtent(), updateCanvasItemPositions(), updateScale(), zoomLastStatusChanged(), and zoomNextStatusChanged().
| void QgsMapCanvas::zoomToPreviousExtent | ( | ) |
Zoom to the previous extent (view)
Definition at line 628 of file qgsmapcanvas.cpp.
References QgsMapOverviewCanvas::drawExtentRect(), extentsChanged(), mDrawing, mLastExtent, mLastExtentIndex, mMapOverview, mMapRenderer, refresh(), QgsMapRenderer::setExtent(), updateCanvasItemPositions(), updateScale(), zoomLastStatusChanged(), and zoomNextStatusChanged().
| void QgsMapCanvas::zoomToSelected | ( | QgsVectorLayer * | layer = NULL | ) |
Zoom to the extent of the selected features of current (vector) layer.
Added in version 1.2: optionally specify different than current layer
Definition at line 710 of file qgsmapcanvas.cpp.
References QgsVectorLayer::boundingBoxOfSelected(), QgsRectangle::center(), extent(), QgsRectangle::isEmpty(), QgsMapRenderer::layerExtentToOutputExtent(), mCurrentLayer, mDrawing, mMapRenderer, refresh(), QgsRectangle::scale(), QgsVectorLayer::selectedFeatureCount(), and setExtent().
| void QgsMapCanvas::zoomWithCenter | ( | int | x, |
| int | y, | ||
| bool | zoomIn | ||
| ) |
Zooms in/out with a given center.
Definition at line 1168 of file qgsmapcanvas.cpp.
References QgsMapRenderer::extent(), getCoordinateTransform(), mDrawing, mMapRenderer, mWheelZoomFactor, refresh(), QgsRectangle::scale(), setExtent(), and QgsMapToPixel::toMapPoint().
Referenced by QgsMapToolTouch::canvasDoubleClickEvent(), QgsMapToolZoom::canvasReleaseEvent(), and wheelEvent().
bool QgsMapCanvas::mAntiAliasing [private] |
indicates whether antialiasing will be used for rendering
Definition at line 496 of file qgsmapcanvas.h.
Referenced by enableAntiAliasing().
bool QgsMapCanvas::mBackbufferEnabled [private] |
If backbuffering is currently enabled.
Definition at line 436 of file qgsmapcanvas.h.
Referenced by QgsMapCanvas(), and refresh().
std::auto_ptr<CanvasProperties> QgsMapCanvas::mCanvasProperties [protected] |
Handle pattern for implementation object.
Definition at line 408 of file qgsmapcanvas.h.
Referenced by keyPressEvent(), keyReleaseEvent(), mouseLastXY(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveCanvasContents(), and panActionEnd().
QgsMapLayer* QgsMapCanvas::mCurrentLayer [private] |
current layer in legend
Definition at line 468 of file qgsmapcanvas.h.
Referenced by currentLayer(), mouseReleaseEvent(), panToSelected(), QgsMapCanvas(), setCurrentLayer(), and zoomToSelected().
bool QgsMapCanvas::mDirty [private] |
Flag to track the state of the Map canvas.
The canvas is flagged as dirty by any operation that changes the state of the layers or the view extent. If the canvas is not dirty, paint events are handled by bit-blitting the stored canvas bitmap to the canvas. This improves performance by not reading the data source when no real change has occurred
Definition at line 452 of file qgsmapcanvas.h.
Referenced by isDirty(), QgsMapCanvas(), refresh(), and setDirty().
bool QgsMapCanvas::mDrawing [private] |
Flag indicating a map refresh is in progress.
Definition at line 438 of file qgsmapcanvas.h.
Referenced by isDrawing(), keyPressEvent(), keyReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveCanvasContents(), paintEvent(), panAction(), panActionEnd(), panToSelected(), QgsMapCanvas(), refresh(), setExtent(), setLayerSet(), wheelEvent(), zoomByFactor(), zoomToFullExtent(), zoomToNextExtent(), zoomToPreviousExtent(), zoomToSelected(), and zoomWithCenter().
bool QgsMapCanvas::mFrozen [private] |
Flag indicating if the map canvas is frozen.
Definition at line 441 of file qgsmapcanvas.h.
Referenced by freeze(), isFrozen(), QgsMapCanvas(), and refresh().
QList<QgsRectangle> QgsMapCanvas::mLastExtent [private] |
recently used extent
Definition at line 480 of file qgsmapcanvas.h.
Referenced by clearExtentHistory(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
int QgsMapCanvas::mLastExtentIndex [private] |
Definition at line 481 of file qgsmapcanvas.h.
Referenced by clearExtentHistory(), QgsMapCanvas(), setExtent(), zoomToNextExtent(), and zoomToPreviousExtent().
QgsMapTool* QgsMapCanvas::mLastNonZoomMapTool [private] |
previous tool if current is for zooming/panning
Definition at line 477 of file qgsmapcanvas.h.
Referenced by mouseReleaseEvent(), QgsMapCanvas(), setMapTool(), unsetMapTool(), and ~QgsMapCanvas().
QgsMapCanvasMap* QgsMapCanvas::mMap [private] |
owns pixmap with rendered map and controls rendering
Definition at line 430 of file qgsmapcanvas.h.
Referenced by canvasPaintDevice(), enableAntiAliasing(), map(), moveCanvasContents(), paintEvent(), QgsMapCanvas(), refresh(), saveAsImage(), setCanvasColor(), updateMap(), and useImageToRender().
QgsMapOverviewCanvas* QgsMapCanvas::mMapOverview [private] |
map overview widget - it's controlled by QgsMapCanvas
Definition at line 433 of file qgsmapcanvas.h.
Referenced by enableAntiAliasing(), enableOverviewMode(), QgsMapCanvas(), setExtent(), setLayerSet(), updateOverview(), zoomToNextExtent(), and zoomToPreviousExtent().
QgsMapRenderer* QgsMapCanvas::mMapRenderer [private] |
all map rendering is done in this class
Definition at line 427 of file qgsmapcanvas.h.
Referenced by crsTransformEnabled(), enableOverviewMode(), extent(), fullExtent(), getCoordinateTransform(), hasCrsTransformEnabled(), keyPressEvent(), layer(), layerCount(), layers(), mapRenderer(), mapUnits(), mapUnitsPerPixel(), paintEvent(), panActionEnd(), panToSelected(), QgsMapCanvas(), readProject(), saveAsImage(), scale(), setExtent(), setLayerSet(), setMapUnits(), setRenderFlag(), updateFullExtent(), updateScale(), wheelEvent(), writeProject(), zoomByFactor(), zoomToNextExtent(), zoomToPreviousExtent(), zoomToSelected(), zoomWithCenter(), and ~QgsMapCanvas().
QgsMapTool* QgsMapCanvas::mMapTool [private] |
pointer to current map tool
Definition at line 474 of file qgsmapcanvas.h.
Referenced by keyPressEvent(), keyReleaseEvent(), mapTool(), mapToolDestroyed(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), QgsMapCanvas(), refresh(), setMapTool(), unsetMapTool(), wheelEvent(), and ~QgsMapCanvas().
QSize QgsMapCanvas::mNewSize [private] |
resize canvas size
Definition at line 490 of file qgsmapcanvas.h.
Referenced by paintEvent(), and resizeEvent().
bool QgsMapCanvas::mPainting [private] |
bool QgsMapCanvas::mRenderFlag [private] |
determines whether user has requested to suppress rendering
Definition at line 455 of file qgsmapcanvas.h.
Referenced by QgsMapCanvas(), refresh(), and setRenderFlag().
QList< QPair<int, int> > QgsMapCanvas::mResizeQueue [private] |
Resize events that have been ignored because the canvas is busy with rendering may put their sizes into this list.
The canvas then picks up the last entry in case a lot of resize events arrive in short time
Definition at line 460 of file qgsmapcanvas.h.
QGraphicsScene* QgsMapCanvas::mScene [private] |
graphics scene manages canvas items
Definition at line 471 of file qgsmapcanvas.h.
Referenced by canvasColor(), moveCanvasContents(), paintEvent(), QgsMapCanvas(), setCanvasColor(), updateCanvasItemPositions(), and ~QgsMapCanvas().
WheelAction QgsMapCanvas::mWheelAction [private] |
Mouse wheel action.
Definition at line 487 of file qgsmapcanvas.h.
Referenced by setWheelAction(), and wheelEvent().
double QgsMapCanvas::mWheelZoomFactor [private] |
Scale factor multiple for default zoom in/out.
Definition at line 484 of file qgsmapcanvas.h.
Referenced by setWheelAction(), wheelEvent(), zoomIn(), zoomOut(), and zoomWithCenter().