SUMO - Simulation of Urban MObility
GNERerouterIntervalDialog.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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // Dialog for edit rerouter intervals
16 /****************************************************************************/
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
23 #include <iostream>
37 #include <netedit/GNEViewNet.h>
38 #include <netedit/GNENet.h>
39 #include <netedit/GNEUndoList.h>
40 
42 #include "GNERerouterDialog.h"
43 
44 
45 // ===========================================================================
46 // FOX callback mapping
47 // ===========================================================================
48 
49 FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[] = {
50  // called when user click over buttons
56 
57  // clicked table (Double and triple clicks allow to remove element more fast)
73 
74  // use "update" instead of "command" to avoid problems mit icons
81 };
82 
83 // Object implementation
84 FXIMPLEMENT(GNERerouterIntervalDialog, GNEAdditionalDialog, GNERerouterIntervalDialogMap, ARRAYNUMBER(GNERerouterIntervalDialogMap))
85 
86 // ===========================================================================
87 // member method definitions
88 // ===========================================================================
89 
90 GNERerouterIntervalDialog::GNERerouterIntervalDialog(GNEAdditional* rerouterInterval, bool updatingElement) :
91  GNEAdditionalDialog(rerouterInterval, updatingElement, 960, 480),
92  myBeginEndValid(true),
93  myClosingLaneReroutesValid(true),
94  myClosingReroutesValid(true),
95  myDestProbReroutesValid(true),
96  myParkingAreaReroutesValid(true),
97  myRouteProbReroutesValid(true) {
98  // fill closing Reroutes
99  for (auto i : myEditedAdditional->getAdditionalChilds()) {
100  if (i->getTagProperty().getTag() == SUMO_TAG_CLOSING_REROUTE) {
101  myClosingReroutesEdited.push_back(i);
102  }
103  }
104  // fill closing Lane Reroutes
105  for (auto i : myEditedAdditional->getAdditionalChilds()) {
106  if (i->getTagProperty().getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) {
107  myClosingLaneReroutesEdited.push_back(i);
108  }
109  }
110  // fill Dest Prob Reroutes
111  for (auto i : myEditedAdditional->getAdditionalChilds()) {
112  if (i->getTagProperty().getTag() == SUMO_TAG_DEST_PROB_REROUTE) {
113  myDestProbReroutesEdited.push_back(i);
114  }
115  }
116  // fill Route Prob Reroutes
117  for (auto i : myEditedAdditional->getAdditionalChilds()) {
118  if (i->getTagProperty().getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) {
119  myRouteProbReroutesEdited.push_back(i);
120  }
121  }
122  // fill Parking Area reroutes
123  for (auto i : myEditedAdditional->getAdditionalChilds()) {
124  if (i->getTagProperty().getTag() == SUMO_TAG_PARKING_ZONE_REROUTE) {
125  myParkingAreaRerouteEdited.push_back(i);
126  }
127  }
128  // change default header
129  std::string typeOfOperation = myUpdatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for ";
130  changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getFirstAdditionalParent()->getTagStr() + " '" + myEditedAdditional->getFirstAdditionalParent()->getID() + "'");
131 
132  // Create auxiliar frames for tables
133  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
134  FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
135  FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
136  FXVerticalFrame* columnRight2 = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
137 
138  // create horizontal frame for begin and end label
139  FXHorizontalFrame* beginEndElementsLeft = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
140  new FXLabel(beginEndElementsLeft, (toString(SUMO_ATTR_BEGIN) + " and " + toString(SUMO_ATTR_END) + " of " + myEditedAdditional->getTagStr()).c_str(), nullptr, GUIDesignLabelLeftThick);
141  myCheckLabel = new FXLabel(beginEndElementsLeft, "", GUIIconSubSys::getIcon(ICON_CORRECT), GUIDesignLabelIcon32x32Thicked);
142 
143  // create horizontal frame for begin and end text fields
144  FXHorizontalFrame* beginEndElementsRight = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
145  myBeginTextField = new FXTextField(beginEndElementsRight, GUIDesignTextFieldNCol, this, MID_GNE_REROUTEDIALOG_EDIT_INTERVAL, GUIDesignTextFieldReal);
146  myBeginTextField->setText(toString(myEditedAdditional->getAttribute(SUMO_ATTR_BEGIN)).c_str());
147  myEndTextField = new FXTextField(beginEndElementsRight, GUIDesignTextFieldNCol, this, MID_GNE_REROUTEDIALOG_EDIT_INTERVAL, GUIDesignTextFieldReal);
148  myEndTextField->setText(toString(myEditedAdditional->getAttribute(SUMO_ATTR_END)).c_str());
149 
150  // Create labels and tables
151  FXHorizontalFrame* buttonAndLabelClosingLaneReroute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
152  myAddClosingLaneReroutes = new FXButton(buttonAndLabelClosingLaneReroute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_REROUTEDIALOG_ADD_CLOSINGLANEREROUTE, GUIDesignButtonIcon);
153  new FXLabel(buttonAndLabelClosingLaneReroute, ("Add new " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
154  myClosingLaneRerouteTable = new FXTable(columnLeft, this, MID_GNE_REROUTEDIALOG_TABLE_CLOSINGLANEREROUTE, GUIDesignTableAdditionals);
155  myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
156  myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
157 
158  FXHorizontalFrame* buttonAndLabelClosinReroute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
159  myAddClosingReroutes = new FXButton(buttonAndLabelClosinReroute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_REROUTEDIALOG_ADD_CLOSINGREROUTE, GUIDesignButtonIcon);
160  new FXLabel(buttonAndLabelClosinReroute, ("Add new " + toString(SUMO_TAG_CLOSING_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
161  myClosingRerouteTable = new FXTable(columnLeft, this, MID_GNE_REROUTEDIALOG_TABLE_CLOSINGREROUTE, GUIDesignTableAdditionals);
162  myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
163  myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
164 
165  FXHorizontalFrame* buttonAndLabelDestProbReroute = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
166  myAddDestProbReroutes = new FXButton(buttonAndLabelDestProbReroute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_REROUTEDIALOG_ADD_DESTPROBREROUTE, GUIDesignButtonIcon);
167  new FXLabel(buttonAndLabelDestProbReroute, ("Add new " + toString(SUMO_TAG_DEST_PROB_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
168  myDestProbRerouteTable = new FXTable(columnRight, this, MID_GNE_REROUTEDIALOG_TABLE_DESTPROBREROUTE, GUIDesignTableAdditionals);
169  myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
170  myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
171 
172  FXHorizontalFrame* buttonAndLabelRouteProbReroute = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
173  myAddRouteProbReroute = new FXButton(buttonAndLabelRouteProbReroute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_REROUTEDIALOG_ADD_ROUTEPROBREROUTE, GUIDesignButtonIcon);
174  FXLabel* routeProbRerouteLabel = new FXLabel(buttonAndLabelRouteProbReroute, ("Add new " + toString(SUMO_TAG_ROUTE_PROB_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
175  myRouteProbRerouteTable = new FXTable(columnRight, this, MID_GNE_REROUTEDIALOG_TABLE_ROUTEPROBREROUTE, GUIDesignTableAdditionals);
176  myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
177  myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
178 
179  FXHorizontalFrame* buttonAndLabelParkingAreaReroute = new FXHorizontalFrame(columnRight2, GUIDesignAuxiliarHorizontalFrame);
180  FXButton* parkingAreaRerouteButton = myAddParkingAreaReroute = new FXButton(buttonAndLabelParkingAreaReroute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_REROUTEDIALOG_ADD_PARKINGAREAREROUTE, GUIDesignButtonIcon);
181  FXLabel* parkingAreaRerouteLabel = new FXLabel(buttonAndLabelParkingAreaReroute, ("Add new " + toString(SUMO_TAG_PARKING_ZONE_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
182  myParkingAreaRerouteTable = new FXTable(columnRight2, this, MID_GNE_REROUTEDIALOG_TABLE_PARKINGAREAREROUTE, GUIDesignTableAdditionals);
183  myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
184  myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
185 
186  // disable add parkingAreaReroute Button and change label if there isn't parkingAreas in net
187  if (rerouterInterval->getViewNet()->getNet()->getAdditionalByType(SUMO_TAG_PARKING_AREA).size() == 0) {
188  parkingAreaRerouteButton->disable();
189  parkingAreaRerouteLabel->setText(("There isn't " + toString(SUMO_TAG_PARKING_AREA) + "s in net").c_str());
190  }
191 
192  // disable add routeProbReroute Button and change label if the rerouter has multiple edges (random routes can only work from one edge)
193  if (rerouterInterval->getFirstAdditionalParent()->getEdgeChilds().size() > 1) {
194  myAddRouteProbReroute->disable();
195  routeProbRerouteLabel->setText("Rerouter has more than one edge");
196  }
197 
198  // update tables
199  updateClosingLaneReroutesTable();
200  updateClosingReroutesTable();
201  updateDestProbReroutesTable();
202  updateRouteProbReroutesTable();
203  updateParkingAreaReroutesTable();
204 
205  // start a undo list for editing local to this additional
206  initChanges();
207 
208  // add element if we aren't updating an existent element
209  if (myUpdatingElement == false) {
210  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true);
211  }
212 
213  // Open as modal dialog
214  openAsModalDialog();
215 }
216 
217 
219 
220 
221 long
222 GNERerouterIntervalDialog::onCmdAccept(FXObject*, FXSelector, void*) {
223  // set strings for dialogs
224  std::string errorTitle = "Error" + toString(myUpdatingElement ? "updating" : "creating") + " " + myEditedAdditional->getTagStr() + " of " + myEditedAdditional->getFirstAdditionalParent()->getTagStr();
225  std::string operationType = myEditedAdditional->getFirstAdditionalParent()->getTagStr() + "'s " + myEditedAdditional->getTagStr() + " cannot be " + (myUpdatingElement ? "updated" : "created") + " because ";
226  if (myBeginEndValid == false) {
227  // write warning if netedit is running in testing mode
228  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
229  // open warning Box
230  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + myEditedAdditional->getTagStr() + " defined by " + toString(SUMO_ATTR_BEGIN) + " and " + toString(SUMO_ATTR_END) + " is invalid.").c_str());
231  // write warning if netedit is running in testing mode
232  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
233  return 0;
234  } else if (myClosingLaneReroutesEdited.empty() &&
235  myClosingReroutesEdited.empty() &&
236  myDestProbReroutesEdited.empty() &&
237  myParkingAreaRerouteEdited.empty() &&
238  myRouteProbReroutesEdited.empty()) {
239  // write warning if netedit is running in testing mode
240  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
241  // open warning Box
242  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "at least one " + myEditedAdditional->getTagStr() + "'s element must be defined.").c_str());
243  // write warning if netedit is running in testing mode
244  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
245  return 0;
246  } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingLaneReroutesValid == false)) {
247  // write warning if netedit is running in testing mode
248  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
249  // open warning Box
250  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + "s.").c_str());
251  // write warning if netedit is running in testing mode
252  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
253  return 0;
254  } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingReroutesValid == false)) {
255  // write warning if netedit is running in testing mode
256  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
257  // open warning Box
258  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_REROUTE) + "s.").c_str());
259  // write warning if netedit is running in testing mode
260  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
261  return 0;
262  } else if ((myDestProbReroutesEdited.size() > 0) && (myDestProbReroutesValid == false)) {
263  // write warning if netedit is running in testing mode
264  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
265  // open warning Box
266  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_PARKING_ZONE_REROUTE) + "s.").c_str());
267  // write warning if netedit is running in testing mode
268  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
269  return 0;
270  } else if ((myParkingAreaRerouteEdited.size() > 0) && (myParkingAreaReroutesValid == false)) {
271  // write warning if netedit is running in testing mode
272  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
273  // open warning Box
274  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_DEST_PROB_REROUTE) + "s.").c_str());
275  // write warning if netedit is running in testing mode
276  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
277  return 0;
278  } else if ((myRouteProbReroutesEdited.size() > 0) && (myRouteProbReroutesValid == false)) {
279  // write warning if netedit is running in testing mode
280  WRITE_DEBUG("Opening FXMessageBox of type 'warning'");
281  // open warning Box
282  FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_ROUTE_PROB_REROUTE) + "s.").c_str());
283  // write warning if netedit is running in testing mode
284  WRITE_DEBUG("Closed FXMessageBox of type 'warning' with 'OK'");
285  return 0;
286  } else {
287  // accept changes before closing dialog
288  acceptChanges();
289  // Stop Modal
290  getApp()->stopModal(this, TRUE);
291  return 1;
292  }
293 }
294 
295 
296 long
297 GNERerouterIntervalDialog::onCmdCancel(FXObject*, FXSelector, void*) {
298  // cancel changes
299  cancelChanges();
300  // Stop Modal
301  getApp()->stopModal(this, FALSE);
302  return 1;
303 }
304 
305 
306 long
307 GNERerouterIntervalDialog::onCmdReset(FXObject*, FXSelector, void*) {
308  // reset changes
309  resetChanges();
310  // update tables
315  return 1;
316 }
317 
318 
319 long
321  // create closing lane reroute
322  GNEClosingLaneReroute* closingLaneReroute = new GNEClosingLaneReroute(this);
323  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(closingLaneReroute, true), true);
324  myClosingLaneReroutesEdited.push_back(closingLaneReroute);
325  // update closing lane reroutes table
327  return 1;
328 }
329 
330 
331 long
333  // create closing reroute
334  GNEClosingReroute* closingReroute = new GNEClosingReroute(this);
335  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(closingReroute, true), true);
336  myClosingReroutesEdited.push_back(closingReroute);
337  // update closing reroutes table
339  return 1;
340 }
341 
342 
343 long
345  // create closing reroute and add it to table
346  GNEDestProbReroute* destProbReroute = new GNEDestProbReroute(this);
347  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(destProbReroute, true), true);
348  myDestProbReroutesEdited.push_back(destProbReroute);
349  // update dest Prob reroutes table
351  return 1;
352 }
353 
354 
355 long
357  // create route Prob Reroute
358  GNERouteProbReroute* routeProbReroute = new GNERouteProbReroute(this);
359  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(routeProbReroute, true), true);
360  myRouteProbReroutesEdited.push_back(routeProbReroute);
361  // update route prob reroutes table
363  return 1;
364 }
365 
366 
367 long
369  // create parkingAreaReroute and add it to table
370  GNEParkingAreaReroute* parkingAreaReroute = new GNEParkingAreaReroute(this);
371  myEditedAdditional->getViewNet()->getUndoList()->add(new GNEChange_Additional(parkingAreaReroute, true), true);
372  myParkingAreaRerouteEdited.push_back(parkingAreaReroute);
373  // update dest Prob reroutes table
375  return 1;
376 }
377 
378 
379 long
381  // check if some delete button was pressed
382  for (int i = 0; i < (int)myClosingLaneReroutesEdited.size(); i++) {
383  if (myClosingLaneRerouteTable->getItem(i, 4)->hasFocus()) {
384  myClosingLaneRerouteTable->removeRows(i);
388  return 1;
389  }
390  }
391  return 0;
392 }
393 
394 
395 long
397  // check if some delete button was pressed
398  for (int i = 0; i < (int)myClosingReroutesEdited.size(); i++) {
399  if (myClosingRerouteTable->getItem(i, 4)->hasFocus()) {
400  myClosingRerouteTable->removeRows(i);
404  return 1;
405  }
406  }
407  return 1;
408 }
409 
410 
411 long
413  // check if some delete button was pressed
414  for (int i = 0; i < (int)myDestProbReroutesEdited.size(); i++) {
415  if (myDestProbRerouteTable->getItem(i, 3)->hasFocus()) {
416  myDestProbRerouteTable->removeRows(i);
420  return 1;
421  }
422  }
423  return 0;
424 }
425 
426 
427 long
429  // check if some delete button was pressed
430  for (int i = 0; i < (int)myRouteProbReroutesEdited.size(); i++) {
431  if (myRouteProbRerouteTable->getItem(i, 3)->hasFocus()) {
432  myRouteProbRerouteTable->removeRows(i);
436  return 1;
437  }
438  }
439  return 0;
440 }
441 
442 
443 long
445  // check if some delete button was pressed
446  for (int i = 0; i < (int)myParkingAreaRerouteEdited.size(); i++) {
447  if (myParkingAreaRerouteTable->getItem(i, 3)->hasFocus()) {
448  ;
449  } else if (myParkingAreaRerouteTable->getItem(i, 4)->hasFocus()) {
450  myParkingAreaRerouteTable->removeRows(i);
454  return 1;
455  }
456  }
457  return 0;
458 }
459 
460 
461 long
464  // iterate over table and check that all parameters are correct
465  for (int i = 0; i < myClosingLaneRerouteTable->getNumRows(); i++) {
466  GNEAdditional* closingLaneReroute = myClosingLaneReroutesEdited.at(i);
467  if (!SUMOXMLDefinitions::isValidNetID(myClosingLaneRerouteTable->getItem(i, 0)->getText().text())) {
470  } else if (closingLaneReroute->isValid(SUMO_ATTR_ALLOW, myClosingLaneRerouteTable->getItem(i, 1)->getText().text()) == false) {
473  } else if (closingLaneReroute->isValid(SUMO_ATTR_DISALLOW, myClosingLaneRerouteTable->getItem(i, 2)->getText().text()) == false) {
476  } else {
477  // check if allow/disallow should be changed
478  bool changeAllow = myClosingLaneRerouteTable->getItem(i, 1)->getText().text() != closingLaneReroute->getAttribute(SUMO_ATTR_ALLOW);
479  bool changeDisallow = myClosingLaneRerouteTable->getItem(i, 2)->getText().text() != closingLaneReroute->getAttribute(SUMO_ATTR_DISALLOW);
480  // set new values in Closing reroute
481  closingLaneReroute->setAttribute(SUMO_ATTR_LANE, myClosingLaneRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
482  if (changeAllow) {
483  closingLaneReroute->setAttribute(SUMO_ATTR_ALLOW, myClosingLaneRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
484  myClosingLaneRerouteTable->getItem(i, 2)->setText(closingLaneReroute->getAttribute(SUMO_ATTR_DISALLOW).c_str());
485 
486  }
487  if (changeDisallow) {
488  closingLaneReroute->setAttribute(SUMO_ATTR_DISALLOW, myClosingLaneRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
489  myClosingLaneRerouteTable->getItem(i, 1)->setText(closingLaneReroute->getAttribute(SUMO_ATTR_ALLOW).c_str());
490  }
491  // set Correct label
493  }
494  }
495  // update list
496  myClosingLaneRerouteTable->update();
497  return 1;
498 }
499 
500 
501 long
503  myClosingReroutesValid = true;
504  // iterate over table and check that all parameters are correct
505  for (int i = 0; i < myClosingRerouteTable->getNumRows(); i++) {
506  GNEAdditional* closingReroute = myClosingReroutesEdited.at(i);
507  if (!SUMOXMLDefinitions::isValidNetID(myClosingRerouteTable->getItem(i, 0)->getText().text())) {
508  myClosingReroutesValid = false;
509  myClosingRerouteTable->getItem(i, 3)->setIcon(GUIIconSubSys::getIcon(ICON_ERROR));
510  } else if (closingReroute->isValid(SUMO_ATTR_ALLOW, myClosingRerouteTable->getItem(i, 1)->getText().text()) == false) {
511  myClosingReroutesValid = false;
512  myClosingRerouteTable->getItem(i, 3)->setIcon(GUIIconSubSys::getIcon(ICON_ERROR));
513  } else if (closingReroute->isValid(SUMO_ATTR_DISALLOW, myClosingRerouteTable->getItem(i, 2)->getText().text()) == false) {
514  myClosingReroutesValid = false;
515  myClosingRerouteTable->getItem(i, 3)->setIcon(GUIIconSubSys::getIcon(ICON_ERROR));
516  } else {
517  // check if allow/disallow should be changed
518  bool changeAllow = myClosingRerouteTable->getItem(i, 1)->getText().text() != closingReroute->getAttribute(SUMO_ATTR_ALLOW);
519  bool changeDisallow = myClosingRerouteTable->getItem(i, 2)->getText().text() != closingReroute->getAttribute(SUMO_ATTR_DISALLOW);
520  // set new values in Closing reroute
521  closingReroute->setAttribute(SUMO_ATTR_EDGE, myClosingRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
522  if (changeAllow) {
523  closingReroute->setAttribute(SUMO_ATTR_ALLOW, myClosingRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
524  myClosingRerouteTable->getItem(i, 2)->setText(closingReroute->getAttribute(SUMO_ATTR_DISALLOW).c_str());
525 
526  }
527  if (changeDisallow) {
528  closingReroute->setAttribute(SUMO_ATTR_DISALLOW, myClosingRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
529  myClosingRerouteTable->getItem(i, 1)->setText(closingReroute->getAttribute(SUMO_ATTR_ALLOW).c_str());
530  }
531  // set Correct label
533  }
534  }
535  // update list
536  myClosingRerouteTable->update();
537  return 1;
538 }
539 
540 
541 long
544  // iterate over table and check that all parameters are correct
545  for (int i = 0; i < myDestProbRerouteTable->getNumRows(); i++) {
546  GNEAdditional* destProbReroute = myDestProbReroutesEdited.at(i);
547  if (!SUMOXMLDefinitions::isValidNetID(myDestProbRerouteTable->getItem(i, 0)->getText().text())) {
548  myDestProbReroutesValid = false;
549  myDestProbRerouteTable->getItem(i, 2)->setIcon(GUIIconSubSys::getIcon(ICON_ERROR));
550  } else if (destProbReroute->isValid(SUMO_ATTR_PROB, myDestProbRerouteTable->getItem(i, 1)->getText().text()) == false) {
551  myDestProbReroutesValid = false;
552  myDestProbRerouteTable->getItem(i, 2)->setIcon(GUIIconSubSys::getIcon(ICON_ERROR));
553  } else {
554  // set new values in Closing reroute
555  destProbReroute->setAttribute(SUMO_ATTR_EDGE, myDestProbRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
556  destProbReroute->setAttribute(SUMO_ATTR_PROB, myDestProbRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
557  // set Correct label
559  }
560  }
561  // update list
562  myDestProbRerouteTable->update();
563  return 1;
564 }
565 
566 
567 long
570  // iterate over table and check that all parameters are correct
571  for (int i = 0; i < myRouteProbRerouteTable->getNumRows(); i++) {
572  GNEAdditional* routeProbReroute = myRouteProbReroutesEdited.at(i);
573  if (!SUMOXMLDefinitions::isValidNetID(myRouteProbRerouteTable->getItem(i, 0)->getText().text())) {
574  myRouteProbReroutesValid = false;
576  } else if (routeProbReroute->isValid(SUMO_ATTR_PROB, myRouteProbRerouteTable->getItem(i, 1)->getText().text()) == false) {
577  myRouteProbReroutesValid = false;
579  } else {
580  // set new values in Closing reroute
581  routeProbReroute->setAttribute(SUMO_ATTR_ROUTE, myRouteProbRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
582  routeProbReroute->setAttribute(SUMO_ATTR_PROB, myRouteProbRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
583  // set Correct label
585  }
586  }
587  // update list
588  myRouteProbRerouteTable->update();
589  return 1;
590 }
591 
592 
593 long
596  // iterate over table and check that all parameters are correct
597  for (int i = 0; i < myParkingAreaRerouteTable->getNumRows(); i++) {
598  GNEAdditional* parkingAreaReroute = myParkingAreaRerouteEdited.at(i);
599  if (!SUMOXMLDefinitions::isValidNetID(myParkingAreaRerouteTable->getItem(i, 0)->getText().text())) {
602  } else if (parkingAreaReroute->isValid(SUMO_ATTR_PROB, myParkingAreaRerouteTable->getItem(i, 1)->getText().text()) == false) {
605  } else if (parkingAreaReroute->isValid(SUMO_ATTR_VISIBLE, myParkingAreaRerouteTable->getItem(i, 2)->getText().text()) == false) {
608  } else {
609  // set new values in Closing reroute
610  parkingAreaReroute->setAttribute(SUMO_ATTR_PARKING, myParkingAreaRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
611  parkingAreaReroute->setAttribute(SUMO_ATTR_PROB, myParkingAreaRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
612  parkingAreaReroute->setAttribute(SUMO_ATTR_VISIBLE, myParkingAreaRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getViewNet()->getUndoList());
613  // set Correct label
615  }
616  }
617  // update list
618  myParkingAreaRerouteTable->update();
619  return 1;
620 }
621 
622 
623 long
624 GNERerouterIntervalDialog::onCmdChangeBeginEnd(FXObject*, FXSelector, void*) {
625  if (myEditedAdditional->isValid(SUMO_ATTR_BEGIN, myBeginTextField->getText().text()) &&
627  // set new values in rerouter interval
630  // sort intervals of rerouter
632  // change icon
633  myBeginEndValid = true;
635  } else {
636  myBeginEndValid = false;
638  }
639  return 0;
640 }
641 
642 
643 void
645  // clear table
646  myClosingLaneRerouteTable->clearItems();
647  // set number of rows
648  myClosingLaneRerouteTable->setTableSize(int(myClosingLaneReroutesEdited.size()), 5);
649  // Configure list
650  myClosingLaneRerouteTable->setVisibleColumns(5);
651  myClosingLaneRerouteTable->setColumnWidth(0, 83);
652  myClosingLaneRerouteTable->setColumnWidth(1, 83);
653  myClosingLaneRerouteTable->setColumnWidth(2, 82);
656  myClosingLaneRerouteTable->setColumnText(0, toString(SUMO_ATTR_LANE).c_str());
657  myClosingLaneRerouteTable->setColumnText(1, toString(SUMO_ATTR_ALLOW).c_str());
658  myClosingLaneRerouteTable->setColumnText(2, toString(SUMO_ATTR_DISALLOW).c_str());
659  myClosingLaneRerouteTable->setColumnText(3, "");
660  myClosingLaneRerouteTable->setColumnText(4, "");
661  myClosingLaneRerouteTable->getRowHeader()->setWidth(0);
662  // Declare pointer to FXTableItem
663  FXTableItem* item = nullptr;
664  // iterate over values
665  for (int i = 0; i < (int)myClosingLaneReroutesEdited.size(); i++) {
666  // Set closing edge
667  item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_LANE).c_str());
668  myClosingLaneRerouteTable->setItem(i, 0, item);
669  // set allow vehicles
670  item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ALLOW).c_str());
671  myClosingLaneRerouteTable->setItem(i, 1, item);
672  // set disallow vehicles
673  item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_DISALLOW).c_str());
674  myClosingLaneRerouteTable->setItem(i, 2, item);
675  // set valid icon
676  item = new FXTableItem("");
677  item->setIcon(GUIIconSubSys::getIcon(ICON_CORRECT));
678  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
679  item->setEnabled(false);
680  myClosingLaneRerouteTable->setItem(i, 3, item);
681  // set remove
682  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
683  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
684  item->setEnabled(false);
685  myClosingLaneRerouteTable->setItem(i, 4, item);
686  }
687 }
688 
689 
690 void
692  // clear table
693  myClosingRerouteTable->clearItems();
694  // set number of rows
695  myClosingRerouteTable->setTableSize(int(myClosingReroutesEdited.size()), 5);
696  // Configure list
697  myClosingRerouteTable->setVisibleColumns(5);
698  myClosingRerouteTable->setColumnWidth(0, 83);
699  myClosingRerouteTable->setColumnWidth(1, 83);
700  myClosingRerouteTable->setColumnWidth(2, 82);
703  myClosingRerouteTable->setColumnText(0, toString(SUMO_ATTR_EDGE).c_str());
704  myClosingRerouteTable->setColumnText(1, toString(SUMO_ATTR_ALLOW).c_str());
705  myClosingRerouteTable->setColumnText(2, toString(SUMO_ATTR_DISALLOW).c_str());
706  myClosingRerouteTable->setColumnText(3, "");
707  myClosingRerouteTable->setColumnText(4, "");
708  myClosingRerouteTable->getRowHeader()->setWidth(0);
709  // Declare pointer to FXTableItem
710  FXTableItem* item = nullptr;
711  // iterate over values
712  for (int i = 0; i < (int)myClosingReroutesEdited.size(); i++) {
713  // Set closing edge
714  item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_EDGE).c_str());
715  myClosingRerouteTable->setItem(i, 0, item);
716  // set allow vehicles
717  item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ALLOW).c_str());
718  myClosingRerouteTable->setItem(i, 1, item);
719  // set disallow vehicles
720  item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_DISALLOW).c_str());
721  myClosingRerouteTable->setItem(i, 2, item);
722  // set valid icon
723  item = new FXTableItem("");
724  item->setIcon(GUIIconSubSys::getIcon(ICON_CORRECT));
725  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
726  item->setEnabled(false);
727  myClosingRerouteTable->setItem(i, 3, item);
728  // set remove
729  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
730  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
731  item->setEnabled(false);
732  myClosingRerouteTable->setItem(i, 4, item);
733  }
734 }
735 
736 
737 void
739  // clear table
740  myDestProbRerouteTable->clearItems();
741  // set number of rows
742  myDestProbRerouteTable->setTableSize(int(myDestProbReroutesEdited.size()), 4);
743  // Configure list
744  myDestProbRerouteTable->setVisibleColumns(4);
745  myDestProbRerouteTable->setColumnWidth(0, 124);
746  myDestProbRerouteTable->setColumnWidth(1, 124);
749  myDestProbRerouteTable->setColumnText(0, toString(SUMO_ATTR_EDGE).c_str());
750  myDestProbRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
751  myDestProbRerouteTable->setColumnText(2, "");
752  myDestProbRerouteTable->setColumnText(3, "");
753  myDestProbRerouteTable->getRowHeader()->setWidth(0);
754  // Declare pointer to FXTableItem
755  FXTableItem* item = nullptr;
756  // iterate over values
757  for (int i = 0; i < (int)myDestProbReroutesEdited.size(); i++) {
758  // Set new destination
759  item = new FXTableItem(myDestProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_EDGE).c_str());
760  myDestProbRerouteTable->setItem(i, 0, item);
761  // Set probability
762  item = new FXTableItem(myDestProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
763  myDestProbRerouteTable->setItem(i, 1, item);
764  // set valid icon
765  item = new FXTableItem("");
766  item->setIcon(GUIIconSubSys::getIcon(ICON_CORRECT));
767  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
768  item->setEnabled(false);
769  myDestProbRerouteTable->setItem(i, 2, item);
770  // set remove
771  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
772  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
773  item->setEnabled(false);
774  myDestProbRerouteTable->setItem(i, 3, item);
775  }
776 }
777 
778 
779 void
781  // clear table
782  myRouteProbRerouteTable->clearItems();
783  // set number of rows
784  myRouteProbRerouteTable->setTableSize(int(myRouteProbReroutesEdited.size()), 4);
785  // Configure list
786  myRouteProbRerouteTable->setVisibleColumns(4);
787  myRouteProbRerouteTable->setColumnWidth(0, 124);
788  myRouteProbRerouteTable->setColumnWidth(1, 124);
791  myRouteProbRerouteTable->setColumnText(0, toString(SUMO_ATTR_ROUTE).c_str());
792  myRouteProbRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
793  myRouteProbRerouteTable->setColumnText(2, "");
794  myRouteProbRerouteTable->setColumnText(3, "");
795  myRouteProbRerouteTable->getRowHeader()->setWidth(0);
796  // Declare pointer to FXTableItem
797  FXTableItem* item = nullptr;
798  // iterate over values
799  for (int i = 0; i < (int)myRouteProbReroutesEdited.size(); i++) {
800  // Set new route
801  item = new FXTableItem(myRouteProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ROUTE).c_str());
802  myRouteProbRerouteTable->setItem(i, 0, item);
803  // Set probability
804  item = new FXTableItem(myRouteProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
805  myRouteProbRerouteTable->setItem(i, 1, item);
806  // set valid icon
807  item = new FXTableItem("");
808  item->setIcon(GUIIconSubSys::getIcon(ICON_CORRECT));
809  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
810  item->setEnabled(false);
811  myRouteProbRerouteTable->setItem(i, 2, item);
812  // set remove
813  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
814  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
815  item->setEnabled(false);
816  myRouteProbRerouteTable->setItem(i, 3, item);
817  }
818 }
819 
820 
821 void
823  // clear table
824  myParkingAreaRerouteTable->clearItems();
825  // set number of rows
826  myParkingAreaRerouteTable->setTableSize(int(myParkingAreaRerouteEdited.size()), 5);
827  // Configure list
828  myParkingAreaRerouteTable->setVisibleColumns(4);
829  myParkingAreaRerouteTable->setColumnWidth(0, 124);
830  myParkingAreaRerouteTable->setColumnWidth(1, 90);
831  myParkingAreaRerouteTable->setColumnWidth(2, 35);
834  myParkingAreaRerouteTable->setColumnText(0, toString(SUMO_ATTR_PARKING).c_str());
835  myParkingAreaRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
836  myParkingAreaRerouteTable->setColumnText(2, "vis.");
837  myParkingAreaRerouteTable->setColumnText(3, "");
838  myParkingAreaRerouteTable->setColumnText(4, "");
839  myParkingAreaRerouteTable->getRowHeader()->setWidth(0);
840  // Declare pointer to FXTableItem
841  FXTableItem* item = nullptr;
842  // iterate over values
843  for (int i = 0; i < (int)myParkingAreaRerouteEdited.size(); i++) {
844  // Set new destination
845  item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_PARKING).c_str());
846  myParkingAreaRerouteTable->setItem(i, 0, item);
847  // Set probability
848  item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
849  myParkingAreaRerouteTable->setItem(i, 1, item);
850  // Set visible
851  item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_VISIBLE) == "1" ? "true" : "false");
852  myParkingAreaRerouteTable->setItem(i, 2, item);
853  // set valid icon
854  item = new FXTableItem("");
855  item->setIcon(GUIIconSubSys::getIcon(ICON_CORRECT));
856  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
857  item->setEnabled(false);
858  myParkingAreaRerouteTable->setItem(i, 3, item);
859  // set remove
860  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
861  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
862  item->setEnabled(false);
863  myParkingAreaRerouteTable->setItem(i, 4, item);
864  }
865 }
866 
867 
868 /****************************************************************************/
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their conrrespond attribute are valids
long onCmdAddParkingAreaReroute(FXObject *, FXSelector, void *)
add parkingAreaReroute
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
Definition: GUIDesigns.h:450
void updateDestProbReroutesTable()
update data of destiny probabilitry reroute table
void resetChanges()
reset changes did in this dialog.
change table route closing reroute
Definition: GUIAppEnum.h:843
long onCmdClickedParkingAreaReroute(FXObject *, FXSelector, void *)
remove parkingAreaReroute
long onCmdEditDestProbReroute(FXObject *, FXSelector, void *)
/edit dest prob reroute
Dialog for edit rerouter intervals.
change table parkingAreaReroute
Definition: GUIAppEnum.h:849
bool myBeginEndValid
flag to check if begin an end are valid
long onCmdClickedDestProbReroute(FXObject *, FXSelector, void *)
remove dest prob reroute
lane of a reroute of type closing
#define GUIDesignLabelIcon32x32Thicked
label ticked filled only with an icon of 32x32
Definition: GUIDesigns.h:172
bool myClosingReroutesValid
flag to check if closing reroutes are valid
Dialog to edit sequences, parameters, etc.. of Additionals.
void updateRouteProbReroutesTable()
update data of probabilitry reroutes table
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes ...
weights: time range begin
long onCmdClickedRouteProbReroute(FXObject *, FXSelector, void *)
remove route prob reroute
change table closing lane reroute reroute
Definition: GUIAppEnum.h:841
void updateClosingLaneReroutesTable()
update data of closing lane reroute table
FXTable * myClosingLaneRerouteTable
list with closing lane reroutes
bool myRouteProbReroutesValid
flag to check if route prob reroutes are valid
FXTable * myParkingAreaRerouteTable
list with parkingAreaReroutes
FXTextField * myBeginTextField
begin time text field
change table destiny probability reroute
Definition: GUIAppEnum.h:845
std::vector< GNEAdditional * > myRouteProbReroutesEdited
Route Prob Reroutes edited.
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool myClosingLaneReroutesValid
flag to check if closing lane reroutes are valid
long onCmdAddClosingLaneReroute(FXObject *, FXSelector, void *)
add closing lane reroute
long onCmdEditRouteProbReroute(FXObject *, FXSelector, void *)
/edit route prob reroute
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
std::vector< GNEAdditional * > myParkingAreaRerouteEdited
Parking Area reroute edited.
long onCmdAddRouteProbReroute(FXObject *, FXSelector, void *)
add route prob reroute
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
Definition: GUIDesigns.h:258
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:49
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:267
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog) ...
void updateClosingReroutesTable()
update data of closing reroute table
void updateParkingAreaReroutesTable()
update data of parkingAreaReroute table
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:261
long onCmdAddClosingReroute(FXObject *, FXSelector, void *)
add closing reroute
long onCmdEditClosingReroute(FXObject *, FXSelector, void *)
/edit closing reroute
long onCmdEditClosingLaneReroute(FXObject *, FXSelector, void *)
/edit closing lane reroute
probability of route of a reroute
probability of destiny of a reroute
long onCmdAccept(FXObject *, FXSelector, void *)
void sortAdditionalChilds()
sort childs (used by Rerouters and VSS)
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:248
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition: GUIDesigns.h:447
long onCmdClickedClosingLaneReroute(FXObject *, FXSelector, void *)
remove closing lane reroute
#define GUIDesignButtonIcon
button only with icon (23x23)
Definition: GUIDesigns.h:63
FXTable * myDestProbRerouteTable
list with destiny probability reroutes
bool myDestProbReroutesValid
flag to check if Destiny probability reroutes are valid
GNEAdditional * myEditedAdditional
pointer to edited aditional
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element
bool myParkingAreaReroutesValid
flag to check if parkingAreaReroutes are valid
reroute of type closing
GNEAdditional * getFirstAdditionalParent() const
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:46
entry for an alternative parking zone
FXTable * myRouteProbRerouteTable
list with route probability reroute
FXTextField * myEndTextField
end time text field
std::vector< GNEAdditional * > myClosingReroutesEdited
closing Reroutes edited
long onCmdAddDestProbReroute(FXObject *, FXSelector, void *)
add dest prob reroute
FXLabel * myCheckLabel
begin/end time check label
change table route probability reroute
Definition: GUIAppEnum.h:847
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
void acceptChanges()
Accept changes did in this dialog.
add route probability route
Definition: GUIAppEnum.h:861
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
long onCmdClickedClosingReroute(FXObject *, FXSelector, void *)
remove closing reroute
add destiny probability route
Definition: GUIAppEnum.h:859
const std::string & getTagStr() const
get tag assigned to this object in string format
weights: time range end
void cancelChanges()
Cancel changes did in this dialog.
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left and height of 23 ...
Definition: GUIDesigns.h:154
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/doubles
Definition: GUIDesigns.h:40
FXTable * myClosingRerouteTable
list with closing reroutes
long onCmdEditParkingAreaReroute(FXObject *, FXSelector, void *)
/edit parkingAreaReroute
std::vector< GNEAdditional * > myDestProbReroutesEdited
Dest Prob Reroutes edited.
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
long onCmdChangeBeginEnd(FXObject *, FXSelector, void *)
called when begin or endis changed
std::vector< GNEAdditional * > myClosingLaneReroutesEdited
closing Lane Reroutes edited
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left and height of 23 ...
Definition: GUIDesigns.h:157
FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[]