15 #ifndef QGSRUBBERBAND_H
16 #define QGSRUBBERBAND_H
84 void setColor(
const QColor & color );
91 void setFillColor(
const QColor & color );
98 void setBorderColor(
const QColor & color );
104 void setWidth(
int width );
110 void setIcon( IconType icon );
115 void setIconSize(
int iconSize );
120 void setLineStyle( Qt::PenStyle penStyle );
125 void setBrushStyle( Qt::BrushStyle brushStyle );
140 void reset(
bool isPolygon );
150 void addPoint(
const QgsPoint & p,
bool doUpdate =
true,
int geometryIndex = 0 );
158 void removePoint(
int index = 0,
bool doUpdate =
true,
int geometryIndex = 0 );
163 void removeLastPoint(
int geometryIndex = 0,
bool doUpdate =
true );
169 void movePoint(
const QgsPoint & p,
int geometryIndex = 0 );
175 void movePoint(
int index,
const QgsPoint& p,
int geometryIndex = 0 );
182 int partSize(
int geometryIndex )
const;
198 void setToCanvasRectangle(
const QRect& rect );
218 void setTranslationOffset(
double dx,
double dy );
230 int numberOfVertices()
const;
237 const QgsPoint *getPoint(
int i,
int j = 0 )
const;
248 virtual void paint( QPainter* p )
override;
266 QList< QList <QgsPoint> > mPoints;
268 double mTranslationOffsetX;
269 double mTranslationOffsetY;
273 static QgsPolyline getPolyline(
const QList<QgsPoint> & points );