QGIS API Documentation
3.26.3-Buenos Aires (65e4edfdad)
|
Go to the documentation of this file.
21 #include <QApplication>
22 #include <QProgressDialog>
35 canvasMapSettingsChanged();
36 canvasCurrentLayerChanged();
39 void QgsMapCanvasSnappingUtils::canvasMapSettingsChanged()
45 void QgsMapCanvasSnappingUtils::canvasTransformContextChanged()
52 void QgsMapCanvasSnappingUtils::canvasCurrentLayerChanged()
57 void QgsMapCanvasSnappingUtils::canvasMapToolChanged()
64 QApplication::setOverrideCursor( Qt::WaitCursor );
65 mProgress =
new QProgressDialog( tr(
"Indexing data…" ), QString(), 0, count, mCanvas->topLevelWidget() );
66 mProgress->setWindowModality( Qt::WindowModal );
74 mProgress->setValue( index );
75 if ( index == mProgress->maximum() )
79 QApplication::restoreOverrideCursor();
void currentLayerChanged(QgsMapLayer *layer)
Emitted when the current layer is changed.
void transformContextChanged()
Emitted when the canvas transform context is changed.
void mapToolSet(QgsMapTool *newTool, QgsMapTool *oldTool)
Emit map tool changed with the old tool.
void destinationCrsChanged()
Emitted when map CRS has changed.
static const QgsSettingsEntryBool settingsDigitizingSnapInvisibleFeature
Settings entry digitizing snap invisible feature.
const QgsMapSettings & mapSettings() const
Gets access to properties used for map rendering.
Map canvas is a class for displaying all GIS data types on a canvas.
void setCurrentLayer(QgsVectorLayer *layer)
Sets current layer so that if mode is SnapCurrentLayer we know which layer to use.
void clearAllLocators()
Deletes all existing locators (e.g. when destination CRS has changed and we need to reindex)
QgsMapCanvasSnappingUtils(QgsMapCanvas *canvas, QObject *parent=nullptr)
Construct map canvas snapping utils object.
void layersChanged()
Emitted when a new set of layers has been received.
void extentsChanged()
Emitted when the extents of the map change.
This class has all the configuration of snapping and can return answers to snapping queries.
void prepareIndexStarting(int count) override
Called when starting to index with snapToMap - can be overridden and e.g. progress dialog can be prov...
QgsSettingsRegistryCore is used for settings introspection and collects all QgsSettingsEntry instance...
void setEnableSnappingForInvisibleFeature(bool enable)
Set if invisible features must be snapped or not.
void prepareIndexProgress(int index) override
Called when finished indexing a layer with snapToMap. When index == count the indexing is complete.
void setMapSettings(const QgsMapSettings &settings)
Assign current map settings to the utils - used for conversion between screen coords to map coords.
QgsMapLayer * currentLayer()
returns current layer (set by legend widget)