Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUICalibrator.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// Changes flow and speed on a set of lanes (gui version)
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include <vector>
26#include <string>
30#include <gui/GUIManipulator.h>
31
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
43public:
47 GUICalibrator(MSCalibrator* calibrator);
48
51
52
53
55
56
65 GUISUMOAbstractView& parent);
66
75 GUISUMOAbstractView& parent);
76
78 double getExaggeration(const GUIVisualizationSettings& s) const;
79
86
91 void drawGL(const GUIVisualizationSettings& s) const;
93
94
95
97 GUISUMOAbstractView& parent);
98
99public:
101 FXDECLARE(GUICalibratorPopupMenu)
102 public:
103
105 GUISUMOAbstractView& parent, GUIGlObject& o);
106
108
110 long onCmdOpenManip(FXObject*, FXSelector, void*);
111
112 protected:
114
115 };
116
118 FXDECLARE(GUIManip_Calibrator)
119 public:
120 enum {
121 MID_USER_DEF = FXDialogBox::ID_LAST,
125 ID_LAST
126 };
129 const std::string& name, GUICalibrator& o,
130 int xpos, int ypos);
131
133 virtual ~GUIManip_Calibrator();
134
135 long onCmdOverride(FXObject*, FXSelector, void*);
136 long onCmdClose(FXObject*, FXSelector, void*);
137 long onCmdUserDef(FXObject*, FXSelector, void*);
138 long onUpdUserDef(FXObject*, FXSelector, void*);
139 long onCmdPreDef(FXObject*, FXSelector, void*);
140 long onUpdPreDef(FXObject*, FXSelector, void*);
141 long onCmdChangeOption(FXObject*, FXSelector, void*);
142
143 private:
145
147
148 FXDataTarget myChosenTarget;
149
150 double mySpeed;
151
152 FXDataTarget mySpeedTarget;
153
154 FXRealSpinner* myUserDefinedSpeed;
155
157
159
160 protected:
162
163 };
164
165private:
167 typedef std::vector<Position> PosCont;
168
170 typedef std::vector<double> RotCont;
171
174
177
180
183
186
187};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object's manipulator shall be shown.
long onCmdOverride(FXObject *, FXSelector, void *)
long onCmdClose(FXObject *, FXSelector, void *)
long onCmdChangeOption(FXObject *, FXSelector, void *)
long onCmdUserDef(FXObject *, FXSelector, void *)
long onCmdPreDef(FXObject *, FXSelector, void *)
virtual ~GUIManip_Calibrator()
Destructor.
long onUpdUserDef(FXObject *, FXSelector, void *)
long onUpdPreDef(FXObject *, FXSelector, void *)
Changes the speed allowed on a set of lanes (gui version)
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
MSCalibrator * myCalibrator
the calibrator being wrapped
std::vector< double > RotCont
Definition of a rotation container.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
RotCont myFGRotations
The rotations in full-geometry mode.
PosCont myFGPositions
The positions in full-geometry mode.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Boundary myBoundary
The boundary of this rerouter.
std::vector< Position > PosCont
Definition of a positions container.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
The popup menu of a globject.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
ComboBox with icon.
Calibrates the flow on a segment to a specified one.