QGIS API Documentation 3.99.0-Master (1d785854362)
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;
44
52class GUI_EXPORT QgsAdvancedDigitizingDockWidget : public QgsDockWidget, private Ui::QgsAdvancedDigitizingDockWidgetBase
53{
54 Q_OBJECT
55
56 public:
69 Q_DECLARE_FLAGS( CadCapacities, CadCapacity )
70 Q_FLAG( CadCapacities )
71
72
83
84
91 class GUI_EXPORT CadConstraint
92 {
93 public:
103
111 CadConstraint( QLineEdit *lineEdit, QToolButton *lockerButton, QToolButton *relativeButton = nullptr, QToolButton *repeatingLockButton = nullptr )
112 : mLineEdit( lineEdit )
113 , mLockerButton( lockerButton )
114 , mRelativeButton( relativeButton )
115 , mRepeatingLockButton( repeatingLockButton )
116 {}
117
122 LockMode lockMode() const { return mLockMode; }
123
127 bool isLocked() const { return mLockMode != NoLock; }
128
134 bool isRepeatingLock() const { return mRepeatingLock; }
135
139 bool relative() const { return mRelative; }
140
144 double value() const { return mValue; }
145
149 QLineEdit *lineEdit() const { return mLineEdit; }
150
154 void setLockMode( LockMode mode );
155
162 void setRepeatingLock( bool repeating );
163
167 void setRelative( bool relative );
168
174 void setValue( double value, bool updateWidget = true );
175
180 QString displayValue() const;
181
185 void toggleLocked();
186
190 void toggleRelative();
191
198 int precision() const { return mPrecision; }
199
206 void setPrecision( int precision );
207
212 Qgis::CadConstraintType cadConstraintType() const;
213
218 void setCadConstraintType( Qgis::CadConstraintType constraintType );
219
224 void setMapCanvas( QgsMapCanvas *mapCanvas );
225
230 static QString removeSuffix( const QString &text, Qgis::CadConstraintType constraintType );
231
232
233 private:
234 QLineEdit *mLineEdit = nullptr;
235 QToolButton *mLockerButton = nullptr;
236 QToolButton *mRelativeButton = nullptr;
237 QToolButton *mRepeatingLockButton = nullptr;
238 LockMode mLockMode = NoLock;
239 bool mRepeatingLock = false;
240 bool mRelative = false;
241 double mValue = 0.0;
242 int mPrecision = 6;
244 QgsMapCanvas *mMapCanvas = nullptr;
245 };
246
253 explicit QgsAdvancedDigitizingDockWidget( QgsMapCanvas *canvas, QWidget *parent = nullptr, QgsUserInputWidget *userInputWidget = nullptr );
255
262 bool canvasKeyPressEventFilter( QKeyEvent *e );
263
268 bool applyConstraints( QgsMapMouseEvent *e );
269
275
279 void processCanvasPressEvent( QgsMapMouseEvent *event );
280
284 void processCanvasMoveEvent( QgsMapMouseEvent *event );
285
289 void processCanvasReleaseEvent( QgsMapMouseEvent *event );
290
295 void setTool( QgsAdvancedDigitizingTool *tool );
296
301 QgsAdvancedDigitizingTool *tool() const;
302
307 QgsAdvancedDigitizingFloater *floater() const;
308
313 void releaseLocks( bool releaseRepeatingLocks = true );
314
318 void clear();
319
320 void keyPressEvent( QKeyEvent *e ) override;
321
323 bool cadEnabled() const { return mCadEnabled; }
324
329 void switchZM();
330
335 void setEnabledZ( bool enable );
336
341 void setEnabledM( bool enable );
342
347 bool constructionMode() const { return mConstructionMode; }
348
353 QgsVectorLayer *constructionGuidesLayer() const { return mConstructionGuidesLayer.get(); }
354
359 bool showConstructionGuides() const;
360
365 bool snapToConstructionGuides() const;
366
371 bool recordConstructionGuides() const;
372
377 Qgis::BetweenLineConstraint betweenLineConstraint() const { return mBetweenLineConstraint; }
379 const CadConstraint *constraintAngle() const { return mAngleConstraint.get(); }
381 const CadConstraint *constraintDistance() const { return mDistanceConstraint.get(); }
383 const CadConstraint *constraintX() const { return mXConstraint.get(); }
385 const CadConstraint *constraintY() const { return mYConstraint.get(); }
386
391 const CadConstraint *constraintZ() const { return mZConstraint.get(); }
392
397 const CadConstraint *constraintM() const { return mMConstraint.get(); }
399 bool commonAngleConstraint() const { return !qgsDoubleNear( mCommonAngleConstraint, 0.0 ); }
400
402 const CadConstraint *constraintLineExtension() const { return mLineExtensionConstraint.get(); }
403
405 Qgis::LineExtensionSide lineExtensionSide() const { return mSoftLockLineExtension; }
406
408 const CadConstraint *constraintXyVertex() const { return mXyVertexConstraint.get(); }
409
411 double softLockX() const { return mSoftLockX; }
412
414 double softLockY() const { return mSoftLockY; }
415
420 void toggleConstraintDistance();
421
426 QgsPointLocator::Match mapPointMatch() const { return mSnapMatch; }
427
432 QList<QgsPointLocator::Match> lockedSnapVertices() const { return mLockedSnapVertices; }
433
439 void clearLockedSnapVertices( bool force = true );
440
444 void clearPoints();
445
449 void addPoint( const QgsPointXY &point );
450
455 void removePreviousPoint();
456
461 void updateCurrentPoint( const QgsPoint &point );
462
469 void setPoints( const QList<QgsPointXY> &points );
470
478 QgsPoint currentPointV2( bool *exists = nullptr ) const;
479
485 QgsPoint currentPointLayerCoordinates( QgsMapLayer *layer ) const;
486
493 Q_DECL_DEPRECATED QgsPointXY currentPoint( bool *exists = nullptr ) const SIP_DEPRECATED { return currentPointV2( exists ); };
494
500 QgsPoint previousPointV2( bool *exists = nullptr ) const;
501
508 Q_DECL_DEPRECATED QgsPointXY previousPoint( bool *exists = nullptr ) const SIP_DEPRECATED { return previousPointV2( exists ); };
509
515 QgsPoint penultimatePointV2( bool *exists = nullptr ) const;
516
523 Q_DECL_DEPRECATED QgsPointXY penultimatePoint( bool *exists = nullptr ) const SIP_DEPRECATED { return penultimatePointV2( exists ); };
524
528 inline int pointsCount() const { return mCadPointList.count(); }
529
533 inline bool snappedToVertex() const { return ( mSnapMatch.isValid() && ( mSnapMatch.hasVertex() || mSnapMatch.hasLineEndpoint() ) ); }
534
538 QList<QgsPointXY> snappedSegment() const { return mSnappedSegment; }
539
541 QAction *enableAction() { return mEnableAction; }
542
549 void enable();
550
554 void disable();
555
559 void updateCadPaintItem();
560
569 void setX( const QString &value, WidgetSetMode mode );
570
579 void setY( const QString &value, WidgetSetMode mode );
580
589 void setZ( const QString &value, WidgetSetMode mode );
590
599 void setM( const QString &value, WidgetSetMode mode );
600
609 void setAngle( const QString &value, WidgetSetMode mode );
610
619 void setDistance( const QString &value, WidgetSetMode mode );
620
625 double getLineZ() const;
626
631 double getLineM() const;
632
640 void setWeight( const QString &value, bool enabled );
641
647 QString weight() const;
648
653 CadCapacities capacities() const { return mCapacities; };
654
659 QString formatCommonAngleSnapping( double angle );
660
661 public slots:
662
672 void updateTransientGeometryProperties( const QgsReferencedGeometry &geometry ) SIP_SKIP;
673
674 signals:
675
681 void pushWarning( const QString &message );
682
687
695 void pointChangedV2( const QgsPoint &point );
696
704 Q_DECL_DEPRECATED void pointChanged( const QgsPointXY &point ) SIP_DEPRECATED;
705
707
715 void cadEnabledChanged( bool enabled );
716
723 void valueXChanged( const QString &value );
724
731 void valueYChanged( const QString &value );
732
739 void valueZChanged( const QString &value );
740
747 void valueMChanged( const QString &value );
748
755 void valueAngleChanged( const QString &value );
756
763 void valueDistanceChanged( const QString &value );
764
771 void valueBearingChanged( const QString &value );
772
779 void valueWeightChanged( const QString &value );
780
787 void valueAreaChanged( const QString &value );
788
795 void valueTotalLengthChanged( const QString &value );
796
803 void lockXChanged( bool locked );
804
811 void lockYChanged( bool locked );
812
819 void lockZChanged( bool locked );
820
827 void lockMChanged( bool locked );
828
835 void lockAngleChanged( bool locked );
836
843 void lockDistanceChanged( bool locked );
844
853 void relativeXChanged( bool relative );
854
863 void relativeYChanged( bool relative );
864
873 void relativeZChanged( bool relative );
874
883 void relativeMChanged( bool relative );
884
893 void relativeAngleChanged( bool relative );
894
901 void softLockLineExtensionChanged( bool locked );
902
909 void softLockXyChanged( bool locked );
910
911 // relativeDistanceChanged doesn't exist as distance is always relative
912
922 void enabledChangedX( bool enabled );
923
933 void enabledChangedY( bool enabled );
934
944 void enabledChangedZ( bool enabled );
945
955 void enabledChangedM( bool enabled );
956
966 void enabledChangedAngle( bool enabled );
967
977 void enabledChangedDistance( bool enabled );
978
987 void enabledChangedWeight( bool enabled );
988
996
1004
1012
1020
1028
1036
1044
1050
1056
1057 private slots:
1059 void betweenLineConstraintClicked( bool activated );
1060
1062 void lockConstraint( bool activate = true );
1063
1065 void lockParameterlessConstraint( bool activate = true );
1066
1071 void constraintTextEdited( const QString &textValue );
1072
1077 void constraintFocusOut();
1078
1080 void setConstraintRelative( bool activate );
1081
1083 void setConstraintRepeatingLock( bool activate );
1084
1089 void activateCad( bool enabled );
1090
1092 void setConstructionMode( bool enabled );
1093
1095 void settingsButtonTriggered( QAction *action );
1096
1097 private:
1101 QgsMapLayer *targetLayer() const;
1102
1104 void setCadEnabled( bool enabled );
1105
1110 void updateCapacity( bool updateUIwithoutChange = false );
1111
1113 void lockBetweenLineConstraint( Qgis::BetweenLineConstraint constraint );
1114
1120 QList<QgsPointXY> snapSegmentToAllLayers( const QgsPointXY &originalMapPoint, bool *snapped = nullptr ) const;
1121
1126 bool filterKeyPress( QKeyEvent *e );
1127
1132 bool eventFilter( QObject *obj, QEvent *event ) override SIP_SKIP;
1133
1135 void triggerMouseMoveEvent();
1136
1138 CadConstraint *objectToConstraint( const QObject *obj ) const;
1139
1141 double parseUserInput( const QString &inputValue, const Qgis::CadConstraintType type, bool &ok ) const;
1142
1149 void updateConstraintValue( CadConstraint *constraint, const QString &textValue, bool convertExpression = false );
1150
1152 void updateUnlockedConstraintValues( const QgsPoint &point );
1153
1159 void toggleLockedSnapVertex( const QgsPointLocator::Match &snapMatch, const QgsPointLocator::Match &previouslySnap );
1160
1164 void resetConstructionGuides();
1165
1170 void updateConstructionGuidesCrs();
1171
1172 QgsMapCanvas *mMapCanvas = nullptr;
1173 QgsUserInputWidget *mUserInputWidget = nullptr;
1174
1175 QgsAdvancedDigitizingCanvasItem *mCadPaintItem = nullptr;
1177 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
1178
1179 CadCapacities mCapacities = CadCapacities();
1180
1181 bool mCurrentMapToolSupportsCad = false;
1182
1183 // Pointer to the floater
1184 QgsAdvancedDigitizingFloater *mFloater = nullptr;
1185
1186 // CAD properties
1188 bool mCadEnabled = false;
1189 bool mConstructionMode = false;
1190
1191 // constraints
1192 std::unique_ptr<CadConstraint> mAngleConstraint;
1193 std::unique_ptr<CadConstraint> mDistanceConstraint;
1194 std::unique_ptr<CadConstraint> mXConstraint;
1195 std::unique_ptr<CadConstraint> mYConstraint;
1196 std::unique_ptr<CadConstraint> mZConstraint;
1197 std::unique_ptr<CadConstraint> mMConstraint;
1198 std::unique_ptr<CadConstraint> mLineExtensionConstraint;
1199 std::unique_ptr<CadConstraint> mXyVertexConstraint;
1200 Qgis::BetweenLineConstraint mBetweenLineConstraint;
1201 double mCommonAngleConstraint; // if 0: do not snap to common angles
1202
1203 // Weight for NURBS curves (not a constraint, just a value)
1204 QString mWeightValue;
1205 bool mWeightEnabled = false;
1206
1208 bool mSnappingPrioritizeFeatures = false;
1209
1210 // Point list and current snap point / segment
1211 QList<QgsPoint> mCadPointList;
1212 QList<QgsPointXY> mSnappedSegment;
1213
1214 bool mSessionActive = false;
1215
1216 // Construction path history
1217 std::unique_ptr<QgsVectorLayer> mConstructionGuidesLayer;
1218 QgsFeatureId mConstructionGuideId;
1219 QgsLineString mConstructionGuideLine;
1220 bool mDeferredUpdateConstructionGuidesCrs = false;
1221
1222 // Error message
1223 std::unique_ptr<QgsMessageBarItem> mErrorMessage;
1224
1225 // UI
1226 QMap<double, QAction *> mCommonAngleActions; // map the common angle actions with their angle values
1227 QAction *mLineExtensionAction = nullptr;
1228 QAction *mXyVertexAction = nullptr;
1229 QAction *mRecordConstructionGuides = nullptr;
1230 QAction *mShowConstructionGuides = nullptr;
1231 QAction *mSnapToConstructionGuides = nullptr;
1232 QAction *mClearConstructionGuides = nullptr;
1233
1234 // Snap indicator
1235 QgsPointLocator::Match mSnapMatch;
1236 QgsPointLocator::Match mLastSnapMatch;
1237
1238 // Extra constraint context
1239 Qgis::LineExtensionSide mSoftLockLineExtension;
1240 double mSoftLockX;
1241 double mSoftLockY;
1242 QQueue<QgsPointLocator::Match> mLockedSnapVertices;
1243
1244 // Advanced digitizing tool
1245 QPointer<QgsAdvancedDigitizingTool> mCurrentTool;
1246
1247#ifdef SIP_RUN
1249 bool eventFilter( QObject *obj, QEvent *event );
1250#endif
1252 QgsPoint pointXYToPoint( const QgsPointXY &point ) const;
1253
1254 QMenu *mCommonAngleActionsMenu = nullptr;
1255 QMenu *mFloaterActionsMenu = nullptr;
1256
1257 /* Store whether the target layer supports Z and M, to avoid unnecessary checks
1258 * when floater settings are changed */
1259 bool mTargetLayerSupportsZ = false;
1260 bool mTargetLayerSupportsM = false;
1261
1262 static const QgsSettingsEntryBool *settingsCadSnappingPriorityPrioritizeFeature;
1263 static const QgsSettingsEntryBool *settingsCadRecordConstructionGuides;
1264 static const QgsSettingsEntryBool *settingsCadShowConstructionGuides;
1265 static const QgsSettingsEntryBool *settingsCadSnapToConstructionGuides;
1266
1269};
1270
1272
1273#endif // QGSADVANCEDDIGITIZINGDOCK_H
CadConstraintType
Advanced digitizing constraint type.
Definition qgis.h:4145
@ Generic
Generic value.
Definition qgis.h:4146
BetweenLineConstraint
Between line constraints which can be enabled.
Definition qgis.h:4119
LineExtensionSide
Designates whether the line extension constraint is currently soft locked with the previous or next v...
Definition qgis.h:4132
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.
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).
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:72
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 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:6935
#define SIP_DEPRECATED
Definition qgis_sip.h:114
#define SIP_ENUM_BASETYPE(type)
Definition qgis_sip.h:275
#define SIP_SKIP
Definition qgis_sip.h:134
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsProjectionSelectionWidget::CrsOptions)