15 #ifndef QGSHIGHLIGHT_H
16 #define QGSHIGHLIGHT_H
26 #include <QPainterPath>
70 sipType = sipType_QgsHighlight;
77 Q_PROPERTY( QColor color READ color WRITE setColor )
78 Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
79 Q_PROPERTY(
int width READ width WRITE setWidth )
80 Q_PROPERTY(
int buffer READ buffer WRITE setBuffer )
104 QColor
color( )
const {
return mColor; }
110 void setColor(
const QColor &color );
124 void setFillColor(
const QColor &fillColor );
130 int width( )
const {
return mWidth; }
137 void setWidth(
int width );
143 double buffer( )
const {
return mBuffer; }
164 void updatePosition()
override;
167 void paint( QPainter *p )
override;
173 void updateTransformedGeometry();
186 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
189 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
199 QPointer< QgsMapLayer > mLayer;
202 double mMinWidth = 0;
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
A geometry is the spatial representation of a feature.
A class for highlight features on the map.
double buffer() const
Returns the buffer.
void setBuffer(double buffer)
Set line / stroke buffer in millimeters.
int width() const
Returns the stroke width.
QColor fillColor() const
Returns the fill color.
QgsMapLayer * layer() const
Returns the layer for which this highlight has been created.
void setMinWidth(double width)
Set minimum line / stroke width in millimeters.
QColor color() const
Returns the line/stroke color.
An abstract class for items that can be placed on the map canvas.
Map canvas is a class for displaying all GIS data types on a canvas.
Base class for all map layer types.
Point geometry type, with support for z-dimension and m-values.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
RenderUnit
Rendering size units.
Represents a vector layer which manages a vector based data sets.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
QVector< QgsPolylineXY > QgsPolygonXY
Polygon: first item of the list is outer ring, inner rings (if any) start from second item.
QVector< QgsPointXY > QgsPolylineXY
Polyline as represented as a vector of two-dimensional points.