Eclipse SUMO - Simulation of Urban MObility
GNECalibratorFlowDialog.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2020 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 /****************************************************************************/
18 // Dialog for edit calibrator flows
19 /****************************************************************************/
20 #include <config.h>
21 
25 #include <netedit/GNEViewNet.h>
26 #include <netedit/GNENet.h>
27 
28 #include <netedit/GNEUndoList.h>
29 
31 
32 
33 // ===========================================================================
34 // FOX callback mapping
35 // ===========================================================================
36 
37 FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[] = {
42 };
43 
44 // Object implementation
45 FXIMPLEMENT(GNECalibratorFlowDialog, GNEAdditionalDialog, GNECalibratorFlowDialogMap, ARRAYNUMBER(GNECalibratorFlowDialogMap))
46 
47 // ===========================================================================
48 // member method definitions
49 // ===========================================================================
50 
51 GNECalibratorFlowDialog::GNECalibratorFlowDialog(GNEAdditional* editedCalibratorFlow, bool updatingElement) :
52  GNEAdditionalDialog(editedCalibratorFlow, updatingElement, 600, 280),
53  myCalibratorFlowValid(false),
54  myInvalidAttr(SUMO_ATTR_VEHSPERHOUR) {
55  // change default header
56  std::string typeOfOperation = updatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for ";
57  changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() + " '" + myEditedAdditional->getParentAdditionals().at(0)->getID() + "'");
58 
59  // Create auxiliar frames for tables
60  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
61  FXVerticalFrame* columnLeftLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
62  FXVerticalFrame* columnLeftValue = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
63  FXVerticalFrame* columnRightLabel = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
64  FXVerticalFrame* columnRightValue = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
65 
66  // 1 create combobox for type
67  new FXLabel(columnLeftLabel, toString(SUMO_TAG_VTYPE).c_str(), nullptr, GUIDesignLabelThick);
68  myComboBoxVehicleType = new FXComboBox(columnLeftValue, GUIDesignComboBoxNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
69  // 2 create combobox for route
70  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ROUTE).c_str(), nullptr, GUIDesignLabelThick);
71  myComboBoxRoute = new FXComboBox(columnLeftValue, GUIDesignComboBoxNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignComboBox);
72  // 3 create textfield for vehs per hour
73  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_VEHSPERHOUR).c_str(), nullptr, GUIDesignLabelThick);
74  myTextFieldVehsPerHour = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
75  myTextFieldVehsPerHour->setTextColor(FXRGB(255, 0, 0));
76  // 4 create textfield for vehs per hour
77  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_SPEED).c_str(), nullptr, GUIDesignLabelThick);
78  myTextFieldSpeed = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
79  myTextFieldSpeed->setTextColor(FXRGB(255, 0, 0));
80  // 5 create textfield for color
81  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_COLOR).c_str(), nullptr, GUIDesignLabelThick);
82  myTextFieldColor = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
83  // 6 create textfield for lane
84  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTLANE).c_str(), nullptr, GUIDesignLabelThick);
85  myTextFieldDepartLane = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
86  // 7 create textfield for pos
87  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTPOS).c_str(), nullptr, GUIDesignLabelThick);
88  myTextFieldDepartPos = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
89  // 8 create textfield for speed
90  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_DEPARTSPEED).c_str(), nullptr, GUIDesignLabelThick);
91  myTextFieldDepartSpeed = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
92  // 9 create textfield for lane
93  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ARRIVALLANE).c_str(), nullptr, GUIDesignLabelThick);
94  myTextFieldArrivalLane = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
95  // 10 create textfield for arrival pos
96  new FXLabel(columnLeftLabel, toString(SUMO_ATTR_ARRIVALPOS).c_str(), nullptr, GUIDesignLabelThick);
97  myTextFieldArrivalPos = new FXTextField(columnLeftValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
98  // 11 create textfield for arrival speed
99  new FXLabel(columnRightLabel, toString(SUMO_ATTR_ARRIVALSPEED).c_str(), nullptr, GUIDesignLabelThick);
100  myTextFieldArrivalSpeed = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
101  // 12 create textfield for arrival line
102  new FXLabel(columnRightLabel, toString(SUMO_ATTR_LINE).c_str(), nullptr, GUIDesignLabelThick);
103  myTextFieldLine = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
104  // 13 create textfield for person number
105  new FXLabel(columnRightLabel, toString(SUMO_ATTR_PERSON_NUMBER).c_str(), nullptr, GUIDesignLabelThick);
106  myTextFieldPersonNumber = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
107  // 14 create textfield for container number
108  new FXLabel(columnRightLabel, toString(SUMO_ATTR_CONTAINER_NUMBER).c_str(), nullptr, GUIDesignLabelThick);
109  myTextFieldContainerNumber = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
110  // 15 create textfield for reroute
111  new FXLabel(columnRightLabel, toString(SUMO_ATTR_REROUTE).c_str(), nullptr, GUIDesignLabelThick);
112  myRerouteCheckButton = new FXCheckButton(columnRightValue, "false", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
113  // 16 create textfield for depart pos lat
114  new FXLabel(columnRightLabel, toString(SUMO_ATTR_DEPARTPOS_LAT).c_str(), nullptr, GUIDesignLabelThick);
115  myTextFieldDepartPosLat = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
116  // 17 create textfield for arrival pos lat
117  new FXLabel(columnRightLabel, toString(SUMO_ATTR_ARRIVALPOS_LAT).c_str(), nullptr, GUIDesignLabelThick);
118  myTextFieldArrivalPosLat = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
119  // 18 create textfield for begin
120  new FXLabel(columnRightLabel, toString(SUMO_ATTR_BEGIN).c_str(), nullptr, GUIDesignLabelThick);
121  myTextFieldBegin = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
122  // 19 create textfield for end
123  new FXLabel(columnRightLabel, toString(SUMO_ATTR_END).c_str(), nullptr, GUIDesignLabelThick);
124  myTextFieldEnd = new FXTextField(columnRightValue, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
125 
126  // fill comboBox of VTypes
127  for (auto i : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE)) {
128  myComboBoxVehicleType->appendItem(i.first.c_str());
129  }
130  myComboBoxVehicleType->setNumVisible((int)myComboBoxVehicleType->getNumItems());
131 
132  // fill comboBox of Routes
133  for (auto i : myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE)) {
134  myComboBoxRoute->appendItem(i.first.c_str());
135  }
136  myComboBoxRoute->setNumVisible((int)myComboBoxRoute->getNumItems());
137 
138  // update tables
139  updateCalibratorFlowValues();
140 
141  // start a undo list for editing local to this additional
142  initChanges();
143 
144  // add element if we aren't updating an existent element
145  if (myUpdatingElement == false) {
146  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true);
147  }
148 
149  // open as modal dialog
150  openAsModalDialog();
151 }
152 
153 
155 
156 
157 long
158 GNECalibratorFlowDialog::onCmdAccept(FXObject*, FXSelector, void*) {
159  std::string operation1 = myUpdatingElement ? ("updating") : ("creating");
160  std::string operation2 = myUpdatingElement ? ("updated") : ("created");
161  std::string parentTagString = myEditedAdditional->getParentAdditionals().at(0)->getTagStr();
162  std::string tagString = myEditedAdditional->getTagStr();
163  if (myCalibratorFlowValid == false) {
164  // write warning if netedit is running in testing mode
165  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
166  // open warning dialog box
167  FXMessageBox::warning(getApp(), MBOX_OK,
168  ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s",
169  (parentTagString + "'s " + tagString + " cannot be " + operation2 +
170  " because parameter " + toString(myInvalidAttr) +
171  " is invalid.").c_str());
172  // write warning if netedit is running in testing mode
173  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
174  return 0;
175  } else if (!myEditedAdditional->getParentAdditionals().at(0)->checkChildAdditionalsOverlapping()) {
176  // write warning if netedit is running in testing mode
177  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
178  // open warning dialog box
179  FXMessageBox::warning(getApp(), MBOX_OK,
180  ("Error " + operation1 + " " + parentTagString + "'s " + tagString).c_str(), "%s",
181  (parentTagString + "'s " + tagString + " cannot be " + operation2 +
182  " because there is overlapping with another " + tagString + ".").c_str());
183  // write warning if netedit is running in testing mode
184  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
185  return 0;
186  } else {
187  // accept changes before closing dialog
188  acceptChanges();
189  // stop dialgo sucesfully
190  getApp()->stopModal(this, TRUE);
191  return 1;
192  }
193 }
194 
195 
196 long
197 GNECalibratorFlowDialog::onCmdCancel(FXObject*, FXSelector, void*) {
198  // cancel changes
199  cancelChanges();
200  // Stop Modal
201  getApp()->stopModal(this, FALSE);
202  return 1;
203 }
204 
205 
206 long
207 GNECalibratorFlowDialog::onCmdReset(FXObject*, FXSelector, void*) {
208  // reset changes
209  resetChanges();
210  // update tables
212  return 1;
213 }
214 
215 
216 long
217 GNECalibratorFlowDialog::onCmdSetVariable(FXObject*, FXSelector, void*) {
218  // At start we assumed, that all values are valid
219  myCalibratorFlowValid = true;
221  // get pointer to undo list (Only for code legilibity)
223  // set color of myComboBoxVehicleType, depending if current value is valid or not
225  myComboBoxVehicleType->setTextColor(FXRGB(0, 0, 0));
227  } else {
228  myComboBoxVehicleType->setTextColor(FXRGB(255, 0, 0));
229  myCalibratorFlowValid = false;
231  }
232  // set color of myComboBoxRoute, depending if current value is valid or not
233  if (myEditedAdditional->isValid(SUMO_ATTR_ROUTE, myComboBoxRoute->getText().text())) {
234  myComboBoxRoute->setTextColor(FXRGB(0, 0, 0));
235  myEditedAdditional->setAttribute(SUMO_ATTR_ROUTE, myComboBoxRoute->getText().text(), undoList);
236  } else {
237  myComboBoxRoute->setTextColor(FXRGB(255, 0, 0));
238  myCalibratorFlowValid = false;
240  }
241  // set color of myTextFieldVehsPerHour, depending if current value is valid or not
243  myTextFieldVehsPerHour->setTextColor(FXRGB(0, 0, 0));
245  } else {
246  myTextFieldVehsPerHour->setTextColor(FXRGB(255, 0, 0));
247  myCalibratorFlowValid = false;
249  }
250  // set color of myTextFieldSpeed, depending if current value is valid or not
251  if (myEditedAdditional->isValid(SUMO_ATTR_SPEED, myTextFieldSpeed->getText().text())) {
252  myTextFieldSpeed->setTextColor(FXRGB(0, 0, 0));
253  myEditedAdditional->setAttribute(SUMO_ATTR_SPEED, myTextFieldSpeed->getText().text(), undoList);
254  // Check VehsPerHour again
256  myTextFieldVehsPerHour->setTextColor(FXRGB(0, 0, 0));
259  myCalibratorFlowValid = true;
261  }
262  }
263  } else {
264  myTextFieldSpeed->setTextColor(FXRGB(255, 0, 0));
265  myCalibratorFlowValid = false;
267  }
268  // set color of myTextFieldColor, depending if current value is valid or not
269  if (myEditedAdditional->isValid(SUMO_ATTR_COLOR, myTextFieldColor->getText().text())) {
270  myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
271  myEditedAdditional->setAttribute(SUMO_ATTR_COLOR, myTextFieldColor->getText().text(), undoList);
272  } else {
273  myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
274  myCalibratorFlowValid = false;
276  }
277  // set color of myTextFieldDepartLane, depending if current value is valid or not
279  myTextFieldDepartLane->setTextColor(FXRGB(0, 0, 0));
281  } else {
282  myTextFieldDepartLane->setTextColor(FXRGB(255, 0, 0));
283  myCalibratorFlowValid = false;
285  }
286  // set color of myTextFieldDepartPos, depending if current value is valid or not
288  myTextFieldDepartPos->setTextColor(FXRGB(0, 0, 0));
290  } else {
291  myTextFieldDepartPos->setTextColor(FXRGB(255, 0, 0));
292  myCalibratorFlowValid = false;
294  }
295  // set color of setDepartSpeed, depending if current value is valid or not
297  myTextFieldDepartSpeed->setTextColor(FXRGB(0, 0, 0));
299  } else {
300  myTextFieldDepartSpeed->setTextColor(FXRGB(255, 0, 0));
301  myCalibratorFlowValid = false;
303  }
304  // set color of myTextFieldArrivalLane, depending if current value is valid or not
306  myTextFieldArrivalLane->setTextColor(FXRGB(0, 0, 0));
308  } else {
309  myTextFieldArrivalLane->setTextColor(FXRGB(255, 0, 0));
310  myCalibratorFlowValid = false;
312  }
313  // set color of myTextFieldArrivalPos, depending if current value is valid or not
315  myTextFieldArrivalPos->setTextColor(FXRGB(0, 0, 0));
317  } else {
318  myTextFieldArrivalPos->setTextColor(FXRGB(255, 0, 0));
319  myCalibratorFlowValid = false;
321  }
322  // set color of setArrivalSpeed, depending if current value is valid or not
324  myTextFieldArrivalSpeed->setTextColor(FXRGB(0, 0, 0));
326  } else {
327  myTextFieldArrivalSpeed->setTextColor(FXRGB(255, 0, 0));
328  myCalibratorFlowValid = false;
330  }
331  // set color of myTextFieldLine, depending if current value is valid or not
332  if (myEditedAdditional->isValid(SUMO_ATTR_LINE, myTextFieldLine->getText().text())) {
333  myTextFieldLine->setTextColor(FXRGB(0, 0, 0));
334  myEditedAdditional->setAttribute(SUMO_ATTR_LINE, myTextFieldLine->getText().text(), undoList);
335  } else {
336  myTextFieldLine->setTextColor(FXRGB(255, 0, 0));
337  myCalibratorFlowValid = false;
339  }
340  // set color of myTextFieldPersonNumber, depending if current value is valid or not
342  myTextFieldPersonNumber->setTextColor(FXRGB(0, 0, 0));
344  } else {
345  myTextFieldPersonNumber->setTextColor(FXRGB(255, 0, 0));
346  myCalibratorFlowValid = false;
348  }
349  // set color of myTextFieldContainerNumber, depending if current value is valid or not
351  myTextFieldContainerNumber->setTextColor(FXRGB(0, 0, 0));
353  } else {
354  myTextFieldContainerNumber->setTextColor(FXRGB(255, 0, 0));
355  myCalibratorFlowValid = false;
357  }
358  // set reroute
359  if (myRerouteCheckButton->getCheck()) {
361  myRerouteCheckButton->setText("true");
362  } else {
364  myRerouteCheckButton->setText("false");
365  }
366  // set color of myTextFieldDepartPosLat, depending if current value is valid or not
368  myTextFieldDepartPosLat->setTextColor(FXRGB(0, 0, 0));
370  } else {
371  myTextFieldDepartPosLat->setTextColor(FXRGB(255, 0, 0));
372  myCalibratorFlowValid = false;
374  }
375  // set color of myTextFieldArrivalPosLat, depending if current value is valid or not
377  myTextFieldArrivalPosLat->setTextColor(FXRGB(0, 0, 0));
379  } else {
380  myTextFieldArrivalPosLat->setTextColor(FXRGB(255, 0, 0));
381  myCalibratorFlowValid = false;
383  }
384  // set color of myTextFieldBegin, depending if current value is valid or not
385  if (myEditedAdditional->isValid(SUMO_ATTR_BEGIN, myTextFieldBegin->getText().text())) {
386  myTextFieldBegin->setTextColor(FXRGB(0, 0, 0));
387  myEditedAdditional->setAttribute(SUMO_ATTR_BEGIN, myTextFieldBegin->getText().text(), undoList);
388  } else {
389  myTextFieldBegin->setTextColor(FXRGB(255, 0, 0));
390  myCalibratorFlowValid = false;
392  }
393  // set color of myTextFieldEnd, depending if current value is valid or not
394  if (myEditedAdditional->isValid(SUMO_ATTR_END, myTextFieldEnd->getText().text())) {
395  myTextFieldEnd->setTextColor(FXRGB(0, 0, 0));
396  myEditedAdditional->setAttribute(SUMO_ATTR_END, myTextFieldEnd->getText().text(), undoList);
397  } else {
398  myTextFieldEnd->setTextColor(FXRGB(255, 0, 0));
399  myCalibratorFlowValid = false;
401  }
402  return 1;
403 }
404 
405 
406 void
408  // update fields
423  myRerouteCheckButton->setCheck(GNEAttributeCarrier::parse<bool>(myEditedAdditional->getAttribute(SUMO_ATTR_REROUTE).c_str()));
428 }
429 
430 
431 /****************************************************************************/
FXDEFMAP(GNECalibratorFlowDialog) GNECalibratorFlowDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:717
@ MID_GNE_BUTTON_CANCEL
cancel button
Definition: GUIAppEnum.h:1094
@ MID_GNE_BUTTON_RESET
reset button
Definition: GUIAppEnum.h:1096
@ MID_GNE_BUTTON_ACCEPT
accept button
Definition: GUIAppEnum.h:1092
#define GUIDesignComboBox
Definition: GUIDesigns.h:237
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:255
#define GUIDesignTextField
Definition: GUIDesigns.h:36
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:54
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:319
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:133
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
Definition: GUIDesigns.h:184
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
Definition: GUIDesigns.h:310
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:286
@ SUMO_TAG_VTYPE
description of a vehicle type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_ATTR_ARRIVALSPEED
@ SUMO_ATTR_ARRIVALLANE
@ SUMO_ATTR_VEHSPERHOUR
@ SUMO_ATTR_SPEED
@ SUMO_ATTR_DEPARTPOS_LAT
@ SUMO_ATTR_ARRIVALPOS
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_CONTAINER_NUMBER
@ SUMO_ATTR_LINE
@ SUMO_ATTR_DEPARTPOS
@ SUMO_ATTR_REROUTE
@ SUMO_ATTR_DEPARTSPEED
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_DEPARTLANE
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_PERSON_NUMBER
@ SUMO_ATTR_COLOR
A color information.
@ SUMO_ATTR_ARRIVALPOS_LAT
@ SUMO_ATTR_NOTHING
invalid attribute
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:44
Dialog to edit sequences, parameters, etc.. of Additionals.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited aditional
void resetChanges()
reset changes did in this dialog.
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:47
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
Dialog for edit rerouter intervals.
FXTextField * myTextFieldPersonNumber
TextField for PersonNumber.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myTextFieldDepartPos
TextField for Depart Pos.
long onCmdSetVariable(FXObject *, FXSelector, void *)
event after change value
long onCmdAccept(FXObject *, FXSelector, void *)
FXTextField * myTextFieldVehsPerHour
TextField for VehsPerHour.
FXTextField * myTextFieldEnd
TextField for End.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTextField * myTextFieldColor
TextField for Color.
FXComboBox * myComboBoxRoute
TextField for Route.
FXTextField * myTextFieldBegin
TextField for Begin.
FXTextField * myTextFieldArrivalSpeed
TextField for Arrival Speed.
FXTextField * myTextFieldArrivalLane
TextField for Arrival Lane.
SumoXMLAttr myInvalidAttr
current sumo attribute invalid
FXTextField * myTextFieldDepartPosLat
TextField for DepartPosLat.
FXTextField * myTextFieldLine
TextField for Line.
FXTextField * myTextFieldDepartSpeed
TextField for Depart Speed.
FXTextField * myTextFieldDepartLane
TextField for Depart Lane.
FXTextField * myTextFieldContainerNumber
TextField for Container Number.
FXTextField * myTextFieldArrivalPosLat
TextField for ArrivalPosLat.
FXTextField * myTextFieldSpeed
TextField for Speed.
FXTextField * myTextFieldArrivalPos
TextField for Arrival Pos.
FXComboBox * myComboBoxVehicleType
ComboBox for Type.
FXCheckButton * myRerouteCheckButton
checkButton for Reroute
void updateCalibratorFlowValues()
update data fields
bool myCalibratorFlowValid
flag to check if current calibrator flow is valid
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:2245
GNEUndoList * getUndoList() const
get the undoList object