QgsGeometryRubberBand class
A rubberband class for QgsAbstractGeometry (considering curved geometries)
Contents
Base classes
- class QgsMapCanvasItem
- An abstract class for items that can be placed on the map canvas.
Public types
- enum IconType { ICON_NONE, ICON_CROSS, ICON_X, ICON_BOX, ICON_CIRCLE, ICON_FULL_BOX }
Public functions
- auto geometry() -> const QgsAbstractGeometry*
- Returns a pointer to the geometry.
- void moveVertex(QgsVertexId id, const QgsPoint& newPos)
- Moves vertex to new position (in map coordinates)
- void setBrushStyle(Qt::BrushStyle brushStyle)
- Sets brush style.
- void setFillColor(const QColor& c)
- Sets fill color for vertex markers.
- void setGeometry(QgsAbstractGeometry* geom)
- Sets geometry (takes ownership). Geometry is expected to be in map coordinates.
- void setIconType(IconType iconType)
- Sets vertex marker icon type.
- void setLineStyle(Qt::PenStyle penStyle)
- Sets pen style.
- void setStrokeColor(const QColor& c)
- Sets stroke color for vertex markers.
- void setStrokeWidth(int width)
- Sets stroke width.
Protected functions
- void paint(QPainter* painter) override
- function to be implemented by derived classes
Enum documentation
enum QgsGeometryRubberBand:: IconType
| Enumerators | |
|---|---|
| ICON_NONE |
No icon is used. |
| ICON_CROSS |
A cross is used to highlight points (+) |
| ICON_X |
A cross is used to highlight points (x) |
| ICON_BOX |
A box is used to highlight points (□) |
| ICON_CIRCLE |
A circle is used to highlight points (○) |
| ICON_FULL_BOX |
A full box is used to highlight points (■) |