Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
MapDatabaseService.h
Go to the documentation of this file.
1 #ifndef MAPDATABASESERVICE_H
2 #define MAPDATABASESERVICE_H
3 
4 #include <QThread>
5 #include <QMetaType>
6 
7 #include <osmscout/Database.h>
8 #include <osmscout/LocationService.h>
9 #include <osmscout/MapService.h>
10 #include <osmscout/routing/RoutingService.h>
11 #include <osmscout/routing/RoutePostprocessor.h>
12 #include <osmscout/MapPainterQt.h>
13 #include <osmscout/util/Breaker.h>
14 
16 
18 {
19 public:
20  double mAngle;
21  size_t mWidth;
22  size_t mHeight;
23  osmscout::GeoCoord mCoord;
24  osmscout::Magnification mMagnification;
25  std::vector<RouteSegmentMapData> mRouteSegmentsMapData;
26 
28 };
29 
30 Q_DECLARE_METATYPE( RenderMapRequest )
31 
33 {
34  osmscout::GeoBox boundingBox;
35 };
36 
37 Q_DECLARE_METATYPE( DatabaseLoadedResponse )
38 
39 class MapDatabaseService : public QObject
40 {
41  Q_OBJECT
42 
43 public:
45  {
47  MapServiceSettingDifferentColorForEachRouteSegment
48  };
49 
50  static MapDatabaseService *GetInstance();
51  static void FreeInstance();
52 
53  void CancelCurrentDataLoading();
54  void RenderMap( QPainter &painter );
55 
56  void SetMapServiceSetting( MapServiceSetting setting, QVariant value );
57 
58 signals:
59  void HandleMapRenderingResult();
60  void TriggerInitialRendering();
61 
62 public slots:
63  void HandleInitialRenderingRequest();
64  void DrawMap();
65  void TriggerMapRendering( const RenderMapRequest &request );
66  void Initialize();
67  void Finalize();
68 
69 private:
71 
73  virtual ~MapDatabaseService();
74 
75  class DataClass;
76  QScopedPointer<DataClass> d;
77 
79 };
80 
81 #endif
double mAngle
Definition: MapDatabaseService.h:20
osmscout::GeoBox boundingBox
Definition: MapDatabaseService.h:34
Definition: MapDatabaseService.h:39
size_t mHeight
Definition: MapDatabaseService.h:22
RenderMapRequest()
Definition: MapDatabaseService.cpp:92
MapServiceSetting
Definition: MapDatabaseService.h:44
osmscout::Magnification mMagnification
Definition: MapDatabaseService.h:24
size_t mWidth
Definition: MapDatabaseService.h:21
std::vector< RouteSegmentMapData > mRouteSegmentsMapData
Definition: MapDatabaseService.h:25
osmscout::GeoCoord mCoord
Definition: MapDatabaseService.h:23
Definition: MapDatabaseService.h:17
Definition: MapDatabaseService.h:32