Quantum GIS API Documentation  1.8
Public Types | Public Member Functions | Protected Attributes
QgsVertexMarker Class Reference

A class for marking vertices of features using e.g. More...

#include <qgsvertexmarker.h>

Inheritance diagram for QgsVertexMarker:
Inheritance graph
[legend]
Collaboration diagram for QgsVertexMarker:
Collaboration graph
[legend]

List of all members.

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

Detailed Description

A class for marking vertices of features using e.g.

circles or 'x'.

Definition at line 27 of file qgsvertexmarker.h.


Member Enumeration Documentation

Icons.

Enumerator:
ICON_NONE 
ICON_CROSS 
ICON_X 
ICON_BOX 

Definition at line 32 of file qgsvertexmarker.h.


Constructor & Destructor Documentation

Definition at line 21 of file qgsvertexmarker.cpp.

References ICON_X, mColor, mIconSize, mIconType, and mPenWidth.


Member Function Documentation

QRectF QgsVertexMarker::boundingRect ( ) const [virtual]

default implementation for canvas items

Reimplemented from QgsMapCanvasItem.

Definition at line 90 of file qgsvertexmarker.cpp.

References mIconSize, and mPenWidth.

void QgsVertexMarker::paint ( QPainter *  painter) [virtual]

function to be implemented by derived classes

Implements QgsMapCanvasItem.

Definition at line 57 of file qgsvertexmarker.cpp.

References ICON_BOX, ICON_CROSS, ICON_NONE, ICON_X, mColor, mIconSize, mIconType, and mPenWidth.

void QgsVertexMarker::setCenter ( const QgsPoint point)

Definition at line 40 of file qgsvertexmarker.cpp.

References mCenter, and QgsMapCanvasItem::toCanvasCoordinates().

Referenced by updatePosition().

void QgsVertexMarker::setColor ( const QColor &  color)

Definition at line 47 of file qgsvertexmarker.cpp.

References mColor.

void QgsVertexMarker::setIconSize ( int  iconSize)

Definition at line 35 of file qgsvertexmarker.cpp.

References mIconSize.

void QgsVertexMarker::setIconType ( int  iconType)

Definition at line 30 of file qgsvertexmarker.cpp.

References mIconType.

void QgsVertexMarker::setPenWidth ( int  width)

Definition at line 52 of file qgsvertexmarker.cpp.

References mPenWidth.

void QgsVertexMarker::updatePosition ( ) [virtual]

called on changed extent or resize event to update position of the item

Reimplemented from QgsMapCanvasItem.

Definition at line 96 of file qgsvertexmarker.cpp.

References mCenter, and setCenter().


Member Data Documentation

coordinates of the point in the center

Definition at line 67 of file qgsvertexmarker.h.

Referenced by setCenter(), and updatePosition().

QColor QgsVertexMarker::mColor [protected]

color of the marker

Definition at line 70 of file qgsvertexmarker.h.

Referenced by paint(), QgsVertexMarker(), and setColor().

int QgsVertexMarker::mIconSize [protected]

size

Definition at line 64 of file qgsvertexmarker.h.

Referenced by boundingRect(), paint(), QgsVertexMarker(), and setIconSize().

int QgsVertexMarker::mIconType [protected]

icon to be shown

Definition at line 61 of file qgsvertexmarker.h.

Referenced by paint(), QgsVertexMarker(), and setIconType().

int QgsVertexMarker::mPenWidth [protected]

pen width

Definition at line 73 of file qgsvertexmarker.h.

Referenced by boundingRect(), paint(), QgsVertexMarker(), and setPenWidth().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines