16#ifndef QGSSNAPTOGRIDCANVASITEM_H
17#define QGSSNAPTOGRIDCANVASITEM_H
54 sipType = sipType_QgsSnapToGridCanvasItem;
71 void paint( QPainter *painter )
override;
124 void updateMapCanvasCrs();
126 void updateZoomFactor();
129 QPen mGridPen = QPen( QColor( 127, 127, 127, 150 ) );
130 QPen mCurrentPointPen = QPen( QColor( 200, 200, 200, 150 ) );
132 bool mEnabled =
true;
133 bool mAvailableByZoomFactor =
false;
135 double mPrecision = 0.0;
Represents a coordinate reference system (CRS).
QgsMapCanvasItem(QgsMapCanvas *mapCanvas)
protected constructor: cannot be constructed directly
Map canvas is a class for displaying all GIS data types on a canvas.
bool enabled() const
Enable this item.
double precision() const
The resolution of the grid in map units.
void setCrs(const QgsCoordinateReferenceSystem &crs)
The CRS in which the grid should be calculated.
void setPoint(const QgsPointXY &point)
A point that will be highlighted on the map canvas.
void setEnabled(bool enabled)
Enable this item.
QgsSnapToGridCanvasItem(QgsMapCanvas *mapCanvas)
Will automatically be added to the mapCanvas.
void paint(QPainter *painter) override
function to be implemented by derived classes
QgsCoordinateReferenceSystem crs() const
The CRS in which the grid should be calculated.
void setPrecision(double precision)
The resolution of the grid in map units.
QgsPointXY point() const
A point that will be highlighted on the map canvas.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)