QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Go to the documentation of this file.
15 #ifndef QGSHIGHLIGHT_H
16 #define QGSHIGHLIGHT_H
26 #include <QPainterPath>
69 sipType = sipType_QgsHighlight;
76 Q_PROPERTY( QColor color READ color WRITE setColor )
77 Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )
78 Q_PROPERTY(
int width READ width WRITE setWidth )
79 Q_PROPERTY(
int buffer READ buffer WRITE setBuffer )
103 QColor color( )
const {
return mColor; }
108 void setColor(
const QColor &color );
122 void setFillColor(
const QColor &fillColor );
128 int width( )
const {
return mWidth; }
135 void setWidth(
int width );
141 double buffer( )
const {
return mBuffer; }
165 void paint( QPainter *p )
override;
175 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
176 void paintPoint( QPainter *p,
const QgsPointXY &point );
178 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
189 double mMinWidth = 0;
RenderUnit
Rendering size units.
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.
int width() const
Returns the stroke width.
void setBuffer(double buffer)
Set line / stroke buffer in millimeters.
void setMinWidth(double width)
Set minimum line / stroke width in millimeters.
virtual void updatePosition()
called on changed extent or resize event to update position of the item
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
virtual void paint(QPainter *painter)=0
function to be implemented by derived classes
QColor fillColor() const
Returns the fill color.
QgsMapLayer * layer() const
Returns the layer for which this highlight has been created.
double buffer() const
Returns the buffer.