|
QGIS API Documentation
2.8.6-Wien
|
A class for highlight features on the map. More...
#include <qgshighlight.h>

Public Member Functions | |
| QgsHighlight (QgsMapCanvas *mapCanvas, QgsGeometry *geom, QgsMapLayer *layer) | |
| QgsHighlight (QgsMapCanvas *mapCanvas, QgsGeometry *geom, QgsVectorLayer *layer) | |
| QgsHighlight (QgsMapCanvas *mapCanvas, const QgsFeature &feature, QgsVectorLayer *layer) | |
| Constructor for highlighting true feature shape using feature attributes and renderer. More... | |
| ~QgsHighlight () | |
| const QgsMapLayer * | layer () const |
| void | setBuffer (double buffer) |
| Set line / outline buffer in millimeters. More... | |
| void | setColor (const QColor &color) |
| Set line/outline to color, polygon fill to color with alpha = 63. More... | |
| void | setFillColor (const QColor &fillColor) |
| Set polygons fill color. More... | |
| void | setMinWidth (double width) |
| Set minimum line / outline width in millimeters. More... | |
| void | setWidth (int width) |
| Set width. More... | |
| virtual void | updatePosition () override |
| called on changed extent or resize event to update position of the item More... | |
Public Member Functions inherited from QgsMapCanvasItem | |
| virtual QRectF | boundingRect () const override |
| default implementation for canvas items More... | |
| QgsRectangle | rect () const |
| returns canvas item rectangle in map units More... | |
| Q_DECL_DEPRECATED void | setPanningOffset (const QPoint &point) |
| sets current offset, to be called from QgsMapCanvas More... | |
| void | setRect (const QgsRectangle &r, bool resetRotation=true) |
| sets canvas item rectangle in map units More... | |
| QPointF | toCanvasCoordinates (const QgsPoint &point) const |
| transformation from map coordinates to screen coordinates More... | |
| QgsPoint | toMapCoordinates (const QPoint &point) const |
| transformation from screen coordinates to map coordinates More... | |
Protected Member Functions | |
| virtual void | paint (QPainter *p) override |
| void | updateRect () |
| recalculates needed rectangle More... | |
Protected Member Functions inherited from QgsMapCanvasItem | |
| QgsMapCanvasItem (QgsMapCanvas *mapCanvas) | |
| protected constructor: cannot be constructed directly More... | |
| virtual | ~QgsMapCanvasItem () |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) override |
| paint function called by map canvas More... | |
| bool | setRenderContextVariables (QPainter *p, QgsRenderContext &context) const |
| Sets render context parameters. More... | |
| void | updateCanvas () |
| schedules map canvas for repaint More... | |
Additional Inherited Members | |
Protected Attributes inherited from QgsMapCanvasItem | |
| QSizeF | mItemSize |
| cached size of the item (to return in boundingRect()) More... | |
| QgsMapCanvas * | mMapCanvas |
| pointer to map canvas More... | |
| QPoint | mPanningOffset |
| offset from normal position due current panning operation, used when converting map coordinates to move map canvas items More... | |
| QgsRectangle | mRect |
| cached canvas item rectangle in map coordinates encodes position (xmin,ymax) and size (width/height) used to re-position and re-size the item on zoom/pan while waiting for the renderer to complete. More... | |
| double | mRectRotation |
A class for highlight features on the map.
The QgsHighlight class provides a transparent overlay widget for highlighting features on the map.
Definition at line 36 of file qgshighlight.h.
| QgsHighlight::QgsHighlight | ( | QgsMapCanvas * | mapCanvas, |
| QgsGeometry * | geom, | ||
| QgsMapLayer * | layer | ||
| ) |
Definition at line 56 of file qgshighlight.cpp.
| QgsHighlight::QgsHighlight | ( | QgsMapCanvas * | mapCanvas, |
| QgsGeometry * | geom, | ||
| QgsVectorLayer * | layer | ||
| ) |
Definition at line 66 of file qgshighlight.cpp.
| QgsHighlight::QgsHighlight | ( | QgsMapCanvas * | mapCanvas, |
| const QgsFeature & | feature, | ||
| QgsVectorLayer * | layer | ||
| ) |
Constructor for highlighting true feature shape using feature attributes and renderer.
| mapCanvas | map canvas |
| feature | |
| layer | vector layer |
Definition at line 76 of file qgshighlight.cpp.
| QgsHighlight::~QgsHighlight | ( | ) |
Definition at line 109 of file qgshighlight.cpp.
|
inline |
Definition at line 69 of file qgshighlight.h.
|
overrideprotectedvirtual |
Draw the shape in response to an update event.
Implements QgsMapCanvasItem.
Definition at line 279 of file qgshighlight.cpp.
|
inline |
Set line / outline buffer in millimeters.
Definition at line 63 of file qgshighlight.h.
| void QgsHighlight::setColor | ( | const QColor & | color | ) |
Set line/outline to color, polygon fill to color with alpha = 63.
This is legacy function, use setFillColor() after setColor() if different fill color is required.
Set the outline and fill color.
Definition at line 117 of file qgshighlight.cpp.
| void QgsHighlight::setFillColor | ( | const QColor & | fillColor | ) |
Set polygons fill color.
Definition at line 125 of file qgshighlight.cpp.
|
inline |
Set minimum line / outline width in millimeters.
Definition at line 67 of file qgshighlight.h.
| void QgsHighlight::setWidth | ( | int | width | ) |
Set width.
Ignored in feature mode.
Set the outline width.
Definition at line 207 of file qgshighlight.cpp.
|
overridevirtual |
called on changed extent or resize event to update position of the item
Reimplemented from QgsMapCanvasItem.
Definition at line 271 of file qgshighlight.cpp.
|
protected |
recalculates needed rectangle
Definition at line 407 of file qgshighlight.cpp.
1.8.11