15 #ifndef QGSHIGHLIGHT_H 16 #define QGSHIGHLIGHT_H 26 #include <QPainterPath> 62 if ( dynamic_cast<QgsHighlight *>( sipCpp ) )
63 sipType = sipType_QgsHighlight;
70 Q_PROPERTY( QColor color READ color WRITE setColor )
71 Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
72 Q_PROPERTY(
int width READ width WRITE setWidth )
73 Q_PROPERTY(
int buffer READ buffer WRITE setBuffer )
97 QColor color( )
const {
return mColor; }
102 void setColor(
const QColor &color );
116 void setFillColor(
const QColor &fillColor );
122 int width( )
const {
return mWidth; }
129 void setWidth(
int width );
135 double buffer( )
const {
return mBuffer; }
159 void paint( QPainter *p )
override;
169 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
170 void paintPoint( QPainter *p,
const QgsPointXY &point );
172 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
183 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.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
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.