57 #ifdef CHECK_MEMORY_LEAKS
59 #endif // CHECK_MEMORY_LEAKS
106 myChosenTarget(myChosenValue, NULL, MID_OPTION),
109 mySpeedTarget(mySpeed),
111 myChosenTarget.setTarget(
this);
112 FXVerticalFrame* f1 =
113 new FXVerticalFrame(
this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
115 FXGroupBox* gp =
new FXGroupBox(f1,
"Change Speed",
116 GROUPBOX_TITLE_LEFT | FRAME_RIDGE,
117 0, 0, 0, 0, 4, 4, 1, 1, 2, 0);
122 new FXRadioButton(gf1,
"Default", &myChosenTarget, FXDataTarget::ID_OPTION + 0,
123 ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
124 0, 0, 0, 0, 2, 2, 0, 0);
130 new FXRadioButton(gf0,
"Loaded", &myChosenTarget, FXDataTarget::ID_OPTION + 1,
131 ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP,
132 0, 0, 0, 0, 2, 2, 0, 0);
138 new FXRadioButton(gf2,
"Predefined: ", &myChosenTarget, FXDataTarget::ID_OPTION + 2,
139 ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y,
140 0, 0, 0, 0, 2, 2, 0, 0);
142 new FXComboBox(gf2, 10,
this, MID_PRE_DEF,
143 ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y | COMBOBOX_STATIC);
144 myPredefinedValues->appendItem(
"20 km/h");
145 myPredefinedValues->appendItem(
"40 km/h");
146 myPredefinedValues->appendItem(
"60 km/h");
147 myPredefinedValues->appendItem(
"80 km/h");
148 myPredefinedValues->appendItem(
"100 km/h");
149 myPredefinedValues->appendItem(
"120 km/h");
150 myPredefinedValues->appendItem(
"140 km/h");
151 myPredefinedValues->appendItem(
"160 km/h");
152 myPredefinedValues->appendItem(
"180 km/h");
153 myPredefinedValues->appendItem(
"200 km/h");
154 myPredefinedValues->setNumVisible(5);
160 new FXRadioButton(gf12,
"Free Entry: ", &myChosenTarget, FXDataTarget::ID_OPTION + 3,
161 ICON_BEFORE_TEXT | LAYOUT_SIDE_TOP | LAYOUT_CENTER_Y,
162 0, 0, 0, 0, 2, 2, 0, 0);
165 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
166 myUserDefinedSpeed->setFormatString(
"%.0f km/h");
167 myUserDefinedSpeed->setIncrements(1, 10, 10);
168 myUserDefinedSpeed->setRange(0, 300);
169 myUserDefinedSpeed->setValue(0);
173 BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
200 myChosenValue != 3 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
202 myParent->updateChildren();
219 myChosenValue != 2 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
221 myParent->updateChildren();
274 *myApplication, *myParent);
284 const std::string& aXMLFilename,
285 const std::string& outputFilename,
287 MSCalibrator(id, edge, pos, aXMLFilename, outputFilename, freq),
290 const std::vector<MSLane*>& destLanes = edge->
getLanes();
293 for (std::vector<MSLane*>::const_iterator i = destLanes.begin(); i != destLanes.end(); ++i) {
339 const std::string nextStart =
343 ret->
mkItem(
"inactive until",
false, nextStart);
354 std::string flow =
"-";
355 std::string speed =
"-";
368 glTranslated(pos.
x(), pos.
y(),
getType());
369 glRotated(rot, 0, 0, 1);
372 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
374 glBegin(GL_TRIANGLES);
375 glColor3d(1, .8f, 0);
377 glVertex2d(0 - 1.4, 0);
378 glVertex2d(0 - 1.4, 6);
379 glVertex2d(0 + 1.4, 6);
380 glVertex2d(0 + 1.4, 0);
381 glVertex2d(0 - 1.4, 0);
382 glVertex2d(0 + 1.4, 6);
387 glTranslated(0, 0, .1);
392 glRotated(180, 0, 1, 0);
393 glTranslated(-w / 2., 2, 0);
395 glTranslated(w / 2., -2, 0);
401 glTranslated(-w / 2., 4, 0);
403 glTranslated(w / 2., -4, 0);
408 glTranslated(-w / 2., 5, 0);
410 glTranslated(-w / 2., -5, 0);
int pfDrawString(const char *c)
Changes the speed allowed on a set of lanes (gui version)
Position positionAtOffset(SUMOReal pos) const
Returns the position at the given length.
GUIVisualizationTextSettings addName
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
GUICalibrator(const std::string &id, MSEdge *edge, SUMOReal pos, const std::string &aXMLFilename, const std::string &outputFilename, const SUMOTime freq)
Constructor.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Stores the information about how to visualize structures.
std::string time2string(SUMOTime t)
void pfSetPosition(SUMOReal x, SUMOReal y)
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
long onCmdChangeOption(FXObject *, FXSelector, void *)
SUMOReal x() const
Returns the x-position.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used, also builds an entry for copying the geo-position.
long onUpdPreDef(FXObject *, FXSelector, void *)
GUIGlID getGlID() const
Returns the numerical id of the object.
A class that stores a 2D geometrical boundary.
FXDEFMAP(GUIDialog_AppSettings) GUIDialog_AppSettingsMap[]
SUMOReal scale
information about a lane's width (temporary, used for a single view)
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
A road/street connecting two junctions.
GUICalibratorPopupMenuMap[]
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual ~GUIManip_Calibrator()
Destructor.
float addExaggeration
The additional structures exaggeration (upscale)
std::vector< AspiredState >::const_iterator myCurrentStateInterval
Iterator pointing to the current interval.
Boundary myBoundary
The boundary of this rerouter.
A point in 2D or 3D with translation and scaling methods.
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.
std::vector< AspiredState > myIntervals
List of adaptation intervals.
void drawName(const Position &pos, const SUMOReal scale, const GUIVisualizationTextSettings &settings, const SUMOReal angle=0) const
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
long onCmdClose(FXObject *, FXSelector, void *)
SUMOReal rotationDegreeAtOffset(SUMOReal pos) const
Returns the rotation at the given length.
void add(SUMOReal x, SUMOReal y)
Makes the boundary include the given coordinate.
Boundary & grow(SUMOReal by)
extends the boundary by the given amount
void pfSetScale(SUMOReal s)
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
PosCont myFGPositions
The positions in full-geometry mode.
SUMOReal y() const
Returns the y-position.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
SUMOReal pfdkGetStringWidth(const char *c)
Calibrates the flow on a segment to a specified one.
long onCmdUserDef(FXObject *, FXSelector, void *)
long onUpdUserDef(FXObject *, FXSelector, void *)
int totalWished() const
number of vehicles expected to pass this interval
const std::string & getFullName() const
Returns the full name appearing in the tool tip.
void mkItem(const char *name, bool dynamic, ValueSource< unsigned > *src)
Adds a row which obtains its value from an unsigned-ValueSource.
void closeBuilding()
Closes the building of the table.
A window containing a gl-object's parameter.
SUMOReal myDefaultSpeed
The default (maximum) speed on the segment.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
Open the object's manipulator.