Eclipse SUMO - Simulation of Urban MObility
GNECalibratorDialog.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-2022 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 calibrators
19 /****************************************************************************/
20 #include <config.h>
21 
26 #include <netedit/GNENet.h>
27 #include <netedit/GNEViewNet.h>
28 #include <netedit/GNEUndoList.h>
33 
34 #include "GNECalibratorDialog.h"
36 #include "GNERouteDialog.h"
37 #include "GNEVehicleTypeDialog.h"
38 
39 // ===========================================================================
40 // FOX callback mapping
41 // ===========================================================================
42 
43 FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[] = {
50 };
51 
52 // Object implementation
53 FXIMPLEMENT(GNECalibratorDialog, GNEAdditionalDialog, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
54 
55 // ===========================================================================
56 // member method definitions
57 // ===========================================================================
58 
60  GNEAdditionalDialog(editedCalibrator, false, 640, 480) {
61 
62  // Create two columns, one for Routes and VehicleTypes, and other for Flows
63  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
64  FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
65  FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
66 
67  // create add buton and label for routes
68  FXHorizontalFrame* buttonAndLabelRoute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
69  myAddRoute = new FXButton(buttonAndLabelRoute, "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_ROUTE, GUIDesignButtonIcon);
70  new FXLabel(buttonAndLabelRoute, ("Add new " + toString(SUMO_TAG_ROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick);
71 
72  // Create table in left frame
73  myRouteList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE, GUIDesignTableAdditionals);
74  myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
75  myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
76  myRouteList->setEditable(false);
77 
78  // create add buton and label for vehicle types
79  FXHorizontalFrame* buttonAndLabelVehicleType = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
80  myAddVehicleType = new FXButton(buttonAndLabelVehicleType, "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE, GUIDesignButtonIcon);
81  new FXLabel(buttonAndLabelVehicleType, ("Add new " + toString(SUMO_TAG_VTYPE) + "s").c_str(), nullptr, GUIDesignLabelThick);
82 
83  // Create table in left frame
84  myVehicleTypeList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE, GUIDesignTableAdditionals);
85  myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
86  myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
87  myVehicleTypeList->setEditable(false);
88 
89  // create add buton and label for flows in right frame
90  FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
91  myAddFlow = new FXButton(buttonAndLabelFlow, "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_FLOW, GUIDesignButtonIcon);
92  myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(GNE_TAG_FLOW_CALIBRATOR) + "s").c_str(), nullptr, GUIDesignLabelThick);
93 
94  // Create table in right frame
95  myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals);
96  myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
97  myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
98  myFlowList->setEditable(false);
99 
100  // update tables
101  updateRouteTable();
102  updateVehicleTypeTable();
103  updateFlowTable();
104 
105  // start a undo list for editing local to this additional
106  initChanges();
107 
108  // Open dialog as modal
109  openAsModalDialog();
110 }
111 
112 
114 
115 
116 long
117 GNECalibratorDialog::onCmdAccept(FXObject*, FXSelector, void*) {
118  // accept changes before closing dialog
119  acceptChanges();
120  // Stop Modal
121  getApp()->stopModal(this, TRUE);
122  return 1;
123 }
124 
125 
126 long
127 GNECalibratorDialog::onCmdCancel(FXObject*, FXSelector, void*) {
128  // cancel changes
129  cancelChanges();
130  // Stop Modal
131  getApp()->stopModal(this, FALSE);
132  return 1;
133 }
134 
135 
136 long
137 GNECalibratorDialog::onCmdReset(FXObject*, FXSelector, void*) {
138  // reset changes
139  resetChanges();
140  // update tables
143  updateFlowTable();
144  return 1;
145 }
146 
147 
148 long
149 GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) {
150  // create nes calibrator route and configure it with GNERouteDialog
152  // update routes table
154  return 1;
155 }
156 
157 
158 long
159 GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) {
160  // check if some delete button was pressed
161  for (int i = 0; i < (int)myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE).size(); i++) {
162  // obtain rerouter
164  if (myRouteList->getItem(i, 2)->hasFocus()) {
165  // find all flows that contains route to delete as "route" parameter
166  std::vector<GNEAdditional*> calibratorFlowsToErase;
167  for (auto j : myEditedAdditional->getChildAdditionals()) {
168  if (j->getAttribute(SUMO_ATTR_ROUTE) == myRouteList->getItem(i, 0)->getText().text()) {
169  calibratorFlowsToErase.push_back(j);
170  }
171  }
172  // if there are flows that has route to remove as "route" parameter
173  if (calibratorFlowsToErase.size() > 0) {
174  // write warning if netedit is running in testing mode
175  WRITE_DEBUG("Opening FXMessageBox of type 'question'");
176  // open question dialog box
177  const std::string msg = ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() + "' will remove " +
178  toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
179  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_FLOW_CALIBRATOR) + "s").c_str(), "%s", msg.c_str());
180  if (answer != 1) { //1:yes, 2:no, 4:esc
181  // write warning if netedit is running in testing mode
182  if (answer == 2) {
183  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
184  } else if (answer == 4) {
185  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
186  }
187  // abort deletion of route
188  return 0;
189  } else {
190  // write warning if netedit is running in testing mode
191  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
192  // remove affected flows of calibrator flows
193  for (auto j : calibratorFlowsToErase) {
195  }
196  // remove route of calibrator routes
197  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
198  // update flows and route table
199  updateFlowTable();
201  return 1;
202  }
203  } else {
204  // remove route
205  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(routeToEdit, false), true);
206  // update routes table
208  return 1;
209  }
210  } else if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) {
211  // modify route of calibrator routes
212  GNERouteDialog(routeToEdit, true);
213  // update routes table
215  // update Flows routes also because Route ID could be changed
216  updateFlowTable();
217  return 1;
218  }
219  }
220  // nothing to do
221  return 0;
222 }
223 
224 
225 long
226 GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) {
227  // get routes and vTypes
230  // only add flow if there is at least a GNERoute (There is always a Vehicle Type)
231  if (routes.size() > 0) {
232  // create new calibrator and configure it with GNECalibratorFlowDialog
233  GNECalibratorFlowDialog(new GNECalibratorFlow(myEditedAdditional, defaultVType, *routes.begin()), false);
234  // update flows table
235  updateFlowTable();
236  return 1;
237  } else {
238  throw ProcessError("routes cannot be empty");
239  }
240 }
241 
242 
243 long
244 GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
245  // check if some delete button was pressed
246  for (int i = 0; i < (int)myEditedAdditional->getChildAdditionals().size(); i++) {
247  if (myFlowList->getItem(i, 2)->hasFocus()) {
248  // remove flow of calibrator flows
250  // update flows table
251  updateFlowTable();
252  return 1;
253  } else if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus()) {
254  // modify flow of calibrator flows (temporal)
256  // update flows table
257  updateFlowTable();
258  return 1;
259  }
260  }
261  // nothing to do
262  return 0;
263 }
264 
265 
266 long
267 GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
268  // create a new Vehicle Type and configure it with GNEVehicleTypeDialog
270  GNEVehicleTypeDialog(new GNEVType(myEditedAdditional->getNet(), vehicleTypeID, SVC_PASSENGER), false);
271  // update vehicle types table
273  return 1;
274 }
275 
276 
277 long
278 GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
279  // check if some delete button was pressed
280  for (int i = 0; i < (int)myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE).size(); i++) {
281  // obtain vehicle type
283  // Make sure that default vehicle isn't edited
284  if ((i == 0) && (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus() || myVehicleTypeList->getItem(i, 2)->hasFocus())) {
285  FXMessageBox::warning(getApp(), MBOX_OK,
286  ("Error editing default " + toString(SUMO_TAG_VTYPE)).c_str(), "%s",
287  ("Default " + toString(SUMO_TAG_VTYPE) + " cannot be either edited or deleted.").c_str());
288  } else if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
289  // find all flows that contains vehicle type to delete as "vehicle type" parameter
290  std::vector<GNEAdditional*> calibratorFlowsToErase;
291  for (auto j : myEditedAdditional->getChildAdditionals()) {
292  if (j->getAttribute(SUMO_ATTR_TYPE) == myVehicleTypeList->getItem(i, 0)->getText().text()) {
293  calibratorFlowsToErase.push_back(j);
294  }
295  }
296  // if there are flows that has vehicle type to remove as "vehicle type" parameter
297  if (calibratorFlowsToErase.size() > 0) {
298  const std::string msg = ("Deletion of " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeList->getItem(i, 0)->getText().text() + "' will remove " +
299  toString(calibratorFlowsToErase.size()) + " " + toString(GNE_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
300  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(GNE_TAG_FLOW_CALIBRATOR) + "s").c_str(), "%s", msg.c_str());
301  if (answer != 1) { //1:yes, 2:no, 4:esc
302  // write warning if netedit is running in testing mode
303  if (answer == 2) {
304  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
305  } else if (answer == 4) {
306  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
307  }
308  // abort deletion of vehicle type
309  return 0;
310  } else {
311  // write warning if netedit is running in testing mode
312  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
313  // remove affected flows of calibrator flows
314  for (auto j : calibratorFlowsToErase) {
316  }
317  // remove vehicle type of calibrator vehicle types
318  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
319  // update flows and vehicle types table
320  updateFlowTable();
322  return 1;
323  }
324  } else {
325  // remove vehicle type of calibrator vehicle types
326  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
327  // update vehicle types table
329  return 1;
330  }
331  } else if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
332  // modify vehicle type
333  GNEVehicleTypeDialog(vType, true);
334  // update vehicle types table
336  // update Flows routes also because VType ID could be changed
337  updateFlowTable();
338  return 1;
339  }
340  }
341  // nothing to do
342  return 0;
343 }
344 
345 
346 void
348  // clear table
349  myRouteList->clearItems();
350  // set number of rows
352  // Configure list
353  myRouteList->setVisibleColumns(4);
354  myRouteList->setColumnWidth(0, 136);
355  myRouteList->setColumnWidth(1, 136);
356  myRouteList->setColumnWidth(2, GUIDesignHeight);
357  myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
358  myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
359  myRouteList->setColumnText(2, "");
360  myRouteList->getRowHeader()->setWidth(0);
361  // Declare index for rows and pointer to FXTableItem
362  int indexRow = 0;
363  FXTableItem* item = nullptr;
364  // iterate over routes
366  // Set ID
367  item = new FXTableItem(toString(route->getAttribute(SUMO_ATTR_ID)).c_str());
368  myRouteList->setItem(indexRow, 0, item);
369  // Set edges
370  item = new FXTableItem(toString(route->getAttribute(SUMO_ATTR_EDGES)).c_str());
371  myRouteList->setItem(indexRow, 1, item);
372  // set remove
373  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
374  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
375  item->setEnabled(false);
376  myRouteList->setItem(indexRow, 2, item);
377  // Update index
378  indexRow++;
379  }
380  // enable or disable flow and label button
382 }
383 
384 
385 void
387  // clear table
388  myFlowList->clearItems();
389  // set number of rows
390  myFlowList->setTableSize(int(myEditedAdditional->getChildAdditionals().size()), 3);
391  // Configure list
392  myFlowList->setVisibleColumns(3);
393  myFlowList->setColumnWidth(0, 136);
394  myFlowList->setColumnWidth(1, 136);
395  myFlowList->setColumnWidth(2, GUIDesignHeight);
396  myFlowList->setColumnText(0, toString(SUMO_ATTR_TYPE).c_str());
397  myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
398  myFlowList->setColumnText(2, "");
399  myFlowList->getRowHeader()->setWidth(0);
400  // Declare index for rows and pointer to FXTableItem
401  int indexRow = 0;
402  FXTableItem* item = nullptr;
403  // iterate over flows
404  for (auto i : myEditedAdditional->getChildAdditionals()) {
405  // Set vehicle type
406  item = new FXTableItem(i->getAttribute(SUMO_ATTR_TYPE).c_str());
407  myFlowList->setItem(indexRow, 0, item);
408  // Set route
409  item = new FXTableItem(i->getAttribute(SUMO_ATTR_ROUTE).c_str());
410  myFlowList->setItem(indexRow, 1, item);
411  // set remove
412  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
413  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
414  item->setEnabled(false);
415  myFlowList->setItem(indexRow, 2, item);
416  // Update index
417  indexRow++;
418  }
419  // enable or disable flow and label button
421 }
422 
423 
424 void
426  // clear table
427  myVehicleTypeList->clearItems();
428  // set number of rows
430  // Configure list
431  myVehicleTypeList->setVisibleColumns(4);
432  myVehicleTypeList->setColumnWidth(0, 136);
433  myVehicleTypeList->setColumnWidth(1, 136);
434  myVehicleTypeList->setColumnWidth(2, GUIDesignHeight);
435  myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
436  myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
437  myVehicleTypeList->setColumnText(2, "");
438  myVehicleTypeList->getRowHeader()->setWidth(0);
439  // Declare index for rows and pointer to FXTableItem
440  int indexRow = 0;
441  FXTableItem* item = nullptr;
442  // iterate over vehicle types
444  // Set id
445  item = new FXTableItem(vType->getAttribute(SUMO_ATTR_ID).c_str());
446  myVehicleTypeList->setItem(indexRow, 0, item);
447  // Set VClass
448  item = new FXTableItem(vType->getAttribute(SUMO_ATTR_VCLASS).c_str());
449  myVehicleTypeList->setItem(indexRow, 1, item);
450  // set remove icon except for default vehicle type
451  if (indexRow != 0) {
452  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
453  } else {
454  item = new FXTableItem("");
455  }
456  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
457  item->setEnabled(false);
458  myVehicleTypeList->setItem(indexRow, 2, item);
459  // Update index
460  indexRow++;
461  }
462  // enable or disable flow and label button
464 }
465 
466 
467 void
469  // disable AddFlow button if no route is defined
471  myAddFlow->disable();
472  myFlowList->disable();
473  myLabelFlow->setText("No routes defined");
474  } else {
475  myAddFlow->enable();
476  myFlowList->enable();
477  myLabelFlow->setText(("Add new " + toString(GNE_TAG_FLOW_CALIBRATOR) + "s").c_str());
478  }
479 }
480 
481 
482 /****************************************************************************/
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
@ MID_GNE_CALIBRATORDIALOG_TABLE_FLOW
change table flow
Definition: GUIAppEnum.h:1261
@ MID_GNE_CALIBRATORDIALOG_ADD_ROUTE
add new route
Definition: GUIAppEnum.h:1259
@ MID_GNE_CALIBRATORDIALOG_ADD_FLOW
Definition: GUIAppEnum.h:1262
@ MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE
add vehicle type
Definition: GUIAppEnum.h:1266
@ MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE
change table route
Definition: GUIAppEnum.h:1257
@ MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE
change table route
Definition: GUIAppEnum.h:1264
#define GUIDesignButtonIcon
button only with icon
Definition: GUIDesigns.h:77
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition: GUIDesigns.h:559
#define GUIDesignHeight
define a standard height for all elements (Change it carefully)
Definition: GUIDesigns.h:37
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:343
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:349
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
Definition: GUIDesigns.h:202
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions
Definition: GUIDesigns.h:340
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:290
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ GNE_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_VCLASS
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_ID
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
Dialog to edit sequences, parameters, etc.. of Additionals.
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.
GNENet * getNet() const
get pointer to net
Dialog for edit calibrators.
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
FXTable * myFlowList
list with flows
long onCmdClickedFlow(FXObject *, FXSelector, void *)
remove or edit flow
FXLabel * myLabelFlow
label for flows
long onCmdClickedVehicleType(FXObject *, FXSelector, void *)
remove or edit vehicle type
FXTable * myVehicleTypeList
list with vehicle types
long onCmdAccept(FXObject *, FXSelector, void *)
long onCmdAddVehicleType(FXObject *, FXSelector, void *)
add new vehicle type
long onCmdClickedRoute(FXObject *, FXSelector, void *)
remove or edit route
void updateRouteTable()
update data table with routes
void updateFlowAndLabelButton()
update flow and label button
FXTable * myRouteList
list with routes
long onCmdAddFlow(FXObject *, FXSelector, void *)
add new flow
long onCmdAddRoute(FXObject *, FXSelector, void *)
add new route
FXButton * myAddFlow
button for add new flow
void updateFlowTable()
update data table with flows
void updateVehicleTypeTable()
update data table with vehicle types
Dialog for edit rerouter intervals.
An Element which don't belongs to GNENet but has influency in the simulation.
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNEDemandElement * getDefaultType() const
get default type
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:125
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:1964
Dialog for edit Calibrator Routes.
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
Dialog for edit rerouter intervals.
GNENet * getNet() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon