16#ifndef QGSMODELSNAPPER_H
17#define QGSMODELSNAPPER_H
63 void setSnapToGrid(
bool enabled );
81 QPointF snapPoint( QPointF point,
double scaleFactor,
bool &snapped
SIP_OUT,
bool snapHorizontal =
true,
bool snapVertical =
true )
const;
102 QRectF snapRect(
const QRectF &rect,
double scaleFactor,
bool &snapped
SIP_OUT,
bool snapHorizontal =
true,
bool snapVertical =
true )
const;
120 QRectF snapRectWithResize(
const QRectF &rect,
double scaleFactor,
bool &snapped
SIP_OUT,
bool snapHorizontal =
true,
bool snapVertical =
true )
const;
136 QPointF snapPointToGrid( QPointF point,
double scaleFactor,
bool &snappedX
SIP_OUT,
bool &snappedY
SIP_OUT )
const;
153 QPointF snapPointsToGrid(
const QList<QPointF> &points,
double scaleFactor,
bool &snappedX
SIP_OUT,
bool &snappedY
SIP_OUT )
const;
157 bool mSnapToGrid =
false;
int snapTolerance() const
Returns the snap tolerance (in pixels) to use when snapping.
void setSnapTolerance(int snapTolerance)
Sets the snap tolerance (in pixels) to use when snapping.
QgsModelSnapper()
Constructor for QgsModelSnapper, attached to the specified layout.
bool snapToGrid() const
Returns true if snapping to grid is enabled.