1 | // %flair:license{
|
---|
2 | // This file is part of the Flair framework distributed under the
|
---|
3 | // CECILL-C License, Version 1.0.
|
---|
4 | // %flair:license}
|
---|
5 | /*!
|
---|
6 | * \file Map.h
|
---|
7 | * \brief Class displaying a GPS map on the ground station
|
---|
8 | * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
|
---|
9 | * \date 2013/07/23
|
---|
10 | * \version 4.0
|
---|
11 | */
|
---|
12 |
|
---|
13 | #ifndef MAP_H
|
---|
14 | #define MAP_H
|
---|
15 |
|
---|
16 | #include <SendData.h>
|
---|
17 | #include <stdint.h>
|
---|
18 |
|
---|
19 | namespace flair {
|
---|
20 | namespace core {
|
---|
21 | class GeoCoordinate;
|
---|
22 | }
|
---|
23 |
|
---|
24 | namespace gui {
|
---|
25 |
|
---|
26 | class LayoutPosition;
|
---|
27 |
|
---|
28 | /*! \class Map
|
---|
29 | *
|
---|
30 | * \brief Class displaying a GPS map on the ground station
|
---|
31 | *
|
---|
32 | */
|
---|
33 | class Map : public SendData {
|
---|
34 | public:
|
---|
35 | /*!
|
---|
36 | * \brief Constructor
|
---|
37 | *
|
---|
38 | * Construct a map at given position. \n
|
---|
39 | * The Map will automatically be child of position->getLayout() Layout. After
|
---|
40 | *calling this constructor,
|
---|
41 | * position will be deleted as it is no longer usefull.
|
---|
42 | *
|
---|
43 | * \param position position to draw map
|
---|
44 | * \param name name
|
---|
45 | */
|
---|
46 | Map(const LayoutPosition *position, std::string name);
|
---|
47 |
|
---|
48 | /*!
|
---|
49 | * \brief Destructor
|
---|
50 | *
|
---|
51 | */
|
---|
52 | ~Map();
|
---|
53 |
|
---|
54 | /*!
|
---|
55 | * \brief Add a point to the map
|
---|
56 | *
|
---|
57 | * \param point point to draw
|
---|
58 | * \param name name
|
---|
59 | */
|
---|
60 | void AddPoint(const core::GeoCoordinate *point, std::string name = "");
|
---|
61 |
|
---|
62 | /*!
|
---|
63 | * \brief Copy datas to specified buffer
|
---|
64 | *
|
---|
65 | * Reimplemented from SendData.
|
---|
66 | *
|
---|
67 | * \param buf output buffer
|
---|
68 | */
|
---|
69 | void CopyDatas(char *buf) const;
|
---|
70 |
|
---|
71 | private:
|
---|
72 | /*!
|
---|
73 | * \brief Extra Xml event
|
---|
74 | *
|
---|
75 | * Reimplemented from SendData.
|
---|
76 | */
|
---|
77 | void ExtraXmlEvent(void);
|
---|
78 |
|
---|
79 | void removeCheckpoint(size_t index);
|
---|
80 |
|
---|
81 | std::vector<core::GeoCoordinate *> checkpoints;
|
---|
82 | std::vector<const core::GeoCoordinate *> to_draw;
|
---|
83 | // std::vector<xmlNodePtr> checkpoints_node;
|
---|
84 | // bool init;
|
---|
85 | };
|
---|
86 |
|
---|
87 | } // end namespace gui
|
---|
88 | } // end namespace flair
|
---|
89 |
|
---|
90 | #endif // MAP_H
|
---|