#include <qgsvertexmarker.h>
Public Types | |
enum | IconType { ICON_NONE, ICON_CROSS, ICON_X, ICON_BOX } |
Icons. More... | |
Public Member Functions | |
QgsVertexMarker (QgsMapCanvas *mapCanvas) | |
void | setCenter (const QgsPoint &point) |
void | setIconType (int iconType) |
void | setIconSize (int iconSize) |
void | setColor (const QColor &color) |
void | setPenWidth (int width) |
void | paint (QPainter *p) |
function to be implemented by derived classes | |
QRectF | boundingRect () const |
default implementation for canvas items | |
virtual void | updatePosition () |
called on changed extent or resize event to update position of the item | |
Protected Attributes | |
int | mIconType |
icon to be shown | |
int | mIconSize |
size | |
QgsPoint | mCenter |
coordinates of the point in the center | |
QColor | mColor |
color of the marker | |
int | mPenWidth |
pen width |
circles or 'x'.
Definition at line 28 of file qgsvertexmarker.h.
QgsVertexMarker::QgsVertexMarker | ( | QgsMapCanvas * | mapCanvas | ) |
void QgsVertexMarker::setCenter | ( | const QgsPoint & | point | ) |
Definition at line 41 of file qgsvertexmarker.cpp.
References mCenter, and QgsMapCanvasItem::toCanvasCoordinates().
Referenced by updatePosition().
void QgsVertexMarker::setIconType | ( | int | iconType | ) |
void QgsVertexMarker::setIconSize | ( | int | iconSize | ) |
void QgsVertexMarker::setColor | ( | const QColor & | color | ) |
void QgsVertexMarker::setPenWidth | ( | int | width | ) |
void QgsVertexMarker::paint | ( | QPainter * | painter | ) | [virtual] |
function to be implemented by derived classes
Implements QgsMapCanvasItem.
Definition at line 58 of file qgsvertexmarker.cpp.
References ICON_BOX, ICON_CROSS, ICON_NONE, ICON_X, mColor, mIconSize, mIconType, and mPenWidth.
QRectF QgsVertexMarker::boundingRect | ( | ) | const [virtual] |
default implementation for canvas items
Reimplemented from QgsMapCanvasItem.
Definition at line 91 of file qgsvertexmarker.cpp.
void QgsVertexMarker::updatePosition | ( | ) | [virtual] |
called on changed extent or resize event to update position of the item
Reimplemented from QgsMapCanvasItem.
Definition at line 97 of file qgsvertexmarker.cpp.
References mCenter, and setCenter().
int QgsVertexMarker::mIconType [protected] |
icon to be shown
Definition at line 62 of file qgsvertexmarker.h.
Referenced by paint(), QgsVertexMarker(), and setIconType().
int QgsVertexMarker::mIconSize [protected] |
size
Definition at line 65 of file qgsvertexmarker.h.
Referenced by boundingRect(), paint(), QgsVertexMarker(), and setIconSize().
QgsPoint QgsVertexMarker::mCenter [protected] |
coordinates of the point in the center
Definition at line 68 of file qgsvertexmarker.h.
Referenced by setCenter(), and updatePosition().
QColor QgsVertexMarker::mColor [protected] |
color of the marker
Definition at line 71 of file qgsvertexmarker.h.
Referenced by paint(), QgsVertexMarker(), and setColor().
int QgsVertexMarker::mPenWidth [protected] |
pen width
Definition at line 74 of file qgsvertexmarker.h.
Referenced by boundingRect(), paint(), QgsVertexMarker(), and setPenWidth().