|
QGIS API Documentation
2.6.0-Brighton
|
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. | |
| ~QgsHighlight () | |
| void | setColor (const QColor &color) |
| Set line/outline to color, polygon fill to color with alpha = 63. | |
| void | setFillColor (const QColor &fillColor) |
| Set polygons fill color. | |
| void | setWidth (int width) |
| Set width. | |
| void | setBuffer (double buffer) |
| Set line / outline buffer in millimeters. | |
| void | setMinWidth (double width) |
| Set minimum line / outline width in millimeters. | |
| const QgsMapLayer * | layer () const |
Public Member Functions inherited from QgsMapCanvasItem | |
| virtual void | updatePosition () |
| called on changed extent or resize event to update position of the item | |
| virtual QRectF | boundingRect () const |
| default implementation for canvas items | |
| Q_DECL_DEPRECATED void | setPanningOffset (const QPoint &point) |
| sets current offset, to be called from QgsMapCanvas | |
| QgsRectangle | rect () const |
| returns canvas item rectangle | |
| void | setRect (const QgsRectangle &r) |
| sets canvas item rectangle | |
| QgsPoint | toMapCoordinates (const QPoint &point) |
| transformation from screen coordinates to map coordinates | |
| QPointF | toCanvasCoordinates (const QgsPoint &point) |
| transformation from map coordinates to screen coordinates | |
Protected Member Functions | |
| virtual void | paint (QPainter *p) |
| void | updateRect () |
| recalculates needed rectangle | |
Protected Member Functions inherited from QgsMapCanvasItem | |
| QgsMapCanvasItem (QgsMapCanvas *mapCanvas) | |
| protected constructor: cannot be constructed directly | |
| virtual | ~QgsMapCanvasItem () |
| virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0) |
| paint function called by map canvas | |
| void | updateCanvas () |
| schedules map canvas for repaint | |
| bool | setRenderContextVariables (QPainter *p, QgsRenderContext &context) const |
| Sets render context parameters. | |
Additional Inherited Members | |
Protected Attributes inherited from QgsMapCanvasItem | |
| QgsMapCanvas * | mMapCanvas |
| pointer to map canvas | |
| QgsRectangle | mRect |
| canvas item rectangle (in map coordinates) | |
| QPoint | mPanningOffset |
| offset from normal position due current panning operation, used when converting map coordinates to move map canvas items | |
| QSizeF | mItemSize |
| cached size of the item (to return in boundingRect()) | |
A class for highlight features on the map.
The QgsHighlight class provides a transparent overlay widget for highlightng features on the map.
| QgsHighlight::QgsHighlight | ( | QgsMapCanvas * | mapCanvas, |
| QgsGeometry * | geom, | ||
| QgsMapLayer * | layer | ||
| ) |
| QgsHighlight::QgsHighlight | ( | QgsMapCanvas * | mapCanvas, |
| QgsGeometry * | geom, | ||
| QgsVectorLayer * | layer | ||
| ) |
| 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 |
| QgsHighlight::~QgsHighlight | ( | ) |
|
inline |
|
protectedvirtual |
Draw the shape in response to an update event.
Implements QgsMapCanvasItem.
|
inline |
Set line / outline buffer in millimeters.
| 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.
| void QgsHighlight::setFillColor | ( | const QColor & | fillColor | ) |
Set polygons fill color.
|
inline |
Set minimum line / outline width in millimeters.
| void QgsHighlight::setWidth | ( | int | width | ) |
Set width.
Ignored in feature mode.
Set the outline width.
|
protected |
recalculates needed rectangle
1.8.1.2