20 #include "qgis_core.h" 
   50           , relative( relative )
 
  144         QList< QgsPoint > 
cadPoints()
 const { 
return mCadPointList; } ;
 
  152         void setCadPoints( 
const QList< QgsPoint> &points ) { mCadPointList = points; };
 
  172         SIP_PROPERTY( name = cadPointList, get = _cadPointList, set = _setCadPointList )
 
  175         void _setCadPointList( 
const QList< QgsPointXY > &list ) { mCadPointList.clear(); 
for ( 
const auto &pointxy : list ) { mCadPointList.append( 
QgsPoint( pointxy ) );} }
 
  176         QList< QgsPointXY > _cadPointList()
 const { QList< QgsPointXY> list; 
for ( 
const auto &point : mCadPointList ) { list.append( 
QgsPointXY( point.x(), point.y() ) ); }; 
return list; }
 
  186         QList<QgsPoint> mCadPointList;
 
Structure with details of one constraint.
AlignMapPointConstraint(bool locked=false, bool relative=false, double value=0)
Constructor for AlignMapPointConstraint.
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.
Defines constraints for the QgsCadUtils::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.
void setCadPoints(const QList< QgsPoint > &points)
Sets the list of recent CAD points (in map coordinates).
QgsCadUtils::AlignMapPointConstraint mConstraint
Constraint for M coordinate.
QgsPoint cadPoint(int index) const
Returns the recent CAD point at the specified index (in map coordinates).
void setCadPoint(int index, const QgsPoint &point)
Sets the recent CAD point at the specified index to point (in map coordinates).
QgsCadUtils::AlignMapPointConstraint distanceConstraint
Constraint for distance.
QgsCadUtils::AlignMapPointConstraint zConstraint
Constraint for Z coordinate.
QgsCadUtils::AlignMapPointConstraint commonAngleConstraint
Constraint for soft lock to a common angle.
QList< QgsPoint > cadPoints() const
Returns the list of recent CAD points in map coordinates.
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)
The QgsCadUtils class provides routines for CAD editing.
A class to represent a 2D point.
Point geometry type, with support for z-dimension and m-values.
This class has all the configuration of snapping and can return answers to snapping queries.
#define SIP_PROPERTY(name, getter, setter)