26 mColor = QColor( 255, 0, 0 );
71 p->drawLine( QLineF( -s, 0, s, 0 ) );
72 p->drawLine( QLineF( 0, -s, 0, s ) );
76 p->drawLine( QLineF( -s, -s, s, s ) );
77 p->drawLine( QLineF( -s, s, s, -s ) );
81 p->drawLine( QLineF( -s, -s, s, -s ) );
82 p->drawLine( QLineF( s, -s, s, s ) );
83 p->drawLine( QLineF( s, s, -s, s ) );
84 p->drawLine( QLineF( -s, s, -s, -s ) );
93 return QRectF( -s, -s, 2.0*s, 2.0*s );
QColor mColor
color of the marker
An abstract class for items that can be placed on the map canvas.
void setPenWidth(int width)
Map canvas is a class for displaying all GIS data types on a canvas.
QgsVertexMarker(QgsMapCanvas *mapCanvas)
void paint(QPainter *p)
function to be implemented by derived classes
virtual void updatePosition()
called on changed extent or resize event to update position of the item
void setCenter(const QgsPoint &point)
QRectF boundingRect() const
default implementation for canvas items
A class to represent a point geometry.
void setIconSize(int iconSize)
QPointF toCanvasCoordinates(const QgsPoint &point)
transformation from map coordinates to screen coordinates
int mIconType
icon to be shown
void setColor(const QColor &color)
void setIconType(int iconType)
QgsPoint mCenter
coordinates of the point in the center