source: flair-src/branches/mavlink/tools/FlairGCS/src/Map.h@ 112

Last change on this file since 112 was 15, checked in by Bayard Gildas, 9 years ago

sources reformatted with flair-format-dir script

File size: 1.7 KB
Line 
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#ifndef MAP_H
6#define MAP_H
7
8#include <stdint.h>
9#include "DataRemote.h"
10#include <QGeoCoordinate>
11#include <QGraphicsGeoMap>
12
13class Layout;
14class MapWidget;
15class QComboBox;
16class Landmark;
17class QToolButton;
18
19namespace QtMobility {
20class QGeoMappingManager;
21class QGraphicsGeoMap;
22class QGeoServiceProvider;
23}
24
25class Map : public DataRemote {
26 Q_OBJECT
27
28public:
29 Map(Layout *parent, int row, int col, QString name,
30 QList<QtMobility::QGeoCoordinate> coordinates, bool enabled, int period);
31 ~Map();
32 void setCenteredPoint(int i);
33 int centeredPoint(void);
34 bool isCentered(void);
35
36private:
37 MapWidget *mapWidget;
38 QtMobility::QGeoMappingManager *manager;
39 QList<QtMobility::QGeoMappingManager *> managers;
40 QtMobility::QGraphicsGeoMap *geoMap;
41 QtMobility::QGeoServiceProvider *service;
42 QComboBox *mapTypeCombo, *serviceCombo, *proxyCombo;
43 QHash<QtMobility::QGraphicsGeoMap::MapType, QString> mapTypes;
44 QToolButton *zoomin, *zoomout;
45 QAction *zoomInAction;
46 QAction *zoomOutAction;
47 QList<Landmark *> points;
48 int centeredpoint;
49
50 bool findServices(void);
51 void findproxy(void);
52 void populateMapTypeCombo();
53 bool IsUptodate(void);
54 void SetUptodate(void);
55 void Reset(void);
56 void XmlEvent(QDomElement dom);
57 void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
58
59 void RemovePoints(void);
60 void AddPoints(QtMobility::QGraphicsGeoMap *geoMap);
61
62private slots:
63 void changeMapType(int index);
64 void selectService(int index);
65 void changeproxy(int index);
66 void updateZoom(qreal value);
67 void zoomIn(void);
68 void zoomOut(void);
69};
70
71#endif // MAP_H
Note: See TracBrowser for help on using the repository browser.