20 #include "qgis_core.h"
41 , relative( relative )
The QgsCadUtils class provides routines for CAD editing.
A class to represent a 2D point.
This class has all the configuration of snapping and can return answers to snapping queries.
Structure with details of one constraint.
AlignMapPointConstraint(bool locked=false, bool relative=false, double value=0)
bool locked
Whether the constraint is active, i.e. should be considered.
double value
Numeric value of the constraint (coordinate/distance in map units or angle in degrees)
bool relative
Whether the value is relative to previous value.
Structure defining all constraints for alignMapPoint() method.
QgsCadUtils::AlignMapPointConstraint yConstraint
Constraint for Y coordinate.
QgsCadUtils::AlignMapPointConstraint xConstraint
Constraint for X coordinate.
double mapUnitsPerPixel
Map units/pixel ratio from map canvas. Needed for.
QgsCadUtils::AlignMapPointConstraint distanceConstraint
Constraint for distance.
QList< QgsPointXY > cadPointList
List of recent CAD points in map coordinates.
QgsCadUtils::AlignMapPointConstraint commonAngleConstraint
Constraint for soft lock to a common angle.
QgsCadUtils::AlignMapPointConstraint angleConstraint
Constraint for angle.
Structure returned from alignMapPoint() method.
QgsPointXY finalMapPoint
map point aligned according to the constraints
bool valid
Whether the combination of constraints is actually valid.
QgsPointLocator::Match snapMatch
Snapped point - only valid if actually used for something.
QgsPointLocator::Match edgeMatch
Snapped segment - only valid if actually used for something.
double softLockCommonAngle
Angle (in degrees) to which we have soft-locked ourselves (if not set it is -1)