QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
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. | |
virtual | ~QgsMapToolShapeAbstract () |
virtual void | activate (QgsMapToolCapture::CaptureMode mode, const QgsPoint &lastCapturedMapPoint) |
Activates the map tool with the last captured map point. | |
virtual void | cadCanvasMoveEvent (QgsMapMouseEvent *e, QgsMapToolCapture::CaptureMode mode)=0 |
Called for a mouse move event. | |
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. | |
virtual void | clean () |
Called to clean the map tool (after canceling the operation or when the digitization has finished) | |
virtual void | deactivate () |
Deactivates the map tool. | |
QString | id () const |
Returns the id of the shape tool (equivalent to the one from the metadata) | |
virtual void | keyPressEvent (QKeyEvent *e) |
Filters a key press event Ignores the event in default implementation. | |
virtual void | keyReleaseEvent (QKeyEvent *e) |
Filters a key release event Ignores the event in default implementation. | |
virtual void | undo () |
Called to undo last action (last point added) | |
Protected Attributes | |
QgsMapToolCapture * | mParentTool = nullptr |
QgsPointSequence | mPoints |
points (in map coordinates) | |
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 25 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 40 of file qgsmaptoolshapeabstract.cpp.
|
inlinevirtual |
Deactivates the map tool.
Definition at line 98 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 30 of file qgsmaptoolshapeabstract.cpp.
|
virtual |
Filters a key release event Ignores the event in default implementation.
Definition at line 35 of file qgsmaptoolshapeabstract.cpp.
|
virtual |
Called to undo last action (last point added)
Definition at line 51 of file qgsmaptoolshapeabstract.cpp.
|
protected |
Definition at line 110 of file qgsmaptoolshapeabstract.h.
|
protected |
points (in map coordinates)
Definition at line 113 of file qgsmaptoolshapeabstract.h.
|
protected |
Definition at line 115 of file qgsmaptoolshapeabstract.h.