16#ifndef QGSSNAPTOGRIDCANVASITEM_H
17#define QGSSNAPTOGRIDCANVASITEM_H
54 sipType = sipType_QgsSnapToGridCanvasItem;
72 void paint( QPainter *painter )
override;
125 void updateMapCanvasCrs();
127 void updateZoomFactor();
130 QPen mGridPen = QPen( QColor( 127, 127, 127, 150 ) );
131 QPen mCurrentPointPen = QPen( QColor( 200, 200, 200, 150 ) );
133 bool mEnabled =
true;
134 bool mAvailableByZoomFactor =
false;
136 double mPrecision = 0.0;
Represents a coordinate reference system (CRS).
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
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)