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-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 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(SUMO_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
163  GNEDemandElement* routeToEdit = myEditedAdditional->getNet()->getViewNet()->getNet()->retrieveDemandElement(SUMO_TAG_ROUTE, myRouteList->getItem(i, 0)->getText().text());
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(SUMO_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
179  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_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) {
194  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true);
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  // only add flow if there is at least a GNERoute (There is always a Vehicle Type)
229  // create new calibrator and configure it with GNECalibratorFlowDialog
231  // update flows table
232  updateFlowTable();
233  return 1;
234  } else {
235  throw ProcessError("myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_ROUTE) cannot be empty");
236  }
237 }
238 
239 
240 long
241 GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
242  // check if some delete button was pressed
243  for (int i = 0; i < (int)myEditedAdditional->getChildAdditionals().size(); i++) {
244  if (myFlowList->getItem(i, 2)->hasFocus()) {
245  // remove flow of calibrator flows
247  // update flows table
248  updateFlowTable();
249  return 1;
250  } else if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus()) {
251  // modify flow of calibrator flows (temporal)
253  // update flows table
254  updateFlowTable();
255  return 1;
256  }
257  }
258  // nothing to do
259  return 0;
260 }
261 
262 
263 long
264 GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
265  // create a new Vehicle Type and configure it with GNEVehicleTypeDialog
266  std::string vehicleTypeID = myEditedAdditional->getNet()->getViewNet()->getNet()->generateDemandElementID(SUMO_TAG_VTYPE);
268  // update vehicle types table
270  return 1;
271 }
272 
273 
274 long
275 GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
276  // check if some delete button was pressed
277  for (int i = 0; i < (int)myEditedAdditional->getNet()->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(SUMO_TAG_VTYPE).size(); i++) {
278  // obtain vehicle type
280  // Make sure that default vehicle isn't edited
281  if ((i == 0) && (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus() || myVehicleTypeList->getItem(i, 2)->hasFocus())) {
282  FXMessageBox::warning(getApp(), MBOX_OK,
283  ("Error editing default " + toString(SUMO_TAG_VTYPE)).c_str(), "%s",
284  ("Default " + toString(SUMO_TAG_VTYPE) + " cannot be either edited or deleted.").c_str());
285  } else if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
286  // find all flows that contains vehicle type to delete as "vehicle type" parameter
287  std::vector<GNEAdditional*> calibratorFlowsToErase;
288  for (auto j : myEditedAdditional->getChildAdditionals()) {
289  if (j->getAttribute(SUMO_ATTR_TYPE) == myVehicleTypeList->getItem(i, 0)->getText().text()) {
290  calibratorFlowsToErase.push_back(j);
291  }
292  }
293  // if there are flows that has vehicle type to remove as "vehicle type" parameter
294  if (calibratorFlowsToErase.size() > 0) {
295  const std::string msg = ("Deletion of " + toString(SUMO_TAG_VTYPE) + " '" + myVehicleTypeList->getItem(i, 0)->getText().text() + "' will remove " +
296  toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW_CALIBRATOR) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) + ". Continue?");
297  FXuint answer = FXMessageBox::question(getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str(), "%s", msg.c_str());
298  if (answer != 1) { //1:yes, 2:no, 4:esc
299  // write warning if netedit is running in testing mode
300  if (answer == 2) {
301  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'No'");
302  } else if (answer == 4) {
303  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'ESC'");
304  }
305  // abort deletion of vehicle type
306  return 0;
307  } else {
308  // write warning if netedit is running in testing mode
309  WRITE_DEBUG("Closed FXMessageBox of type 'question' with 'Yes'");
310  // remove affected flows of calibrator flows
311  for (auto j : calibratorFlowsToErase) {
312  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(j, false), true);
313  }
314  // remove vehicle type of calibrator vehicle types
315  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
316  // update flows and vehicle types table
317  updateFlowTable();
319  return 1;
320  }
321  } else {
322  // remove vehicle type of calibrator vehicle types
323  myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(vType, false), true);
324  // update vehicle types table
326  return 1;
327  }
328  } else if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
329  // modify vehicle type
330  GNEVehicleTypeDialog(vType, true);
331  // update vehicle types table
333  // update Flows routes also because VType ID could be changed
334  updateFlowTable();
335  return 1;
336  }
337  }
338  // nothing to do
339  return 0;
340 }
341 
342 
343 void
345  // clear table
346  myRouteList->clearItems();
347  // set number of rows
349  // Configure list
350  myRouteList->setVisibleColumns(4);
351  myRouteList->setColumnWidth(0, 136);
352  myRouteList->setColumnWidth(1, 136);
353  myRouteList->setColumnWidth(2, GUIDesignHeight);
354  myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
355  myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
356  myRouteList->setColumnText(2, "");
357  myRouteList->getRowHeader()->setWidth(0);
358  // Declare index for rows and pointer to FXTableItem
359  int indexRow = 0;
360  FXTableItem* item = nullptr;
361  // iterate over routes
363  // Set ID
364  item = new FXTableItem(toString(i.second->getAttribute(SUMO_ATTR_ID)).c_str());
365  myRouteList->setItem(indexRow, 0, item);
366  // Set edges
367  item = new FXTableItem(toString(i.second->getAttribute(SUMO_ATTR_EDGES)).c_str());
368  myRouteList->setItem(indexRow, 1, item);
369  // set remove
370  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
371  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
372  item->setEnabled(false);
373  myRouteList->setItem(indexRow, 2, item);
374  // Update index
375  indexRow++;
376  }
377  // enable or disable flow and label button
379 }
380 
381 
382 void
384  // clear table
385  myFlowList->clearItems();
386  // set number of rows
387  myFlowList->setTableSize(int(myEditedAdditional->getChildAdditionals().size()), 3);
388  // Configure list
389  myFlowList->setVisibleColumns(3);
390  myFlowList->setColumnWidth(0, 136);
391  myFlowList->setColumnWidth(1, 136);
392  myFlowList->setColumnWidth(2, GUIDesignHeight);
393  myFlowList->setColumnText(0, toString(SUMO_ATTR_TYPE).c_str());
394  myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
395  myFlowList->setColumnText(2, "");
396  myFlowList->getRowHeader()->setWidth(0);
397  // Declare index for rows and pointer to FXTableItem
398  int indexRow = 0;
399  FXTableItem* item = nullptr;
400  // iterate over flows
401  for (auto i : myEditedAdditional->getChildAdditionals()) {
402  // Set vehicle type
403  item = new FXTableItem(i->getAttribute(SUMO_ATTR_TYPE).c_str());
404  myFlowList->setItem(indexRow, 0, item);
405  // Set route
406  item = new FXTableItem(i->getAttribute(SUMO_ATTR_ROUTE).c_str());
407  myFlowList->setItem(indexRow, 1, item);
408  // set remove
409  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
410  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
411  item->setEnabled(false);
412  myFlowList->setItem(indexRow, 2, item);
413  // Update index
414  indexRow++;
415  }
416  // enable or disable flow and label button
418 }
419 
420 
421 void
423  // clear table
424  myVehicleTypeList->clearItems();
425  // set number of rows
427  // Configure list
428  myVehicleTypeList->setVisibleColumns(4);
429  myVehicleTypeList->setColumnWidth(0, 136);
430  myVehicleTypeList->setColumnWidth(1, 136);
431  myVehicleTypeList->setColumnWidth(2, GUIDesignHeight);
432  myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
433  myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
434  myVehicleTypeList->setColumnText(2, "");
435  myVehicleTypeList->getRowHeader()->setWidth(0);
436  // Declare index for rows and pointer to FXTableItem
437  int indexRow = 0;
438  FXTableItem* item = nullptr;
439  // iterate over vehicle types
441  // Set id
442  item = new FXTableItem(i.second->getAttribute(SUMO_ATTR_ID).c_str());
443  myVehicleTypeList->setItem(indexRow, 0, item);
444  // Set VClass
445  item = new FXTableItem(i.second->getAttribute(SUMO_ATTR_VCLASS).c_str());
446  myVehicleTypeList->setItem(indexRow, 1, item);
447  // set remove icon except for default vehicle type
448  if (indexRow != 0) {
449  item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
450  } else {
451  item = new FXTableItem("");
452  }
453  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
454  item->setEnabled(false);
455  myVehicleTypeList->setItem(indexRow, 2, item);
456  // Update index
457  indexRow++;
458  }
459  // enable or disable flow and label button
461 }
462 
463 
464 void
466  // disable AddFlow button if no route is defined
468  myAddFlow->disable();
469  myFlowList->disable();
470  myLabelFlow->setText("No routes defined");
471  } else {
472  myAddFlow->enable();
473  myFlowList->enable();
474  myLabelFlow->setText(("Add new " + toString(SUMO_TAG_FLOW_CALIBRATOR) + "s").c_str());
475  }
476 }
477 
478 
479 /****************************************************************************/
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
@ MID_GNE_CALIBRATORDIALOG_TABLE_FLOW
change table flow
Definition: GUIAppEnum.h:1162
@ MID_GNE_CALIBRATORDIALOG_ADD_ROUTE
add new route
Definition: GUIAppEnum.h:1160
@ MID_GNE_CALIBRATORDIALOG_ADD_FLOW
Definition: GUIAppEnum.h:1163
@ MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE
add vehicle type
Definition: GUIAppEnum.h:1167
@ MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE
change table route
Definition: GUIAppEnum.h:1158
@ MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE
change table route
Definition: GUIAppEnum.h:1165
#define GUIDesignButtonIcon
button only with icon
Definition: GUIDesigns.h:71
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition: GUIDesigns.h:526
#define GUIDesignHeight
define a standard height for all elements (Change it carefully)
Definition: GUIDesigns.h:31
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:313
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:319
#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
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SUMO_TAG_VTYPE
description of a vehicle type
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator (used in NETEDIT)
@ 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:44
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::map< std::string, GNEDemandElement * > > & getDemandElements() const
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
Definition: GNENet.cpp:130
std::string generateDemandElementID(SumoXMLTag tag) const
generate demand element id
Definition: GNENet.cpp:2539
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
Definition: GNENet.cpp:2435
GNEViewNet * getViewNet() const
get view net
Definition: GNENet.cpp:2245
Dialog for edit Calibrator Routes.
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