15 #ifndef QGSHIGHLIGHT_H 16 #define QGSHIGHLIGHT_H 26 #include <QPainterPath> 53 Q_PROPERTY( QColor color READ color WRITE setColor )
54 Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
55 Q_PROPERTY(
int width READ width WRITE setWidth )
56 Q_PROPERTY(
int buffer READ buffer WRITE setBuffer )
82 QColor color( )
const {
return mColor; }
87 void setColor(
const QColor &color );
101 void setFillColor(
const QColor &fillColor );
107 int width( )
const {
return mWidth; }
114 void setWidth(
int width );
120 double buffer( )
const {
return mBuffer; }
144 void paint( QPainter *p )
override;
154 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
155 void paintPoint( QPainter *p,
const QgsPointXY &point );
157 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
168 double mMinWidth = 0;
Base class for all map layer types.
QgsMapLayer * layer() const
Returns the layer for which this highlight has been created.
Abstract base class for all rendered symbols.
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.
QColor fillColor() const
Returns the fill color.
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.
double buffer() const
Returns the buffer.
int width() const
Returns the stroke width.
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.