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-2025 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
53
54
63
72
74 double getExaggeration(const GUIVisualizationSettings& s) const override;
75
81 Boundary getCenteringBoundary() const override;
82
87 void drawGL(const GUIVisualizationSettings& s) const override;
89
91
92public:
94 FXDECLARE(GUICalibratorPopupMenu)
95 public:
96
98
100
102 long onCmdOpenManip(FXObject*, FXSelector, void*);
103
104 protected:
106
107 };
108
110 FXDECLARE(GUIManip_Calibrator)
111 public:
112 enum {
113 MID_USER_DEF = FXDialogBox::ID_LAST,
117 ID_LAST
118 };
121 const std::string& name, GUICalibrator& o,
122 int xpos, int ypos);
123
125 virtual ~GUIManip_Calibrator();
126
127 long onCmdOverride(FXObject*, FXSelector, void*);
128 long onCmdClose(FXObject*, FXSelector, void*);
129 long onCmdUserDef(FXObject*, FXSelector, void*);
130 long onUpdUserDef(FXObject*, FXSelector, void*);
131 long onCmdPreDef(FXObject*, FXSelector, void*);
132 long onUpdPreDef(FXObject*, FXSelector, void*);
133 long onCmdChangeOption(FXObject*, FXSelector, void*);
134
135 private:
137
139
140 FXDataTarget myChosenTarget;
141
142 double mySpeed;
143
144 FXDataTarget mySpeedTarget;
145
146 FXRealSpinner* myUserDefinedSpeed;
147
149
151
152 protected:
154
155 };
156
157private:
159 typedef std::vector<Position> PosCont;
160
162 typedef std::vector<double> RotCont;
163
166
169
172
175
178
179};
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.
Boundary getCenteringBoundary() const override
Returns the boundary to which the view shall be centered in order to show the object.
MSCalibrator * myCalibrator
the calibrator being wrapped
double getExaggeration(const GUIVisualizationSettings &s) const override
return exaggeration associated with this GLObject
std::vector< double > RotCont
Definition of a rotation container.
RotCont myFGRotations
The rotations in full-geometry mode.
PosCont myFGPositions
The positions in full-geometry mode.
void drawGL(const GUIVisualizationSettings &s) const override
Draws the object.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own popup-menu.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Boundary myBoundary
The boundary of this rerouter.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
std::vector< Position > PosCont
Definition of a positions container.
The popup menu of a globject.
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
Calibrates the flow on a segment to a specified one.