@@ -54,17 +54,56 @@ class GUI_EXPORT QgsMapToolAdvancedDigitizing : public QgsMapToolEdit
54
54
// ! catch the mouse move event, filters it, transforms it to map coordinates and send it to virtual method
55
55
void canvasMoveEvent ( QgsMapMouseEvent* e ) override ;
56
56
57
+ /* *
58
+ * The capture mode
59
+ *
60
+ * @return Capture mode
61
+ */
57
62
CaptureMode mode () const { return mCaptureMode ; }
58
63
64
+ /* *
65
+ * Registers this maptool with the cad dock widget
66
+ */
59
67
void activate ();
60
68
69
+ /* *
70
+ * Unregisters this maptool from the cad dock widget
71
+ */
61
72
void deactivate ();
62
73
63
74
QgsAdvancedDigitizingDockWidget* cadDockWidget () const { return mCadDockWidget ; }
64
75
65
76
protected:
77
+ /* *
78
+ * Override this method when subclassing this class.
79
+ * This will receive adapted events from the cad system whenever a
80
+ * canvasPressEvent is triggered and it's not hidden by the cad's
81
+ * construction mode.
82
+ *
83
+ * @param e Mouse events prepared by the cad system
84
+ */
66
85
virtual void cadCanvasPressEvent ( QgsMapMouseEvent* e ) { Q_UNUSED ( e ) }
86
+
87
+
88
+ /* *
89
+ * Override this method when subclassing this class.
90
+ * This will receive adapted events from the cad system whenever a
91
+ * canvasReleaseEvent is triggered and it's not hidden by the cad's
92
+ * construction mode.
93
+ *
94
+ * @param e Mouse events prepared by the cad system
95
+ */
67
96
virtual void cadCanvasReleaseEvent ( QgsMapMouseEvent* e ) { Q_UNUSED ( e ) }
97
+
98
+
99
+ /* *
100
+ * Override this method when subclassing this class.
101
+ * This will receive adapted events from the cad system whenever a
102
+ * canvasMoveEvent is triggered and it's not hidden by the cad's
103
+ * construction mode.
104
+ *
105
+ * @param e Mouse events prepared by the cad system
106
+ */
68
107
virtual void cadCanvasMoveEvent ( QgsMapMouseEvent* e ) { Q_UNUSED ( e ) }
69
108
70
109
CaptureMode mCaptureMode ;
@@ -75,6 +114,14 @@ class GUI_EXPORT QgsMapToolAdvancedDigitizing : public QgsMapToolEdit
75
114
bool mSnapOnDoubleClick ;
76
115
77
116
private slots:
117
+ /* *
118
+ * Is to be called by the cad system whenever a point changes outside of a
119
+ * mouse event. E.g. when additional constraints are triggered.
120
+ * The specified point will be used to generate a fake mouse event which will
121
+ * be sent as move event to cadCanvasMoveEvent.
122
+ *
123
+ * @param point The last point known to the cad system.
124
+ */
78
125
void cadPointChanged ( const QgsPoint& point );
79
126
80
127
private:
0 commit comments