GlobeEngine
TrafficInfoObject.h
Go to the documentation of this file.
1 
8 #ifndef GlobeEngine_TrafficInfoObject_h
9 #define GlobeEngine_TrafficInfoObject_h
10 
11 #include <vector>
12 #include "OpenGL_Includes.h"
13 #include "PointFeatureObject.h"
14 #include "SceneBluePrint.h"
15 #include "Texture.h"
16 
17 #include <QNetworkReply>
18 
19 namespace geGIS {
20 
22  {
23 
24  public:
27  void clear();
28  void create(std::shared_ptr<TrafficInfoBlueprint> _blueprint, std::shared_ptr<ReferenceSystem> _referenceSystem);
29  void loadData(std::string filename);
30 
31  bool hasTrafficInfo() const;
32  int getRBLNumber(int _idx) const;
33  const std::vector<int> getRBLNumbers() const;
34  int getUndergroundRBLNumber(int _idx) const;
35  const std::vector<int> getUndergroundRBLNumbers() const;
36  std::string getPlattformName(int _idx) const;
37  const std::vector<std::string> getPlattformNames() const;
38  std::string getLineName(int _idx) const;
39  const std::vector<std::string> getLineNames() const;
40 
41  // network requests
42  QUrl requestSingleStation(int _idx);
43  QUrl requestTrafficInfo() const;
44  void loadTrafficInfoFromJson(std::string _input);
45 
46  // highlighting points
47  void highlightPoint(int _id);
48  void undoHighlightPoint();
49 
50  // overloads from pointfeature
51  void draw(std::shared_ptr<ge::Camera> _cam);
52 
53  // overrides from PointFeatureObject
54  void setPointSize(float _input);
55 
56  private:
57  using ge::DrawableComponent::create; // implicitly hidden
58 
59  void loadTrafficTable(std::string _filename);
60 
61  std::shared_ptr<TrafficInfoBlueprint> blueprint;
62 
63  std::string rbltable;
64  std::vector<int> rblNumbers;
65  std::vector<std::string> plattformNames;
66  std::vector<std::string> lineNames;
67  std::vector<int> underGroundRBLNumbers;
68  std::vector <int>trafficInfoTextureRef;
69  std::vector <ge::Texture2Drgba*> iconObjects;
70  std::vector <std::string> iconVarNames;
71 
72  float highlightingSize;
73  };
74 }
75 #endif
void loadData(std::string filename)
Definition: TrafficInfoObject.cpp:41
void loadTrafficInfoFromJson(std::string _input)
Definition: TrafficInfoObject.cpp:177
void undoHighlightPoint()
Definition: TrafficInfoObject.cpp:317
const std::vector< int > getUndergroundRBLNumbers() const
Definition: TrafficInfoObject.cpp:301
Definition: ClusterGrid.h:17
const std::vector< std::string > getPlattformNames() const
Definition: TrafficInfoObject.cpp:305
QUrl requestSingleStation(int _idx)
Definition: TrafficInfoObject.cpp:162
Definition: PointFeatureObject.h:19
int getRBLNumber(int _idx) const
Definition: TrafficInfoObject.cpp:281
std::string getLineName(int _idx) const
Definition: TrafficInfoObject.cpp:297
const std::vector< int > getRBLNumbers() const
Definition: TrafficInfoObject.cpp:285
TrafficInfoObject()
Definition: TrafficInfoObject.cpp:15
virtual void create()=0
virtual void create()
Definition: FeatureObject.cpp:47
void setPointSize(float _input)
Definition: TrafficInfoObject.cpp:322
Definition: TrafficInfoObject.h:21
void highlightPoint(int _id)
Definition: TrafficInfoObject.cpp:313
~TrafficInfoObject()
Definition: TrafficInfoObject.cpp:20
QUrl requestTrafficInfo() const
Definition: TrafficInfoObject.cpp:241
std::string getPlattformName(int _idx) const
Definition: TrafficInfoObject.cpp:293
int getUndergroundRBLNumber(int _idx) const
Definition: TrafficInfoObject.cpp:289
const std::vector< std::string > getLineNames() const
Definition: TrafficInfoObject.cpp:309
void draw(std::shared_ptr< ge::Camera > _cam)
Definition: TrafficInfoObject.cpp:142
void clear()
Definition: TrafficInfoObject.cpp:25
bool hasTrafficInfo() const
Definition: TrafficInfoObject.cpp:273