source: flair-src/branches/sanscv/tools/FlairGCS/src/Map.h@ 383

Last change on this file since 383 was 324, checked in by Sanahuja Guillaume, 5 years ago

removing opencv dependency

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
28 friend class MapWidget;
29
30public:
31 Map(Layout *parent, int row, int col, QString name,
32 QList<QtMobility::QGeoCoordinate> coordinates, bool enabled, int period);
33 ~Map();
34 void setCenteredPoint(int i);
35 int centeredPoint(void);
36 bool isCentered(void);
37
38private:
39 MapWidget *mapWidget;
40 QtMobility::QGeoMappingManager *manager;
41 QList<QtMobility::QGeoMappingManager *> managers;
42 QtMobility::QGraphicsGeoMap *geoMap;
43 QtMobility::QGeoServiceProvider *service;
44 QComboBox *mapTypeCombo, *serviceCombo, *proxyCombo;
45 QHash<QtMobility::QGraphicsGeoMap::MapType, QString> mapTypes;
46 QToolButton *zoomin, *zoomout;
47 QAction *zoomInAction;
48 QAction *zoomOutAction;
49 QList<Landmark *> points;
50 int centeredpoint;
51
52 bool findServices(void);
53 void findproxy(void);
54 void populateMapTypeCombo();
55 bool IsUptodate(void);
56 void SetUptodate(void);
57 void Reset(void);
58 void XmlEvent(QDomElement *dom);
59 void BufEvent(char **buf, int *buf_size, uint16_t period, bool big_endian);
60
61 void RemovePoints(void);
62 void AddPoints(QtMobility::QGraphicsGeoMap *geoMap);
63
64private slots:
65 void changeMapType(int index);
66 void selectService(int index);
67 void changeproxy(int index);
68 void updateZoom(qreal value);
69 void zoomIn(void);
70 void zoomOut(void);
71};
72
73#endif // MAP_H
Note: See TracBrowser for help on using the repository browser.