QGIS API Documentation 4.1.0-Master (3b8ef1f72a3)
Loading...
Searching...
No Matches
qgsadvanceddigitizingdockwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsadvanceddigitizingdockwidget.h - dock for CAD tools
3 ----------------------
4 begin : October 2014
5 copyright : (C) Denis Rouzaud
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSADVANCEDDIGITIZINGDOCK
17#define QGSADVANCEDDIGITIZINGDOCK
18
19#include "ui_qgsadvanceddigitizingdockwidgetbase.h"
20
21#include <memory>
22
23#include "qgis_gui.h"
24#include "qgis_sip.h"
26#include "qgsdockwidget.h"
27#include "qgsmessagebaritem.h"
28#include "qgspointlocator.h"
29#include "qgspointxy.h"
30#include "qgssnapindicator.h"
31
32#include <QList>
33#include <QQueue>
34
38class QgsMapCanvas;
39class QgsMapTool;
46
54class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private Ui::QgsAdvancedDigitizingDockWidgetBase
55{
56 Q_OBJECT
57
58 public:
71 Q_DECLARE_FLAGS( CadCapacities, CadCapacity )
72 Q_FLAG( CadCapacities )
73
74
85
86
93 class GUI_EXPORT CadConstraint
94 {
95 public:
105
113 CadConstraint( QLineEdit *lineEdit, QToolButton *lockerButton, QToolButton *relativeButton = nullptr, QToolButton *repeatingLockButton = nullptr )
114 : mLineEdit( lineEdit )
115 , mLockerButton( lockerButton )
116 , mRelativeButton( relativeButton )
117 , mRepeatingLockButton( repeatingLockButton )
118 {}
119
124 LockMode lockMode() const { return mLockMode; }
125
129 bool isLocked() const { return mLockMode != NoLock; }
130
136 bool isRepeatingLock() const { return mRepeatingLock; }
137
141 bool relative() const { return mRelative; }
142
146 double value() const { return mValue; }
147
151 QLineEdit *lineEdit() const { return mLineEdit; }
152
156 void setLockMode( LockMode mode );
157
164 void setRepeatingLock( bool repeating );
165
169 void setRelative( bool relative );
170
176 void setValue( double value, bool updateWidget = true );
177
182 QString displayValue() const;
183
187 void toggleLocked();
188
192 void toggleRelative();
193
200 int precision() const { return mPrecision; }
201
208 void setPrecision( int precision );
209
214 Qgis::CadConstraintType cadConstraintType() const;
215
220 void setCadConstraintType( Qgis::CadConstraintType constraintType );
221
226 void setMapCanvas( QgsMapCanvas *mapCanvas );
227
232 static QString removeSuffix( const QString &text, Qgis::CadConstraintType constraintType );
233
234
235 private:
236 QLineEdit *mLineEdit = nullptr;
237 QToolButton *mLockerButton = nullptr;
238 QToolButton *mRelativeButton = nullptr;
239 QToolButton *mRepeatingLockButton = nullptr;
240 LockMode mLockMode = NoLock;
241 bool mRepeatingLock = false;
242 bool mRelative = false;
243 double mValue = 0.0;
244 int mPrecision = 6;
246 QgsMapCanvas *mMapCanvas = nullptr;
247 };
248
255 explicit QgsAdvancedDigitizingDockWidget( QgsMapCanvas *canvas, QWidget *parent = nullptr, QgsUserInputWidget *userInputWidget = nullptr );
257
264 bool canvasKeyPressEventFilter( QKeyEvent *e );
265
270 bool applyConstraints( QgsMapMouseEvent *e );
271
277
281 void processCanvasPressEvent( QgsMapMouseEvent *event );
282
286 void processCanvasMoveEvent( QgsMapMouseEvent *event );
287
291 void processCanvasReleaseEvent( QgsMapMouseEvent *event );
292
297 void setTool( QgsAdvancedDigitizingTool *tool );
298
303 QgsAdvancedDigitizingTool *tool() const;
304
309 QgsAdvancedDigitizingFloater *floater() const;
310
315 void releaseLocks( bool releaseRepeatingLocks = true );
316
320 void clear();
321
322 void keyPressEvent( QKeyEvent *e ) override;
323
325 bool cadEnabled() const { return mCadEnabled; }
326
331 void switchZM();
332
337 void setEnabledZ( bool enable );
338
343 void setEnabledM( bool enable );
344
349 bool constructionMode() const { return mConstructionMode; }
350
355 QgsVectorLayer *constructionGuidesLayer() const { return mConstructionGuidesLayer.get(); }
356
361 bool showConstructionGuides() const;
362
367 bool snapToConstructionGuides() const;
368
373 bool recordConstructionGuides() const;
374
379 Qgis::BetweenLineConstraint betweenLineConstraint() const { return mBetweenLineConstraint; }
381 const CadConstraint *constraintAngle() const { return mAngleConstraint.get(); }
383 const CadConstraint *constraintDistance() const { return mDistanceConstraint.get(); }
385 const CadConstraint *constraintX() const { return mXConstraint.get(); }
387 const CadConstraint *constraintY() const { return mYConstraint.get(); }
388
393 const CadConstraint *constraintZ() const { return mZConstraint.get(); }
394
399 const CadConstraint *constraintM() const { return mMConstraint.get(); }
401 bool commonAngleConstraint() const { return !qgsDoubleNear( mCommonAngleConstraint, 0.0 ); }
402
404 const CadConstraint *constraintLineExtension() const { return mLineExtensionConstraint.get(); }
405
407 Qgis::LineExtensionSide lineExtensionSide() const { return mSoftLockLineExtension; }
408
410 const CadConstraint *constraintXyVertex() const { return mXyVertexConstraint.get(); }
411
413 double softLockX() const { return mSoftLockX; }
414
416 double softLockY() const { return mSoftLockY; }
417
422 void toggleConstraintDistance();
423
428 QgsPointLocator::Match mapPointMatch() const { return mSnapMatch; }
429
434 QList<QgsPointLocator::Match> lockedSnapVertices() const { return mLockedSnapVertices; }
435
441 void clearLockedSnapVertices( bool force = true );
442
446 void clearPoints();
447
451 void addPoint( const QgsPointXY &point );
452
457 void removePreviousPoint();
458
463 void updateCurrentPoint( const QgsPoint &point );
464
471 void setPoints( const QList<QgsPointXY> &points );
472
480 QgsPoint currentPointV2( bool *exists = nullptr ) const;
481
487 QgsPoint currentPointLayerCoordinates( QgsMapLayer *layer ) const;
488
495 Q_DECL_DEPRECATED QgsPointXY currentPoint( bool *exists = nullptr ) const SIP_DEPRECATED { return currentPointV2( exists ); };
496
502 QgsPoint previousPointV2( bool *exists = nullptr ) const;
503
510 Q_DECL_DEPRECATED QgsPointXY previousPoint( bool *exists = nullptr ) const SIP_DEPRECATED { return previousPointV2( exists ); };
511
517 QgsPoint penultimatePointV2( bool *exists = nullptr ) const;
518
525 Q_DECL_DEPRECATED QgsPointXY penultimatePoint( bool *exists = nullptr ) const SIP_DEPRECATED { return penultimatePointV2( exists ); };
526
530 inline int pointsCount() const { return mCadPointList.count(); }
531
535 inline bool snappedToVertex() const { return ( mSnapMatch.isValid() && ( mSnapMatch.hasVertex() || mSnapMatch.hasLineEndpoint() ) ); }
536
540 QList<QgsPointXY> snappedSegment() const { return mSnappedSegment; }
541
543 QAction *enableAction() { return mEnableAction; }
544
551 void enable();
552
556 void disable();
557
561 void updateCadPaintItem();
562
571 void setX( const QString &value, WidgetSetMode mode );
572
581 void setY( const QString &value, WidgetSetMode mode );
582
591 void setZ( const QString &value, WidgetSetMode mode );
592
601 void setM( const QString &value, WidgetSetMode mode );
602
611 void setAngle( const QString &value, WidgetSetMode mode );
612
621 void setDistance( const QString &value, WidgetSetMode mode );
622
627 double getLineZ() const;
628
633 double getLineM() const;
634
642 void setWeight( const QString &value, bool enabled );
643
649 QString weight() const;
650
655 CadCapacities capacities() const { return mCapacities; };
656
661 QString formatCommonAngleSnapping( double angle );
662
664
665 public slots:
666
677
678 signals:
679
685 void pushWarning( const QString &message );
686
691
699 void pointChangedV2( const QgsPoint &point );
700
708 Q_DECL_DEPRECATED void pointChanged( const QgsPointXY &point ) SIP_DEPRECATED;
709
711
719 void cadEnabledChanged( bool enabled );
720
727 void valueXChanged( const QString &value );
728
735 void valueYChanged( const QString &value );
736
743 void valueZChanged( const QString &value );
744
751 void valueMChanged( const QString &value );
752
759 void valueAngleChanged( const QString &value );
760
767 void valueDistanceChanged( const QString &value );
768
775 void valueBearingChanged( const QString &value );
776
783 void valueWeightChanged( const QString &value );
784
791 void valueAreaChanged( const QString &value );
792
799 void valueTotalLengthChanged( const QString &value );
800
807 void lockXChanged( bool locked );
808
815 void lockYChanged( bool locked );
816
823 void lockZChanged( bool locked );
824
831 void lockMChanged( bool locked );
832
839 void lockAngleChanged( bool locked );
840
847 void lockDistanceChanged( bool locked );
848
857 void relativeXChanged( bool relative );
858
867 void relativeYChanged( bool relative );
868
877 void relativeZChanged( bool relative );
878
887 void relativeMChanged( bool relative );
888
897 void relativeAngleChanged( bool relative );
898
905 void softLockLineExtensionChanged( bool locked );
906
913 void softLockXyChanged( bool locked );
914
915 // relativeDistanceChanged doesn't exist as distance is always relative
916
926 void enabledChangedX( bool enabled );
927
937 void enabledChangedY( bool enabled );
938
948 void enabledChangedZ( bool enabled );
949
959 void enabledChangedM( bool enabled );
960
970 void enabledChangedAngle( bool enabled );
971
981 void enabledChangedDistance( bool enabled );
982
991 void enabledChangedWeight( bool enabled );
992
1000
1008
1016
1024
1032
1040
1048
1054
1060
1061 private slots:
1063 void betweenLineConstraintClicked( bool activated );
1064
1066 void lockConstraint( bool activate = true );
1067
1069 void lockParameterlessConstraint( bool activate = true );
1070
1075 void constraintTextEdited( const QString &textValue );
1076
1081 void constraintFocusOut();
1082
1084 void setConstraintRelative( bool activate );
1085
1087 void setConstraintRepeatingLock( bool activate );
1088
1093 void activateCad( bool enabled );
1094
1096 void setConstructionMode( bool enabled );
1097
1099 void settingsButtonTriggered( QAction *action );
1100
1101 private:
1105 QgsMapLayer *targetLayer() const;
1106
1108 void setCadEnabled( bool enabled );
1109
1114 void updateCapacity( bool updateUIwithoutChange = false );
1115
1117 void lockBetweenLineConstraint( Qgis::BetweenLineConstraint constraint );
1118
1124 QList<QgsPointXY> snapSegmentToAllLayers( const QgsPointXY &originalMapPoint, bool *snapped = nullptr ) const;
1125
1130 bool filterKeyPress( QKeyEvent *e );
1131
1136 bool eventFilter( QObject *obj, QEvent *event ) override SIP_SKIP;
1137
1139 void triggerMouseMoveEvent();
1140
1142 CadConstraint *objectToConstraint( const QObject *obj ) const;
1143
1145 double parseUserInput( const QString &inputValue, const Qgis::CadConstraintType type, bool &ok ) const;
1146
1153 void updateConstraintValue( CadConstraint *constraint, const QString &textValue, bool convertExpression = false );
1154
1156 void updateUnlockedConstraintValues( const QgsPoint &point );
1157
1163 void toggleLockedSnapVertex( const QgsPointLocator::Match &snapMatch, const QgsPointLocator::Match &previouslySnap );
1164
1168 void resetConstructionGuides();
1169
1174 void updateConstructionGuidesCrs();
1175
1176 QgsMapCanvas *mMapCanvas = nullptr;
1177 QgsUserInputWidget *mUserInputWidget = nullptr;
1178
1179 QgsAdvancedDigitizingCanvasItem *mCadPaintItem = nullptr;
1181 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
1182
1183 CadCapacities mCapacities = CadCapacities();
1184
1185 bool mCurrentMapToolSupportsCad = false;
1186
1187 // Pointer to the floater
1188 QgsAdvancedDigitizingFloater *mFloater = nullptr;
1189
1190 // CAD properties
1192 bool mCadEnabled = false;
1193 bool mConstructionMode = false;
1194
1195 // constraints
1196 std::unique_ptr<CadConstraint> mAngleConstraint;
1197 std::unique_ptr<CadConstraint> mDistanceConstraint;
1198 std::unique_ptr<CadConstraint> mXConstraint;
1199 std::unique_ptr<CadConstraint> mYConstraint;
1200 std::unique_ptr<CadConstraint> mZConstraint;
1201 std::unique_ptr<CadConstraint> mMConstraint;
1202 std::unique_ptr<CadConstraint> mLineExtensionConstraint;
1203 std::unique_ptr<CadConstraint> mXyVertexConstraint;
1204 Qgis::BetweenLineConstraint mBetweenLineConstraint;
1205 double mCommonAngleConstraint; // if 0: do not snap to common angles
1206
1207 // Weight for NURBS curves (not a constraint, just a value)
1208 QString mWeightValue;
1209 bool mWeightEnabled = false;
1210
1212 bool mSnappingPrioritizeFeatures = false;
1213
1214 // Point list and current snap point / segment
1215 QList<QgsPoint> mCadPointList;
1216 QList<QgsPointXY> mSnappedSegment;
1217
1218 bool mSessionActive = false;
1219
1220 // Construction path history
1221 std::unique_ptr<QgsVectorLayer> mConstructionGuidesLayer;
1222 QgsFeatureId mConstructionGuideId;
1223 QgsLineString mConstructionGuideLine;
1224 bool mDeferredUpdateConstructionGuidesCrs = false;
1225
1226 // Error message
1227 std::unique_ptr<QgsMessageBarItem> mErrorMessage;
1228
1229 // UI
1230 QMap<double, QAction *> mCommonAngleActions; // map the common angle actions with their angle values
1231 QAction *mLineExtensionAction = nullptr;
1232 QAction *mXyVertexAction = nullptr;
1233 QAction *mRecordConstructionGuides = nullptr;
1234 QAction *mShowConstructionGuides = nullptr;
1235 QAction *mSnapToConstructionGuides = nullptr;
1236 QAction *mClearConstructionGuides = nullptr;
1237
1238 // Snap indicator
1239 QgsPointLocator::Match mSnapMatch;
1240 QgsPointLocator::Match mLastSnapMatch;
1241
1242 // Extra constraint context
1243 Qgis::LineExtensionSide mSoftLockLineExtension;
1244 double mSoftLockX;
1245 double mSoftLockY;
1246 QQueue<QgsPointLocator::Match> mLockedSnapVertices;
1247
1248 // Advanced digitizing tool
1249 QPointer<QgsAdvancedDigitizingTool> mCurrentTool;
1250
1251#ifdef SIP_RUN
1253 bool eventFilter( QObject *obj, QEvent *event );
1254#endif
1256 QgsPoint pointXYToPoint( const QgsPointXY &point ) const;
1257
1258 QMenu *mCommonAngleActionsMenu = nullptr;
1259 QMenu *mFloaterActionsMenu = nullptr;
1260
1261 /* Store whether the target layer supports Z and M, to avoid unnecessary checks
1262 * when floater settings are changed */
1263 bool mTargetLayerSupportsZ = false;
1264 bool mTargetLayerSupportsM = false;
1265
1266 static const QgsSettingsEntryBool *settingsCadSnappingPriorityPrioritizeFeature;
1267 static const QgsSettingsEntryBool *settingsCadRecordConstructionGuides;
1268 static const QgsSettingsEntryBool *settingsCadShowConstructionGuides;
1269 static const QgsSettingsEntryBool *settingsCadSnapToConstructionGuides;
1270
1273};
1274
1276
1277#endif // QGSADVANCEDDIGITIZINGDOCK_H
CadConstraintType
Advanced digitizing constraint type.
Definition qgis.h:4243
@ Generic
Generic value.
Definition qgis.h:4244
BetweenLineConstraint
Between line constraints which can be enabled.
Definition qgis.h:4217
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
Definition qgis.h:4230
Draws the graphical elements of the CAD tools (.
The CadConstraint is a class for all basic constraints (angle/distance/x/y).
CadConstraint(QLineEdit *lineEdit, QToolButton *lockerButton, QToolButton *relativeButton=nullptr, QToolButton *repeatingLockButton=nullptr)
Constructor for CadConstraint.
bool isLocked() const
Is any kind of lock mode enabled.
bool isRepeatingLock() const
Returns true if a repeating lock is set for the constraint.
LockMode lockMode() const
The current lock mode of this constraint.
int precision() const
Returns the numeric precision (decimal places) to show in the associated widget.
bool relative() const
Is the constraint in relative mode.
QLineEdit * lineEdit() const
The line edit that manages the value of the constraint.
A dockable widget used to handle the CAD tools on top of a selection of map tools.
static const QgsSettingsEntryDouble * settingsCadCommonAngle
void valueDistanceChanged(const QString &value)
Emitted whenever the distance value changes (either the mouse moved, or the user changed the input).
bool commonAngleConstraint() const
Returns true if a constraint on a common angle is active.
Q_DECL_DEPRECATED QgsPointXY currentPoint(bool *exists=nullptr) const
The last point.
QgsAdvancedDigitizingDockWidget(QgsMapCanvas *canvas, QWidget *parent=nullptr, QgsUserInputWidget *userInputWidget=nullptr)
Create an advanced digitizing dock widget.
void lockZChanged(bool locked)
Emitted whenever the Z parameter is locked.
double softLockY() const
Returns the Y value of the Y soft lock. The value is NaN is the constraint isn't magnetized to a line...
const CadConstraint * constraintM() const
Returns the CadConstraint on the M coordinate.
void enabledChangedY(bool enabled)
Emitted whenever the Y field is enabled or disabled.
QAction * enableAction()
Returns the action used to enable/disable the tools.
bool cadEnabled() const
determines if CAD tools are enabled or if map tools behaves "nomally"
void valueWeightChanged(const QString &value)
Emitted whenever the weight value changes for NURBS curves.
void enabledChangedWeight(bool enabled)
Emitted whenever the weight field is enabled or disabled for NURBS curves.
int pointsCount() const
The number of points in the CAD point helper list.
QList< QgsPointXY > snappedSegment() const
Snapped to a segment.
void relativeMChanged(bool relative)
Emitted whenever the M parameter is toggled between absolute and relative.
void lockXChanged(bool locked)
Emitted whenever the X parameter is locked.
void softLockLineExtensionChanged(bool locked)
Emitted whenever the soft line extension parameter is locked.
void focusOnXRequested()
Emitted whenever the X field should get the focus using the shortcuts (X).
bool constructionMode() const
Returns whether the construction mode is activated.
void enabledChangedX(bool enabled)
Emitted whenever the X field is enabled or disabled.
void valueYChanged(const QString &value)
Emitted whenever the Y value changes (either the mouse moved, or the user changed the input).
Q_DECL_DEPRECATED QgsPointXY penultimatePoint(bool *exists=nullptr) const
The penultimate point.
void valueTotalLengthChanged(const QString &value)
Emitted whenever the total length (or perimeter) value changes.
const CadConstraint * constraintLineExtension() const
Returns the CadConstraint.
void focusOnWeightRequested()
Emitted whenever the weight field should get the focus using the shortcuts (W).
void focusOnYRequested()
Emitted whenever the Y field should get the focus using the shortcuts (Y).
void enabledChangedDistance(bool enabled)
Emitted whenever the distance field is enabled or disabled.
bool snappedToVertex() const
Is it snapped to a vertex.
void valueZChanged(const QString &value)
Emitted whenever the Z value changes (either the mouse moved, or the user changed the input).
QList< QgsPointLocator::Match > lockedSnapVertices() const
Returns the snap matches whose vertices have been locked.
QgsPoint previousPointV2(bool *exists=nullptr) const
The previous point.
void lockAngleChanged(bool locked)
Emitted whenever the angle parameter is locked.
QgsPoint penultimatePointV2(bool *exists=nullptr) const
The penultimate point.
void pointChangedV2(const QgsPoint &point)
Sometimes a constraint may change the current point out of a mouse event.
void commonAngleSnappingShowInFloaterChanged(bool enabled)
Emitted whenever the option to show common angle snapping in the floater changes.
void relativeXChanged(bool relative)
Emitted whenever the X parameter is toggled between absolute and relative.
void focusOnAngleRequested()
Emitted whenever the angle field should get the focus using the shortcuts (A).
WidgetSetMode
Type of interaction to simulate when editing values from external widget.
const CadConstraint * constraintXyVertex() const
Returns the CadConstraint.
void focusOnZRequested()
Emitted whenever the Z field should get the focus using the shortcuts (Z).
void focusOnMRequested()
Emitted whenever the M field should get the focus using the shortcuts (M).
void popWarning()
Remove any previously emitted warnings (if any).
void valueXChanged(const QString &value)
Emitted whenever the X value changes (either the mouse moved, or the user changed the input).
void lockMChanged(bool locked)
Emitted whenever the M parameter is locked.
void cadEnabledChanged(bool enabled)
Signals for external widgets that need to update according to current values.
void lockYChanged(bool locked)
Emitted whenever the Y parameter is locked.
const CadConstraint * constraintY() const
Returns the CadConstraint on the Y coordinate.
void valueAngleChanged(const QString &value)
Emitted whenever the angle value changes (either the mouse moved, or the user changed the input).
void valueMChanged(const QString &value)
Emitted whenever the M value changes (either the mouse moved, or the user changed the input).
void updateTransientGeometryProperties(const QgsReferencedGeometry &geometry)
Updates properties associated with the transient geometry from the active map tool.
QgsVectorLayer * constructionGuidesLayer() const
Returns the vector layer within which construction guides are stored.
void relativeZChanged(bool relative)
Emitted whenever the Z parameter is toggled between absolute and relative.
double softLockX() const
Returns the X value of the X soft lock. The value is NaN is the constraint isn't magnetized to a line...
Q_DECL_DEPRECATED void pointChanged(const QgsPointXY &point)
Sometimes a constraint may change the current point out of a mouse event.
CadCapacity
The CadCapacity enum defines the possible constraints to be set depending on the number of points in ...
@ RelativeAngle
Also for parallel and perpendicular.
@ RelativeCoordinates
This corresponds to distance and relative coordinates.
Qgis::BetweenLineConstraint betweenLineConstraint() const
Returns the between line constraints which are used to place perpendicular/parallel segments to snapp...
void enabledChangedAngle(bool enabled)
Emitted whenever the angle field is enabled or disabled.
Q_DECL_DEPRECATED QgsPointXY previousPoint(bool *exists=nullptr) const
The previous point.
void enabledChangedZ(bool enabled)
Emitted whenever the Z field is enabled or disabled.
void lockDistanceChanged(bool locked)
Emitted whenever the distance parameter is locked.
void relativeAngleChanged(bool relative)
Emitted whenever the angleX parameter is toggled between absolute and relative.
const CadConstraint * constraintX() const
Returns the CadConstraint on the X coordinate.
CadCapacities capacities() const
Returns the capacities.
void softLockXyChanged(bool locked)
Emitted whenever the soft x/y extension parameter is locked.
const CadConstraint * constraintZ() const
Returns the CadConstraint on the Z coordinate.
void valueBearingChanged(const QString &value)
Emitted whenever the bearing value changes.
void enabledChangedM(bool enabled)
Emitted whenever the M field is enabled or disabled.
QgsPointLocator::Match mapPointMatch() const
Returns the point locator match.
QgsPoint currentPointV2(bool *exists=nullptr) const
The last point.
void focusOnDistanceRequested()
Emitted whenever the distance field should get the focus using the shortcuts (D).
void valueAreaChanged(const QString &value)
Emitted whenever the total summed area value changes.
const CadConstraint * constraintAngle() const
Returns the CadConstraint on the angle.
void valueCommonAngleSnappingChanged(double angle)
Emitted whenever the snapping to common angle option changes, angle = 0 means that the functionality ...
void pushWarning(const QString &message)
Push a warning.
Qgis::LineExtensionSide lineExtensionSide() const
Returns on which side of the constraint line extension point, the line was created.
const CadConstraint * constraintDistance() const
Returns the CadConstraint on the distance.
void relativeYChanged(bool relative)
Emitted whenever the Y parameter is toggled between absolute and relative.
A widget that floats next to the mouse pointer, and allows interaction with the AdvancedDigitizing fe...
An abstract class for advanced digitizing tools.
QgsDockWidget(QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::WindowFlags())
Constructor for QgsDockWidget.
Line string geometry type, with support for z-dimension and m-values.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Definition qgsmaplayer.h:83
A mouse event which is the result of a user interaction with a QgsMapCanvas.
A QgsMapTool which gives events directly in map coordinates and allows filtering of events.
Abstract base class for all map tools.
Definition qgsmaptool.h:73
Represents a 2D point.
Definition qgspointxy.h:62
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:53
A QgsGeometry with associated coordinate reference system.
A boolean settings entry.
A double settings entry.
A floating widget that can be used to display widgets for user inputs.
Represents a vector layer which manages a vector based dataset.
bool qgsDoubleNear(double a, double b, double epsilon=4 *std::numeric_limits< double >::epsilon())
Compare two doubles (but allow some difference).
Definition qgis.h:7077
#define SIP_DEPRECATED
Definition qgis_sip.h:113
#define SIP_ENUM_BASETYPE(type)
Definition qgis_sip.h:274
#define SIP_SKIP
Definition qgis_sip.h:133
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsProjectionSelectionWidget::CrsOptions)