15 #ifndef QGSRUBBERBAND_H 16 #define QGSRUBBERBAND_H 99 void setColor(
const QColor &color );
106 void setFillColor(
const QColor &color );
118 void setStrokeColor(
const QColor &color );
131 void setSecondaryStrokeColor(
const QColor &color );
142 void setWidth(
int width );
147 int width()
const {
return mPen.width(); }
164 void setIconSize(
int iconSize );
174 void setLineStyle( Qt::PenStyle penStyle );
179 void setBrushStyle( Qt::BrushStyle brushStyle );
196 void addPoint(
const QgsPointXY &p,
bool doUpdate =
true,
int geometryIndex = 0 );
205 void closePoints(
bool doUpdate =
true,
int geometryIndex = 0 );
213 void removePoint(
int index = 0,
bool doUpdate =
true,
int geometryIndex = 0 );
218 void removeLastPoint(
int geometryIndex = 0,
bool doUpdate =
true );
224 void movePoint(
const QgsPointXY &p,
int geometryIndex = 0 );
230 void movePoint(
int index,
const QgsPointXY &p,
int geometryIndex = 0 );
237 int partSize(
int geometryIndex )
const;
253 void setToCanvasRectangle( QRect rect );
283 void setTranslationOffset(
double dx,
double dy );
295 int numberOfVertices()
const;
302 const QgsPointXY *getPoint(
int i,
int j = 0 )
const;
318 void paint( QPainter *p )
override;
325 void drawShape( QPainter *p,
const QVector<QPointF> &pts );
344 QList< QList <QgsPointXY> > mPoints;
346 double mTranslationOffsetX = 0.0;
347 double mTranslationOffsetY = 0.0;
351 static QgsPolylineXY getPolyline(
const QList<QgsPointXY> &points );
A cross is used to highlight points (x)
IconType icon() const
Returns the current icon type to highlight point geometries.
A class to represent a 2D point.
An abstract class for items that can be placed on the map canvas.
A geometry is the spatial representation of a feature.
A diamond is used to highlight points (◇)
A cross is used to highlight points (+)
Map canvas is a class for displaying all GIS data types on a canvas.
int width() const
Returns the current width of the line or stroke width for polygon.
A circle is used to highlight points (○)
A class for drawing transient features (e.g.
QColor fillColor() const
Returns the current fill color.
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
QColor secondaryStrokeColor() const
Returns the current secondary stroke color.
A box is used to highlight points (□)
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
int iconSize() const
Returns the current icon size of the point icons.
This class represents a coordinate reference system (CRS).
A diamond is used to highlight points (◆)
QColor strokeColor() const
Returns the current stroke color.
Represents a vector layer which manages a vector based data sets.
virtual void updatePosition()
called on changed extent or resize event to update position of the item
A full box is used to highlight points (■)