map2d_widget
trailitem.h
Go to the documentation of this file.
1 
12 /*
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 3 of the License, or
16 * (at your option) any later version.
17 *
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 * for more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 */
27 #ifndef TRAILITEM_H
28 #define TRAILITEM_H
29 
30 #include <QGraphicsItem>
31 #include <QPainter>
32 #include <QLabel>
33 #include "../internals/pointlatlng.h"
34 #include <QObject>
35 
36 namespace mapcontrol
37 {
38 
39  class TrailItem:public QObject,public QGraphicsItem
40  {
41  Q_OBJECT
42  Q_INTERFACES(QGraphicsItem)
43  public:
44  enum { Type = UserType + 3 };
45  TrailItem(internals::PointLatLng const& coord,int const& altitude, QBrush color, QGraphicsItem* parent);
46  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
47  QWidget *widget);
48  QRectF boundingRect() const;
49  int type() const;
51  private:
52  QBrush m_brush;
53 
54 
55  public slots:
56 
57  signals:
58 
59  };
60 }
61 #endif // TRAILITEM_H
62 
63 
TrailItem(internals::PointLatLng const &coord, int const &altitude, QBrush color, QGraphicsItem *parent)
Definition: trailitem.cpp:31
internals::PointLatLng coord
Definition: trailitem.h:50
Definition: trailitem.h:44
Definition: pointlatlng.h:35
Definition: trailitem.h:39
int type() const
Definition: trailitem.cpp:51
QRectF boundingRect() const
Definition: trailitem.cpp:45
Definition: core.h:60
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: trailitem.cpp:39