QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsmapcanvassnappingutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmapcanvassnappingutils.h
3 ---------------------
4 begin : December 2014
5 copyright : (C) 2014 by Martin Dobias
6 email : wonder dot sk at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSMAPCANVASSNAPPINGUTILS_H
16#define QGSMAPCANVASSNAPPINGUTILS_H
17
18#include "qgssnappingutils.h"
19#include "qgis_gui.h"
20
21#include "qgsmaptool.h"
22
23class QgsMapCanvas;
24
25class QProgressDialog;
26
33{
34 Q_OBJECT
35 public:
43 QgsMapCanvasSnappingUtils( QgsMapCanvas *canvas, QObject *parent = nullptr );
44
45 protected:
46 void prepareIndexStarting( int count ) override;
47 void prepareIndexProgress( int index ) override;
48
49 private slots:
50 void canvasMapSettingsChanged();
51 void canvasTransformContextChanged();
52 void canvasCurrentLayerChanged();
53 void canvasMapToolChanged();
54
55 private:
56 QgsMapCanvas *mCanvas = nullptr;
57 QProgressDialog *mProgress = nullptr;
58};
59
60
61#endif // QGSMAPCANVASSNAPPINGUTILS_H
Snapping utils instance that is connected to a canvas and updates the configuration (map settings + c...
Map canvas is a class for displaying all GIS data types on a canvas.
This class has all the configuration of snapping and can return answers to snapping queries.
virtual void prepareIndexProgress(int index)
Called when finished indexing a layer with snapToMap. When index == count the indexing is complete.
virtual void prepareIndexStarting(int count)
Called when starting to index with snapToMap - can be overridden and e.g. progress dialog can be prov...