15 #ifndef QGSHIGHLIGHT_H 16 #define QGSHIGHLIGHT_H 26 #include <QPainterPath> 74 void setColor(
const QColor &color );
82 void setFillColor(
const QColor &fillColor );
89 void setWidth(
int width );
96 void setBuffer(
double buffer ) { mBuffer = buffer; }
113 void paint( QPainter *p )
override;
123 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
124 void paintPoint( QPainter *p,
const QgsPointXY &point );
126 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
134 double mMinWidth = 0;
Base class for all map layer types.
QgsMapLayer * layer() const
Return the layer for which this highlight has been created.
A class to represent a 2D point.
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item...
An abstract class for items that can be placed on the map canvas.
A geometry is the spatial representation of a feature.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Map canvas is a class for displaying all GIS data types on a canvas.
void setBuffer(double buffer)
Set line / stroke buffer in millimeters.
A class for highlight features on the map.
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.
Contains information about the context of a rendering operation.
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
RenderUnit
Rendering size units.
void setMinWidth(double width)
Set minimum line / stroke width in millimeters.