SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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-sim.org/
12 // Copyright (C) 2001-2013 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 
67 
70 
71 
72 
74 
75 
84  GUISUMOAbstractView& parent);
85 
86 
95  GUISUMOAbstractView& parent);
96 
97 
104 
105 
110  void drawGL(const GUIVisualizationSettings& s) const;
112 
113 
114 
116  GUISUMOAbstractView& parent);
117 
118 public:
120  FXDECLARE(GUICalibratorPopupMenu)
121  public:
122 
124  GUISUMOAbstractView& parent, GUIGlObject& o);
125 
127 
129  long onCmdOpenManip(FXObject*, FXSelector, void*);
130 
131  protected:
133 
134  };
135 
137  FXDECLARE(GUIManip_Calibrator)
138  public:
139  enum {
140  MID_USER_DEF = FXDialogBox::ID_LAST,
145  };
148  const std::string& name, GUICalibrator& o,
149  int xpos, int ypos);
150 
152  virtual ~GUIManip_Calibrator();
153 
154  long onCmdOverride(FXObject*, FXSelector, void*);
155  long onCmdClose(FXObject*, FXSelector, void*);
156  long onCmdUserDef(FXObject*, FXSelector, void*);
157  long onUpdUserDef(FXObject*, FXSelector, void*);
158  long onCmdPreDef(FXObject*, FXSelector, void*);
159  long onUpdPreDef(FXObject*, FXSelector, void*);
160  long onCmdChangeOption(FXObject*, FXSelector, void*);
161 
162  private:
164 
166 
167  FXDataTarget myChosenTarget;
168 
170 
171  FXDataTarget mySpeedTarget;
172 
173  FXRealSpinDial* myUserDefinedSpeed;
174 
175  FXComboBox* myPredefinedValues;
176 
178 
179  protected:
181 
182  };
183 
184 private:
186  typedef std::vector<Position> PosCont;
187 
189  typedef std::vector<SUMOReal> RotCont;
190 
191 private:
194 
197 
200 
203 
204 };
205 
206 
207 #endif
208 
209 /****************************************************************************/
210 
Changes the speed allowed on a set of lanes (gui version)
Definition: GUICalibrator.h:53
GUICalibrator(const std::string &id, MSEdge *edge, SUMOReal pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq)
Constructor.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Stores the information about how to visualize structures.
long onCmdChangeOption(FXObject *, FXSelector, void *)
long onUpdPreDef(FXObject *, FXSelector, void *)
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.
A road/street connecting two junctions.
Definition: MSEdge.h:73
virtual ~GUIManip_Calibrator()
Destructor.
std::vector< SUMOReal > RotCont
Definition of a rotation container.
Boundary myBoundary
The boundary of this rerouter.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
long onCmdPreDef(FXObject *, FXSelector, void *)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
RotCont myFGRotations
The rotations in full-geometry mode.
long onCmdClose(FXObject *, FXSelector, void *)
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.
long onCmdOverride(FXObject *, FXSelector, void *)
The popup menu of a globject.
Calibrates the flow on a segment to a specified one.
Definition: MSCalibrator.h:49
long onCmdUserDef(FXObject *, FXSelector, void *)
long onUpdUserDef(FXObject *, FXSelector, void *)
#define SUMOReal
Definition: config.h:221
A window containing a gl-object&#39;s parameter.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.