dRonin  adbada4
dRonin GCS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
waypointcurve.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, see <http://www.gnu.org/licenses/>
25 */
26 #ifndef WAYPOINTCURVE_H
27 #define WAYPOINTCURVE_H
28 
29 #include "waypointitem.h"
30 #include "../core/corecommon.h"
31 
32 namespace mapcontrol
33 {
34 
40 class TLMAPWIDGET_EXPORT WayPointCurve:public QObject,public QGraphicsEllipseItem
41 {
42  Q_OBJECT
43  Q_INTERFACES(QGraphicsItem)
44 public:
45  enum { Type = UserType + 9 };
47  double radius, bool clockwise,
48  MapGraphicItem * map, QColor color=Qt::green);
49  int type() const;
50  void setColor(const QColor &color) { myColor = color; }
51 private:
53  WayPointItem * m_start;
54 
56  WayPointItem * m_dest;
57 
59  double m_radius;
60 
62  bool m_clockwise;
63 
65  QPointF center;
66 
68  QPointF midpoint;
69 
71  double midpoint_angle;
72 
74  MapGraphicItem * my_map;
75  QPolygonF arrowHead;
76  QColor myColor;
77 protected:
78  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
79 
80 public slots:
82  void refreshLocations();
83 
85  void waypointdeleted();
86 
87  void setOpacitySlot(qreal opacity);
88 };
89 }
90 
91 #endif // WAYPOINTCURVE_H
A graphicsItem representing a WayPoint.
The WayPointCurve class draws an arc between two graphics items of a given radius and direction of cu...
Definition: waypointcurve.h:40
The main graphicsItem used on the widget, contains the map and map logic.
A QGraphicsItem representing a WayPoint.
Definition: waypointitem.h:41