QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
QgsMapToolShapeAbstract is a base class for shape map tools to be used by QgsMapToolCapture. More...
#include <qgsmaptoolshapeabstract.h>
Public Types | |
enum class | ShapeCategory { Curve , Circle , Ellipse , Rectangle , RegularPolygon } |
List of different shapes. More... | |
Public Member Functions | |
QgsMapToolShapeAbstract (const QString &id, QgsMapToolCapture *parentTool) | |
Constructor. More... | |
virtual | ~QgsMapToolShapeAbstract () |
virtual void | activate (QgsMapToolCapture::CaptureMode mode, const QgsPoint &lastCapturedMapPoint) |
Activates the map tool with the last captured map point. More... | |
virtual void | cadCanvasMoveEvent (QgsMapMouseEvent *e, QgsMapToolCapture::CaptureMode mode)=0 |
Called for a mouse move event. More... | |
virtual bool | cadCanvasReleaseEvent (QgsMapMouseEvent *e, QgsMapToolCapture::CaptureMode mode)=0 |
Called for a mouse release event Must return true if the digitization has ended and the geometry is correctly set. More... | |
virtual void | clean () |
Called to clean the map tool (after canceling the operation or when the digitization has finished) More... | |
virtual void | deactivate () |
Deactivates the map tool. More... | |
QString | id () const |
Returns the id of the shape tool (equivalent to the one from the metadata) More... | |
virtual void | keyPressEvent (QKeyEvent *e) |
Filters a key press event Ignores the event in default implementation. More... | |
virtual void | keyReleaseEvent (QKeyEvent *e) |
Filters a key release event Ignores the event in default implementation. More... | |
virtual void | undo () |
Called to undo last action (last point added) More... | |
Protected Attributes | |
QgsMapToolCapture * | mParentTool = nullptr |
QgsPointSequence | mPoints |
points (in map coordinates) More... | |
QgsGeometryRubberBand * | mTempRubberBand = nullptr |
QgsMapToolShapeAbstract is a base class for shape map tools to be used by QgsMapToolCapture.
Definition at line 40 of file qgsmaptoolshapeabstract.h.
|
strong |
List of different shapes.
Enumerator | |
---|---|
Curve | Curve. |
Circle | Circle. |
Ellipse | Ellipse. |
Rectangle | Rectangle. |
RegularPolygon | RegularPolygon (e.g pentagons or hexagons) |
Definition at line 46 of file qgsmaptoolshapeabstract.h.
|
inline |
Constructor.
Definition at line 57 of file qgsmaptoolshapeabstract.h.
|
virtual |
Definition at line 24 of file qgsmaptoolshapeabstract.cpp.
|
inlinevirtual |
Activates the map tool with the last captured map point.
Definition at line 91 of file qgsmaptoolshapeabstract.h.
|
pure virtual |
Called for a mouse move event.
|
pure virtual |
Called for a mouse release event Must return true
if the digitization has ended and the geometry is correctly set.
|
virtual |
Called to clean the map tool (after canceling the operation or when the digitization has finished)
Definition at line 39 of file qgsmaptoolshapeabstract.cpp.
|
inlinevirtual |
Deactivates the map tool.
Definition at line 94 of file qgsmaptoolshapeabstract.h.
|
inline |
Returns the id of the shape tool (equivalent to the one from the metadata)
Definition at line 67 of file qgsmaptoolshapeabstract.h.
|
virtual |
Filters a key press event Ignores the event in default implementation.
Definition at line 29 of file qgsmaptoolshapeabstract.cpp.
|
virtual |
Filters a key release event Ignores the event in default implementation.
Definition at line 34 of file qgsmaptoolshapeabstract.cpp.
|
virtual |
Called to undo last action (last point added)
Definition at line 50 of file qgsmaptoolshapeabstract.cpp.
|
protected |
Definition at line 106 of file qgsmaptoolshapeabstract.h.
|
protected |
points (in map coordinates)
Definition at line 109 of file qgsmaptoolshapeabstract.h.
|
protected |
Definition at line 111 of file qgsmaptoolshapeabstract.h.