16 #ifndef QGSADVANCEDDIGITIZINGDOCK
17 #define QGSADVANCEDDIGITIZINGDOCK
19 #include <QDockWidget>
24 #include <ui_qgsadvanceddigitizingdockwidgetbase.h>
47 Q_FLAGS( CadCapacities )
60 RelativeCoordinates = 4,
62 Q_DECLARE_FLAGS( CadCapacities, CadCapacity )
93 : mLineEdit( lineEdit )
94 , mLockerButton( lockerButton )
95 , mRelativeButton( relativeButton )
109 bool isLocked()
const {
return mLockMode != NoLock; }
117 double value()
const {
return mValue; }
127 void setLockMode( LockMode mode );
132 void setRelative(
bool relative );
137 void setValue(
double value );
147 void toggleRelative();
202 bool canvasKeyPressEventFilter(
QKeyEvent *e );
220 void keyPressEvent(
QKeyEvent* e )
override;
246 QgsPoint currentPoint(
bool* exists = 0 )
const;
253 QgsPoint previousPoint(
bool* exists = 0 )
const;
260 QgsPoint penultimatePoint(
bool* exists = 0 )
const;
299 void pushWarning(
const QString& message );
312 void pointChanged(
const QgsPoint& point );
316 void addtionalConstraintClicked(
bool activated );
319 void lockConstraint(
bool activate =
true );
325 void setConstraintRelative(
bool activate );
329 void activateCad(
bool enabled );
332 void setConstructionMode(
bool enabled );
335 void settingsButtonTriggered(
QAction* action );
339 void setCadEnabled(
bool enabled );
345 void updateCapacity(
bool updateUIwithoutChange =
false );
348 void lockAdditionalConstraint( AdditionalConstraint constraint );
354 bool alignToSegment(
QgsMapMouseEvent* e, CadConstraint::LockMode lockMode = CadConstraint::HardLock );
357 void addPoint(
const QgsPoint& point );
359 void updateCurrentPoint(
const QgsPoint& point );
361 void removePreviousPoint();
373 void triggerMouseMoveEvent();
380 CadCapacities mCapacities;
382 bool mCurrentMapToolSupportsCad;
387 bool mConstructionMode;
391 CadConstraint* mAngleConstraint;
392 CadConstraint* mDistanceConstraint;
393 CadConstraint* mXConstraint;
394 CadConstraint* mYConstraint;
395 AdditionalConstraint mAdditionalConstraint;
396 int mCommonAngleConstraint;
401 bool mSnappedToVertex;
414 Q_DECLARE_OPERATORS_FOR_FLAGS( QgsAdvancedDigitizingDockWidget::CadCapacities )
416 #endif // QGSADVANCEDDIGITIZINGDOCK_H
A QgsMapMouseEvent is the result of a user interaction with the mouse on a QgsMapCanvas.
Map canvas is a class for displaying all GIS data types on a canvas.
A class to represent a point.
The QgsAdvancedDigitizingCanvasItem class draws the graphical elements of the CAD tools (...