|
| QgsRubberBand (QgsMapCanvas *mapCanvas, QgsWkbTypes::GeometryType geometryType=QgsWkbTypes::LineGeometry) |
| Creates a new RubberBand. More...
|
|
| ~QgsRubberBand () override |
|
void | addGeometry (const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), bool doUpdate=true) |
| Adds a geometry to the rubberband. More...
|
|
void | addGeometry (const QgsGeometry &geometry, QgsMapLayer *layer, bool doUpdate=true) |
| Adds the geometry of an existing feature to a rubberband This is useful for multi feature highlighting. More...
|
|
void | addPoint (const QgsPointXY &p, bool doUpdate=true, int geometryIndex=0, int ringIndex=0) |
| Adds a vertex to the rubberband and update canvas. More...
|
|
QgsGeometry | asGeometry () const |
| Returns the rubberband as a Geometry. More...
|
|
void | closePoints (bool doUpdate=true, int geometryIndex=0, int ringIndex=0) |
| Ensures that a polygon geometry is closed and that the last vertex equals the first vertex. More...
|
|
void | copyPointsFrom (const QgsRubberBand *other) |
| Copies the points from another rubber band. More...
|
|
QColor | fillColor () const |
| Returns the current fill color. More...
|
|
const QgsPointXY * | getPoint (int i, int j=0, int ringIndex=0) const |
| Returns a vertex. More...
|
|
IconType | icon () const |
| Returns the current icon type to highlight point geometries. More...
|
|
int | iconSize () const |
| Returns the current icon size of the point icons. More...
|
|
void | movePoint (const QgsPointXY &p, int geometryIndex=0, int ringIndex=0) |
| Moves the rubber band point specified by index. More...
|
|
void | movePoint (int index, const QgsPointXY &p, int geometryIndex=0, int ringIndex=0) |
| Moves the rubber band point specified by index. More...
|
|
int | numberOfVertices () const |
| Returns count of vertices in all lists of mPoint. More...
|
|
int | partSize (int geometryIndex) const |
| Returns number of vertices in feature part. More...
|
|
void | removeLastPoint (int geometryIndex=0, bool doUpdate=true, int ringIndex=0) |
| Removes the last point. More...
|
|
void | removePoint (int index=0, bool doUpdate=true, int geometryIndex=0, int ringIndex=0) |
| Removes a vertex from the rubberband and (optionally) updates canvas. More...
|
|
void | reset (QgsWkbTypes::GeometryType geometryType=QgsWkbTypes::LineGeometry) |
| Clears all the geometries in this rubberband. More...
|
|
QColor | secondaryStrokeColor () const |
| Returns the current secondary stroke color. More...
|
|
void | setBrushStyle (Qt::BrushStyle brushStyle) |
| Sets the style of the brush. More...
|
|
void | setColor (const QColor &color) |
| Sets the color for the rubberband. More...
|
|
void | setFillColor (const QColor &color) |
| Sets the fill color for the rubberband. More...
|
|
void | setIcon (IconType icon) |
| Sets the icon type to highlight point geometries. More...
|
|
void | setIconSize (int iconSize) |
| Sets the size of the point icons. More...
|
|
void | setLineStyle (Qt::PenStyle penStyle) |
| Sets the style of the line. More...
|
|
void | setSecondaryStrokeColor (const QColor &color) |
| Sets a secondary stroke color for the rubberband which will be drawn under the main stroke color. More...
|
|
void | setStrokeColor (const QColor &color) |
| Sets the stroke color for the rubberband. More...
|
|
void | setSvgIcon (const QString &path, QPoint drawOffset) |
| Set the path to the svg file to use to draw points. More...
|
|
void | setSymbol (QgsSymbol *symbol) |
| Sets the symbol used for rendering the rubberband. More...
|
|
void | setToCanvasRectangle (QRect rect) |
| Sets this rubber band to a map canvas rectangle. More...
|
|
void | setToGeometry (const QgsGeometry &geom, QgsVectorLayer *layer) |
| Sets this rubber band to geom. More...
|
|
void | setToGeometry (const QgsGeometry &geometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem()) |
| Sets this rubber band to geometry. More...
|
|
void | setTranslationOffset (double dx, double dy) |
| Adds translation to original coordinates (all in map coordinates) More...
|
|
void | setWidth (int width) |
| Sets the width of the line. More...
|
|
int | size () const |
| Returns number of geometries. More...
|
|
QColor | strokeColor () const |
| Returns the current stroke color. More...
|
|
QgsSymbol * | symbol () const |
| Returns the symbol used for rendering the rubberband, if set. More...
|
|
void | updatePosition () override |
| called on changed extent or resize event to update position of the item More...
|
|
int | width () const |
| Returns the current width of the line or stroke width for polygon. More...
|
|
QRectF | boundingRect () const override |
|
QgsRectangle | rect () const |
| returns canvas item rectangle in map units More...
|
|
void | setRect (const QgsRectangle &r, bool resetRotation=true) |
| sets canvas item rectangle in map units More...
|
|
QPointF | toCanvasCoordinates (const QgsPointXY &point) const |
| transformation from map coordinates to screen coordinates More...
|
|
QgsPointXY | toMapCoordinates (QPoint point) const |
| transformation from screen coordinates to map coordinates More...
|
|
virtual void | updatePosition () |
| called on changed extent or resize event to update position of the item More...
|
|