SUMO - Simulation of Urban MObility
GUICalibrator.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Changes flow and speed on a set of lanes (gui version)
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
12 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUICalibrator_h
23 #define GUICalibrator_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
36 #include <string>
41 #include <gui/GUIManipulator.h>
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
54 public:
61  GUICalibrator(const std::string& id,
62  MSEdge* edge, SUMOReal pos,
63  const std::string& aXMLFilename,
64  const std::string& outputFilename,
65  const SUMOTime freq,
66  const MSRouteProbe* probe);
67 
68 
71 
72 
73 
75 
76 
85  GUISUMOAbstractView& parent);
86 
87 
96  GUISUMOAbstractView& parent);
97 
98 
105 
106 
111  void drawGL(const GUIVisualizationSettings& s) const;
113 
114 
115 
117  GUISUMOAbstractView& parent);
118 
119 public:
121  FXDECLARE(GUICalibratorPopupMenu)
122  public:
123 
125  GUISUMOAbstractView& parent, GUIGlObject& o);
126 
128 
130  long onCmdOpenManip(FXObject*, FXSelector, void*);
131 
132  protected:
134 
135  };
136 
138  FXDECLARE(GUIManip_Calibrator)
139  public:
140  enum {
141  MID_USER_DEF = FXDialogBox::ID_LAST,
145  ID_LAST
146  };
149  const std::string& name, GUICalibrator& o,
150  int xpos, int ypos);
151 
153  virtual ~GUIManip_Calibrator();
154 
155  long onCmdOverride(FXObject*, FXSelector, void*);
156  long onCmdClose(FXObject*, FXSelector, void*);
157  long onCmdUserDef(FXObject*, FXSelector, void*);
158  long onUpdUserDef(FXObject*, FXSelector, void*);
159  long onCmdPreDef(FXObject*, FXSelector, void*);
160  long onUpdPreDef(FXObject*, FXSelector, void*);
161  long onCmdChangeOption(FXObject*, FXSelector, void*);
162 
163  private:
165 
167 
168  FXDataTarget myChosenTarget;
169 
171 
172  FXDataTarget mySpeedTarget;
173 
174  FXRealSpinDial* myUserDefinedSpeed;
175 
176  FXComboBox* myPredefinedValues;
177 
179 
180  protected:
182 
183  };
184 
185 private:
187  typedef std::vector<Position> PosCont;
188 
190  typedef std::vector<SUMOReal> RotCont;
191 
192 private:
194  PosCont myFGPositions;
195 
197  RotCont myFGRotations;
198 
201 
204 
205 };
206 
207 
208 #endif
209 
210 /****************************************************************************/
211 
long long int SUMOTime
Definition: SUMOTime.h:43
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:53
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Writes routes of vehicles passing a certain edge.
Definition: MSRouteProbe.h:68
Stores the information about how to visualize structures.
GUICalibrator(const std::string &id, MSEdge *edge, SUMOReal pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq, const MSRouteProbe *probe)
Constructor.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object&#39;s manipulator shall be shown.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
A road/street connecting two junctions.
Definition: MSEdge.h:80
std::vector< SUMOReal > RotCont
Definition of a rotation container.
Boundary myBoundary
The boundary of this rerouter.
RotCont myFGRotations
The rotations in full-geometry mode.
std::vector< Position > PosCont
Definition of a positions container.
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
PosCont myFGPositions
The positions in full-geometry mode.
The popup menu of a globject.
Calibrates the flow on a segment to a specified one.
Definition: MSCalibrator.h:57
#define SUMOReal
Definition: config.h:213
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.