QGIS API Documentation 3.28.14-Firenze (exported)
Loading...
Searching...
No Matches
qgsmapcanvas.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmapcanvas.h - description
3 -------------------
4 begin : Sun Jun 30 2002
5 copyright : (C) 2002 by Gary E.Sherman
6 email : sherman at mrcc.com
7***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSMAPCANVAS_H
19#define QGSMAPCANVAS_H
20
21#include "qgsconfig.h"
22#include "qgis_sip.h"
23
25#include "qgsrectangle.h"
26#include "qgsfeatureid.h"
27#include "qgsgeometry.h"
30#include "qgsproject.h"
31#include "qgsdistancearea.h"
32#include "qgsmaprendererjob.h"
33
34#include <QDomDocument>
35#include <QGraphicsView>
36
37#include "qgsmapsettings.h" // TEMPORARY
38#include "qgsprevieweffect.h" //for QgsPreviewEffect::PreviewMode
39
40#include <QTimer>
41#include <QGestureEvent>
42#include "qgis_gui.h"
43
44class QWheelEvent;
45class QPixmap;
46class QPaintEvent;
47class QKeyEvent;
48class ResizeEvent;
49
50class QColor;
51class QDomDocument;
52class QPaintDevice;
53class QMouseEvent;
54class QRubberBand;
55class QGraphicsScene;
56
57class QgsMapToPixel;
58class QgsMapLayer;
59class QgsHighlight;
60class QgsVectorLayer;
61
63
66class QgsMapSettings;
67class QgsMapCanvasMap;
69class QgsMapTool;
71class QgsRubberBand;
76
78class QgsScreenHelper;
79
80class QMenu;
82
83
89class GUI_EXPORT QgsMapCanvas : public QGraphicsView, public QgsExpressionContextGenerator
90{
91
92#ifdef SIP_RUN
94 if ( qobject_cast<QgsMapCanvas *>( sipCpp ) != nullptr )
95 sipType = sipType_QgsMapCanvas;
96 else
97 sipType = nullptr;
99#endif
100
101 Q_OBJECT
102 Q_PROPERTY( QString theme READ theme WRITE setTheme NOTIFY themeChanged )
103 Q_PROPERTY( bool previewJobsEnabled READ previewJobsEnabled WRITE setPreviewJobsEnabled )
104
105 public:
106
108 QgsMapCanvas( QWidget *parent SIP_TRANSFERTHIS = nullptr );
109
110 ~QgsMapCanvas() override;
111
116 double magnificationFactor() const;
117
129 void setLayers( const QList<QgsMapLayer *> &layers );
130
131 void setCurrentLayer( QgsMapLayer *layer );
132
137 const QgsMapSettings &mapSettings() const SIP_KEEPREFERENCE;
138
145 void setTemporalController( QgsTemporalController *controller );
146
153 const QgsTemporalController *temporalController() const;
154
159 void setDestinationCrs( const QgsCoordinateReferenceSystem &crs );
160
165 void setMapSettingsFlags( Qgis::MapSettingsFlags flags );
166
175 const QgsLabelingResults *labelingResults( bool allowOutdatedResults = true ) const;
176
186 const QgsRenderedItemResults *renderedItemResults( bool allowOutdatedResults = true ) const;
187
192 void setCachingEnabled( bool enabled );
193
198 bool isCachingEnabled() const;
199
204 void clearCache();
205
210 void cancelJobs() SIP_SKIP;
211
221 void waitWhileRendering();
222
227 void setParallelRenderingEnabled( bool enabled );
228
233 bool isParallelRenderingEnabled() const;
234
239 void setMapUpdateInterval( int timeMilliseconds );
240
245 int mapUpdateInterval() const;
246
251 double scale() const;
252
254 double mapUnitsPerPixel() const;
255
257 QgsRectangle extent() const;
258
267 QgsRectangle fullExtent() const;
268
278 QgsRectangle projectExtent() const;
279
291 void setExtent( const QgsRectangle &r, bool magnified = false );
292
301 bool setReferencedExtent( const QgsReferencedRectangle &extent ) SIP_THROW( QgsCsException );
302
307 double rotation() const;
308
313 void setRotation( double degrees );
314
319 void setCenter( const QgsPointXY &center );
320
325 QgsPointXY center() const;
326
332 void zoomToFullExtent();
333
342 void zoomToProjectExtent();
343
345 void zoomToPreviousExtent();
346
348 void zoomToNextExtent();
349
351 void clearExtentHistory();
352
353
359 void zoomToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids );
360
367 void panToFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids, bool alwaysRecenter = true );
368
370 void panToSelected( QgsMapLayer *layer = nullptr );
371
377 void panToSelected( const QList<QgsMapLayer *> &layers );
378
391 void flashFeatureIds( QgsVectorLayer *layer, const QgsFeatureIds &ids,
392 const QColor &startColor = QColor( 255, 0, 0, 255 ), const QColor &endColor = QColor( 255, 0, 0, 0 ),
393 int flashes = 3, int duration = 500 );
394
407 void flashGeometries( const QList< QgsGeometry > &geometries, const QgsCoordinateReferenceSystem &crs = QgsCoordinateReferenceSystem(),
408 const QColor &startColor = QColor( 255, 0, 0, 255 ), const QColor &endColor = QColor( 255, 0, 0, 0 ),
409 int flashes = 3, int duration = 500 );
410
412 void setMapTool( QgsMapTool *mapTool, bool clean = false );
413
421 void unsetMapTool( QgsMapTool *mapTool );
422
424 QgsMapTool *mapTool();
425
431 void setProject( QgsProject *project );
432
439 QgsProject *project();
440
442 void setCanvasColor( const QColor &_newVal );
444 QColor canvasColor() const;
445
450 void setSelectionColor( const QColor &color );
451
456 QColor selectionColor() const;
457
459 void updateScale();
460
462 QgsMapLayer *layer( int index );
463
474 QgsMapLayer *layer( const QString &id );
475
479 int layerCount() const;
480
489 QList<QgsMapLayer *> layers( bool expandGroupLayers = false ) const;
490
500 void freeze( bool frozen = true );
501
509 bool isFrozen() const;
510
519 bool renderFlag() const { return mRenderFlag; }
520
525 QgsUnitTypes::DistanceUnit mapUnits() const;
526
532 QMap<QString, QString> layerStyleOverrides() const;
533
545 void setLayerStyleOverrides( const QMap<QString, QString> &overrides );
546
565 void setTheme( const QString &theme );
566
572 QString theme() const { return mTheme; }
573
575 const QgsMapToPixel *getCoordinateTransform();
576
578 bool isDrawing();
579
581 QgsMapLayer *currentLayer();
582
584 void setWheelFactor( double factor );
585
593 void zoomScale( double scale, bool ignoreScaleLock = false );
594
602 void zoomByFactor( double scaleFactor, const QgsPointXY *center = nullptr, bool ignoreScaleLock = false );
603
605 void zoomWithCenter( int x, int y, bool zoomIn );
606
611 void zoomToFeatureExtent( QgsRectangle &rect );
612
618 bool scaleLocked() const { return mScaleLocked;}
619
621 void enableAntiAliasing( bool flag );
622
624 bool antiAliasingEnabled() const;
625
627 void enableMapTileRendering( bool flag );
628
629 // following 2 methods should be moved elsewhere or changed to private
630 // currently used by pan map tool
632 void panActionEnd( QPoint releasePoint );
633
634#ifndef SIP_RUN
635
641 void panActionStart( QPoint releasePoint );
642#endif
643
645 void panAction( QMouseEvent *event );
646
648 QPoint mouseLastXY();
649
656 void setPreviewModeEnabled( bool previewEnabled );
657
665 bool previewModeEnabled() const;
666
676 void setPreviewMode( QgsPreviewEffect::PreviewMode mode );
677
686 QgsPreviewEffect::PreviewMode previewMode() const;
687
696 QgsSnappingUtils *snappingUtils() const;
697
706 void setSnappingUtils( QgsSnappingUtils *utils );
707
718 void setExpressionContextScope( const QgsExpressionContextScope &scope ) { mExpressionContextScope = scope; }
719
728 QgsExpressionContextScope &expressionContextScope() { return mExpressionContextScope; }
729
737 const QgsExpressionContextScope &expressionContextScope() const { return mExpressionContextScope; } SIP_SKIP
738
745 QgsExpressionContextScope *defaultExpressionContextScope() const SIP_FACTORY;
746
747 QgsExpressionContext createExpressionContext() const override;
748
753 void setSegmentationTolerance( double tolerance );
754
759 void setSegmentationToleranceType( QgsAbstractGeometry::SegmentationToleranceType type );
760
765 QList< QgsMapCanvasAnnotationItem *> annotationItems() const;
766
772 bool annotationsVisible() const { return mAnnotationsVisible; }
773
779 void setAnnotationsVisible( bool visible );
780
785 void setLabelingEngineSettings( const QgsLabelingEngineSettings &settings );
786
791 const QgsLabelingEngineSettings &labelingEngineSettings() const;
792
801 bool previewJobsEnabled() const;
802
811 void setPreviewJobsEnabled( bool enabled );
812
818 void setCustomDropHandlers( const QVector<QPointer<QgsCustomDropHandler >> &handlers ) SIP_SKIP;
819
830 void setTemporalRange( const QgsDateTimeRange &range );
831
838 const QgsDateTimeRange &temporalRange() const;
839
851 void installInteractionBlocker( QgsMapCanvasInteractionBlocker *blocker );
852
860 void removeInteractionBlocker( QgsMapCanvasInteractionBlocker *blocker );
861
867 bool allowInteraction( QgsMapCanvasInteractionBlocker::Interaction interaction ) const;
868
869 public slots:
870
872 void refresh();
873
883 void refreshAllLayers();
884
893 void redrawAllLayers();
894
896 void selectionChangedSlot();
897
899 void saveAsImage( const QString &fileName, QPixmap *QPixmap = nullptr, const QString & = "PNG" );
900
902 void layerStateChange();
903
911 void setRenderFlag( bool flag );
912
917 void stopRendering();
918
920 void readProject( const QDomDocument & );
921
923 void writeProject( QDomDocument & );
924
933 void setMagnificationFactor( double factor, const QgsPointXY *center = nullptr );
934
940 void setScaleLocked( bool isLocked );
941
943 void zoomIn();
944
946 void zoomOut();
947
952 void zoomToSelected( QgsMapLayer *layer = nullptr );
953
959 void zoomToSelected( const QList<QgsMapLayer *> &layers );
960
966 void setZoomResolutions( const QList<double> &resolutions ) { mZoomResolutions = resolutions; }
967
971 double zoomInFactor() const;
972
976 double zoomOutFactor() const;
977
983 const QList<double> &zoomResolutions() const { return mZoomResolutions; }
984
993 QgsDoubleRange zRange() const;
994
1003 void setZRange( const QgsDoubleRange &range );
1004
1005 private slots:
1007 void mapToolDestroyed();
1008
1010 void rendererJobFinished();
1011
1013 void previewJobFinished();
1014
1015 void mapUpdateTimeout();
1016
1017 void refreshMap();
1018
1019 void mapThemeChanged( const QString &theme );
1021 void mapThemeRenamed( const QString &theme, const QString &newTheme );
1022
1023 void updateDevicePixelFromScreen();
1024
1025 signals:
1026
1031 void xyCoordinates( const QgsPointXY &p );
1032
1034 void scaleChanged( double );
1035
1042 void scaleLockChanged( bool locked );
1043
1044
1047
1052 void rotationChanged( double );
1053
1058 void magnificationChanged( double );
1059
1065
1066 // TODO: deprecate when decorations are reimplemented as map canvas items
1067
1078 void renderComplete( QPainter * );
1079
1080 // ### QGIS 3: renamte to mapRefreshFinished()
1083
1084 // ### QGIS 3: rename to mapRefreshStarted()
1087
1093
1096
1098 void keyPressed( QKeyEvent *e );
1099
1101 void keyReleased( QKeyEvent *e );
1102
1107 void mapToolSet( QgsMapTool *newTool, QgsMapTool *oldTool );
1108
1115
1118
1121
1127
1133
1139
1145
1151 void themeChanged( const QString &theme );
1152
1154 void messageEmitted( const QString &title, const QString &message, Qgis::MessageLevel = Qgis::MessageLevel::Info );
1155
1163 void renderErrorOccurred( const QString &error, QgsMapLayer *layer );
1164
1175 void panDistanceBearingChanged( double distance, QgsUnitTypes::DistanceUnit unit, double bearing );
1176
1181 void tapAndHoldGestureOccurred( const QgsPointXY &mapPoint, QTapAndHoldGesture *gesture );
1182
1189
1199
1206 void contextMenuAboutToShow( QMenu *menu, QgsMapMouseEvent *event );
1207
1208 protected:
1209
1210 bool event( QEvent *e ) override;
1211 void keyPressEvent( QKeyEvent *e ) override;
1212 void keyReleaseEvent( QKeyEvent *e ) override;
1213 void mouseDoubleClickEvent( QMouseEvent *e ) override;
1214 void mouseMoveEvent( QMouseEvent *e ) override;
1215 void mousePressEvent( QMouseEvent *e ) override;
1216 void mouseReleaseEvent( QMouseEvent *e ) override;
1217 void wheelEvent( QWheelEvent *e ) override;
1218 void resizeEvent( QResizeEvent *e ) override;
1219 void paintEvent( QPaintEvent *e ) override;
1220 void dragEnterEvent( QDragEnterEvent *e ) override;
1221 bool viewportEvent( QEvent *event ) override;
1222
1224 void moveCanvasContents( bool reset = false );
1225
1226 void dropEvent( QDropEvent *event ) override;
1227
1228 void showEvent( QShowEvent *event ) override;
1229
1235 void emitExtentsChanged();
1236
1238 class CanvasProperties;
1239
1241 std::unique_ptr<CanvasProperties> mCanvasProperties;
1242
1243#if 0
1244
1249 void connectNotify( const char *signal ) override;
1250#endif
1251
1252 protected slots:
1254 void updateCanvasItemPositions();
1255
1256 private slots:
1257
1258 void layerRepaintRequested( bool deferred );
1259
1260 void autoRefreshTriggered();
1261
1262 void updateAutoRefreshTimer();
1263
1264 void projectThemesChanged();
1265
1266 void startPreviewJob( int number );
1267
1268 void temporalControllerModeChanged();
1269
1270 private:
1271
1272 // Restore scale RAII
1273 class ScaleRestorer
1274 {
1275 public:
1276 ScaleRestorer( QgsMapCanvas *canvas ):
1277 mCanvas( canvas )
1278 {
1279 mLockedScale = mCanvas->mapSettings().scale();
1280 };
1281
1282 ~ScaleRestorer()
1283 {
1284 QgsRectangle newExtent = mCanvas->mapSettings().extent();
1285 newExtent.scale( mLockedScale / mCanvas->mapSettings().scale() );
1286 mCanvas->mSettings.setExtent( newExtent );
1287 };
1288
1289 private:
1290 QgsMapCanvas *mCanvas;
1291 double mLockedScale;
1292 };
1293
1295 QgsMapSettings mSettings;
1296
1298 QgsMapCanvasMap *mMap = nullptr;
1299
1300 QgsScreenHelper *mScreenHelper = nullptr;
1301
1306 QgsTemporalController *mController = nullptr;
1307
1309 bool mFrozen = false;
1310
1312 bool mRefreshScheduled = false;
1313
1315 bool mRefreshAfterJob = false;
1316
1318 bool mRenderFlag = true;
1319
1321 QPointer< QgsMapLayer > mCurrentLayer;
1322
1324 QGraphicsScene *mScene = nullptr;
1325
1327 QgsMapTool *mMapTool = nullptr;
1328
1330 QgsMapTool *mLastNonZoomMapTool = nullptr;
1331
1333 QgsProject *mProject = nullptr;
1334
1336 QList <QgsRectangle> mLastExtent;
1337 int mLastExtentIndex = -1;
1338
1340 double mWheelZoomFactor = 2.0;
1341
1343 QTimer mMapUpdateTimer;
1344
1346 QgsMapRendererQImageJob *mJob = nullptr;
1347
1349 bool mJobCanceled = false;
1350
1352 std::unique_ptr< QgsLabelingResults > mLabelingResults;
1353
1355 bool mLabelingResultsOutdated = false;
1356
1361 std::unique_ptr< QgsRenderedItemResults > mRenderedItemResults;
1362
1367 std::unique_ptr< QgsRenderedItemResults > mPreviousRenderedItemResults;
1368
1374 bool mRenderedItemResultsOutdated = false;
1375
1377 bool mUseParallelRendering = false;
1378
1380 bool mDrawRenderingStats = false;
1381
1383 QgsMapRendererCache *mCache = nullptr;
1384
1385 QTimer *mResizeTimer = nullptr;
1386 QTimer *mRefreshTimer = nullptr;
1387
1388 QgsPreviewEffect *mPreviewEffect = nullptr;
1389
1390 QgsRectangle imageRect( const QImage &img, const QgsMapSettings &mapSettings );
1391
1392 QgsSnappingUtils *mSnappingUtils = nullptr;
1393
1394 QList< QgsMapRendererQImageJob * > mPreviewJobs;
1395
1397 bool mScaleLocked = false;
1398
1399 QgsExpressionContextScope mExpressionContextScope;
1400
1402 QRect mZoomRect;
1403
1405 bool mZoomDragging = false;
1406
1408 std::unique_ptr< QgsRubberBand > mZoomRubberBand;
1409
1410 QCursor mZoomCursor;
1411
1412 QTimer mAutoRefreshTimer;
1413
1414 QTimer mPreviewTimer;
1415 QMetaObject::Connection mPreviewTimerConnection;
1416
1417 QString mTheme;
1418
1419 QgsPointXY mCursorPoint;
1420
1421 bool mAnnotationsVisible = true;
1422
1423 bool mUsePreviewJobs = false;
1424
1425 QHash< QString, int > mLastLayerRenderTime;
1426
1427 QVector<QPointer<QgsCustomDropHandler >> mDropHandlers;
1428
1429 QgsDistanceArea mDa;
1430 QList<double> mZoomResolutions;
1431
1432 QList< QgsMapCanvasInteractionBlocker * > mInteractionBlockers;
1433
1434 int mBlockItemPositionUpdates = 0;
1435 int mBlockExtentChangedSignal = 0;
1436 int mBlockScaleChangedSignal = 0;
1437
1438 std::unique_ptr< QgsTemporaryCursorOverride > mTemporaryCursorOverride;
1439
1447 QMap <QString, QDateTime> mRendererErrors;
1448
1453 QgsPointXY cursorPoint() const;
1454
1459 void updateMapSize();
1460
1466 void beginZoomRect( QPoint pos );
1467
1473 void endZoomRect( QPoint pos );
1474
1476 void stopZoomRect();
1477
1479 void startPan();
1480
1482 void stopPan();
1483
1492 bool boundingBoxOfFeatureIds( const QgsFeatureIds &ids, QgsVectorLayer *layer, QgsRectangle &bbox, QString &errorMsg ) const;
1493
1500 QgsRectangle optimalExtentForPointLayer( QgsVectorLayer *layer, const QgsPointXY &center, int scaleFactor = 5 );
1501
1502 void setLayersPrivate( const QList<QgsMapLayer *> &layers );
1503
1504 void startPreviewJobs();
1505 void stopPreviewJobs();
1506 void schedulePreviewJob( int number );
1507
1511 bool panOperationInProgress();
1512
1513 int nextZoomLevel( const QList<double> &resolutions, bool zoomIn = true ) const;
1514
1519 void clearTemporalCache();
1520
1524 void clearElevationCache();
1525
1526 void showContextMenu( QgsMapMouseEvent *event );
1527
1532 void notifyRendererErrors( const QgsMapRendererJob::Errors &errors );
1533
1534 friend class TestQgsMapCanvas;
1535
1536}; // class QgsMapCanvas
1537
1538// clazy:excludeall=qstring-allocations
1539
1540#endif
The Qgis class provides global constants for use throughout the application.
Definition qgis.h:72
MessageLevel
Level for messages This will be used both for message log and message bar in application.
Definition qgis.h:115
@ Info
Information message.
Definition qgis.h:116
Abstract base class for all geometries.
This class represents a coordinate reference system (CRS).
Custom exception class for Coordinate Reference System related exceptions.
A general purpose distance and area calculator, capable of performing ellipsoid based calculations.
QgsRange which stores a range of double values.
Definition qgsrange.h:203
Abstract interface for generating an expression context.
Single scope for storing variables and functions for use within a QgsExpressionContext.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
A geometry is the spatial representation of a feature.
A class for highlight features on the map.
Stores global configuration for labeling engine.
Class that stores computed placement from labeling engine.
An interactive map canvas item which displays a QgsAnnotation.
An interface for objects which block interactions with a QgsMapCanvas.
Interaction
Available interactions to block.
Deprecated to be deleted, stuff from here should be moved elsewhere.
Map canvas is a class for displaying all GIS data types on a canvas.
void messageEmitted(const QString &title, const QString &message, Qgis::MessageLevel=Qgis::MessageLevel::Info)
emit a message (usually to be displayed in a message bar)
void contextMenuAboutToShow(QMenu *menu, QgsMapMouseEvent *event)
Emitted before the map canvas context menu will be shown.
void selectionChanged(QgsMapLayer *layer)
Emitted when selection in any layer gets changed.
void extentsChanged()
Emitted when the extents of the map change.
void xyCoordinates(const QgsPointXY &p)
Emits current mouse position.
QgsExpressionContextScope & expressionContextScope()
Returns a reference to the expression context scope for the map canvas.
void magnificationChanged(double)
Emitted when the scale of the map changes.
void setZoomResolutions(const QList< double > &resolutions)
Set a list of resolutions (map units per pixel) to which to "snap to" when zooming the map.
QString theme() const
Returns the map's theme shown in the canvas, if set.
void renderComplete(QPainter *)
Emitted when the canvas has rendered.
void tapAndHoldGestureOccurred(const QgsPointXY &mapPoint, QTapAndHoldGesture *gesture)
Emitted whenever a tap and hold gesture occurs at the specified map point.
void zoomNextStatusChanged(bool)
Emitted when zoom next status changed.
const QList< double > & zoomResolutions() const
void rotationChanged(double)
Emitted when the rotation of the map changes.
bool scaleLocked() const
Returns whether the scale is locked, so zooming can be performed using magnication.
void zRangeChanged()
Emitted when the map canvas z (elevation) range changes.
void mapToolSet(QgsMapTool *newTool, QgsMapTool *oldTool)
Emit map tool changed with the old tool.
void canvasColorChanged()
Emitted when canvas background color changes.
void currentLayerChanged(QgsMapLayer *layer)
Emitted when the current layer is changed.
void renderErrorOccurred(const QString &error, QgsMapLayer *layer)
Emitted whenever an error is encountered during a map render operation.
void mapRefreshCanceled()
Emitted when the pending map refresh has been canceled.
void renderStarting()
Emitted when the canvas is about to be rendered.
std::unique_ptr< CanvasProperties > mCanvasProperties
Handle pattern for implementation object.
void keyReleased(QKeyEvent *e)
Emit key release event.
const QgsExpressionContextScope & expressionContextScope() const
Returns a const reference to the expression context scope for the map canvas.
void layerStyleOverridesChanged()
Emitted when the configuration of overridden layer styles changes.
void scaleChanged(double)
Emitted when the scale of the map changes.
void scaleLockChanged(bool locked)
Emitted when the scale locked state of the map changes.
void panDistanceBearingChanged(double distance, QgsUnitTypes::DistanceUnit unit, double bearing)
Emitted whenever the distance or bearing of an in-progress panning operation is changed.
void temporalRangeChanged()
Emitted when the map canvas temporal range changes.
void themeChanged(const QString &theme)
Emitted when the canvas has been assigned a different map theme.
void destinationCrsChanged()
Emitted when map CRS has changed.
void transformContextChanged()
Emitted when the canvas transform context is changed.
void keyPressed(QKeyEvent *e)
Emit key press event.
void mapCanvasRefreshed()
Emitted when canvas finished a refresh request.
void zoomLastStatusChanged(bool)
Emitted when zoom last status changed.
void layersChanged()
Emitted when a new set of layers has been received.
void setExpressionContextScope(const QgsExpressionContextScope &scope)
Sets an expression context scope for the map canvas.
Base class for all map layer types.
Definition qgsmaplayer.h:73
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
A widget that displays an overview map.
This class is responsible for keeping cache of rendered images resulting from a map rendering job.
QList< QgsMapRendererJob::Error > Errors
Intermediate base class adding functionality that allows client to query the rendered image.
The QgsMapSettings class contains configuration for rendering of the map.
Perform transforms between map coordinates and device coordinates.
Abstract base class for all map tools.
Definition qgsmaptool.h:71
A class to represent a 2D point.
Definition qgspointxy.h:59
A graphics effect which can be applied to a widget to simulate various printing and color blindness m...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition qgsproject.h:104
A rectangle specified with double values.
void scale(double scaleFactor, const QgsPointXY *c=nullptr)
Scale the rectangle around its center point.
A QgsRectangle with associated coordinate reference system.
Stores collated details of rendered items during a map rendering operation.
A class for drawing transient features (e.g.
A utility class for dynamic handling of changes to screen properties.
This class has all the configuration of snapping and can return answers to snapping queries.
A controller base class for temporal objects, contains a signal for notifying updates of the objects ...
Temporarily sets a cursor override for the QApplication for the lifetime of the object.
DistanceUnit
Units of distance.
Represents a vector layer which manages a vector based data sets.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
Definition qgis_sip.h:186
#define SIP_KEEPREFERENCE
Definition qgis_sip.h:86
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_FACTORY
Definition qgis_sip.h:76
#define SIP_THROW(name,...)
Definition qgis_sip.h:198
#define SIP_END
Definition qgis_sip.h:203
QSet< QgsFeatureId > QgsFeatureIds
const QgsCoordinateReferenceSystem & crs