15 #ifndef QGSRUBBERBAND_H 16 #define QGSRUBBERBAND_H 53 if ( dynamic_cast<QgsRubberBand *>( sipCpp ) )
54 sipType = sipType_QgsRubberBand;
61 Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
62 Q_PROPERTY( QColor strokeColor READ strokeColor WRITE setStrokeColor )
63 Q_PROPERTY(
int iconSize READ iconSize WRITE setIconSize )
64 Q_PROPERTY( QColor secondaryStrokeColor READ secondaryStrokeColor WRITE setSecondaryStrokeColor )
65 Q_PROPERTY(
int width READ width WRITE setWidth )
129 void setColor(
const QColor &color );
136 void setFillColor(
const QColor &color );
148 void setStrokeColor(
const QColor &color );
161 void setSecondaryStrokeColor(
const QColor &color );
172 void setWidth(
int width );
177 int width()
const {
return mPen.width(); }
194 void setIconSize(
int iconSize );
204 void setLineStyle( Qt::PenStyle penStyle );
209 void setBrushStyle( Qt::BrushStyle brushStyle );
226 void addPoint(
const QgsPointXY &p,
bool doUpdate =
true,
int geometryIndex = 0 );
235 void closePoints(
bool doUpdate =
true,
int geometryIndex = 0 );
243 void removePoint(
int index = 0,
bool doUpdate =
true,
int geometryIndex = 0 );
248 void removeLastPoint(
int geometryIndex = 0,
bool doUpdate =
true );
254 void movePoint(
const QgsPointXY &p,
int geometryIndex = 0 );
260 void movePoint(
int index,
const QgsPointXY &p,
int geometryIndex = 0 );
267 int partSize(
int geometryIndex )
const;
294 void setToCanvasRectangle( QRect rect );
324 void setTranslationOffset(
double dx,
double dy );
336 int numberOfVertices()
const;
343 const QgsPointXY *getPoint(
int i,
int j = 0 )
const;
359 void paint( QPainter *p )
override;
366 void drawShape( QPainter *p,
const QVector<QPointF> &pts );
385 QList< QList <QgsPointXY> > mPoints;
387 double mTranslationOffsetX = 0.0;
388 double mTranslationOffsetY = 0.0;
392 static QgsPolylineXY getPolyline(
const QList<QgsPointXY> &points );
A cross is used to highlight points (x)
A class to represent a 2D point.
QColor fillColor() const
Returns the current fill color.
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 (◇)
const QgsCoordinateReferenceSystem & crs
A cross is used to highlight points (+)
Map canvas is a class for displaying all GIS data types on a canvas.
QColor secondaryStrokeColor() const
Returns the current secondary stroke color.
IconType icon() const
Returns the current icon type to highlight point geometries.
A circle is used to highlight points (○)
A class for drawing transient features (e.g.
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.
A box is used to highlight points (□)
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
This class represents a coordinate reference system (CRS).
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
A diamond is used to highlight points (◆)
int width() const
Returns the current width of the line or stroke width for polygon.
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
QColor strokeColor() const
Returns the current stroke color.
A full box is used to highlight points (■)
int iconSize() const
Returns the current icon size of the point icons.