00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef QGSVERTEXMARKER_H
00018 #define QGSVERTEXMARKER_H
00019
00020 #include "qgsmapcanvasitem.h"
00021 #include "qgspoint.h"
00022
00023 class QPainter;
00024
00028 class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem
00029 {
00030 public:
00031
00033 enum IconType
00034 {
00035 ICON_NONE,
00036 ICON_CROSS,
00037 ICON_X,
00038 ICON_BOX
00039 };
00040
00041 QgsVertexMarker( QgsMapCanvas* mapCanvas );
00042
00043 void setCenter( const QgsPoint& point );
00044
00045 void setIconType( int iconType );
00046
00047 void setIconSize( int iconSize );
00048
00049 void setColor( const QColor& color );
00050
00051 void setPenWidth( int width );
00052
00053 void paint( QPainter* p );
00054
00055 QRectF boundingRect() const;
00056
00057 virtual void updatePosition();
00058
00059 protected:
00060
00062 int mIconType;
00063
00065 int mIconSize;
00066
00068 QgsPoint mCenter;
00069
00071 QColor mColor;
00072
00074 int mPenWidth;
00075 };
00076
00077 #endif