QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
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; }
109 void setColor(
const QColor &color );
123 void setFillColor(
const QColor &fillColor );
129 int width( )
const {
return mWidth; }
136 void setWidth(
int width );
142 double buffer( )
const {
return mBuffer; }
166 void paint( QPainter *p )
override;
176 std::unique_ptr< QgsFeatureRenderer > createRenderer(
QgsRenderContext &context,
const QColor &color,
const QColor &fillColor );
177 void paintPoint( QPainter *p,
const QgsPointXY &point );
179 void paintPolygon( QPainter *p,
const QgsPolygonXY &polygon );
190 double mMinWidth = 0;
RenderUnit
Rendering size units.
QColor color() const
Returns the line/stroke color.
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.
Map canvas is a class for displaying all GIS data types on a canvas.
Contains information about the context of a rendering operation.
Abstract base class for all rendered symbols.
void setBuffer(double buffer)
Set line / stroke buffer in millimeters.
A class for highlight features on the map.
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
An abstract class for items that can be placed on the map canvas.
A class to represent a 2D point.
QColor fillColor() const
Returns the fill color.
QgsMapLayer * layer() const
Returns the layer for which this highlight has been created.
A geometry is the spatial representation of a feature.
double buffer() const
Returns the buffer.
Represents a vector layer which manages a vector based data sets.
Base class for all map layer types.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...