Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsvertexmarker.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvertexmarker.h - canvas item which shows a simple vertex marker
3  ---------------------
4  begin : February 2006
5  copyright : (C) 2006 by Martin Dobias
6  email : wonder.sk at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 /* $Id$ */
16 
17 #ifndef QGSVERTEXMARKER_H
18 #define QGSVERTEXMARKER_H
19 
20 #include "qgsmapcanvasitem.h"
21 #include "qgspoint.h"
22 
23 class QPainter;
24 
28 class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem
29 {
30  public:
31 
33  enum IconType
34  {
38  ICON_BOX
39  };
40 
41  QgsVertexMarker( QgsMapCanvas* mapCanvas );
42 
43  void setCenter( const QgsPoint& point );
44 
45  void setIconType( int iconType );
46 
47  void setIconSize( int iconSize );
48 
49  void setColor( const QColor& color );
50 
51  void setPenWidth( int width );
52 
53  void paint( QPainter* p );
54 
55  QRectF boundingRect() const;
56 
57  virtual void updatePosition();
58 
59  protected:
60 
62  int mIconType;
63 
65  int mIconSize;
66 
69 
71  QColor mColor;
72 
74  int mPenWidth;
75 };
76 
77 #endif