SUMO - Simulation of Urban MObility
GNECalibratorDialog.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2017 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #include <iostream>
35 
36 #include "GNECalibratorDialog.h"
37 #include "GNECalibrator.h"
38 #include "GNEViewNet.h"
42 
43 
44 // ===========================================================================
45 // FOX callback mapping
46 // ===========================================================================
47 
48 FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[] = {
58 };
59 
60 // Object implementation
61 FXIMPLEMENT(GNECalibratorDialog, FXDialogBox, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
62 
63 // ===========================================================================
64 // member method definitions
65 // ===========================================================================
66 
68  GNEAdditionalDialog(calibratorParent, 640, 480),
69  myCalibratorParent(calibratorParent) {
70 
71  // Create two columns, one for Routes and VehicleTypes, and other for Flows
72  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
73  FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
74  FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
75 
76  // create add buton and label for routes
77  FXHorizontalFrame* buttonAndLabelRoute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
78  myAddRoute = new FXButton(buttonAndLabelRoute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_ROUTE, GUIDesignButtonIcon);
79  new FXLabel(buttonAndLabelRoute, ("Add new " + toString(SUMO_TAG_ROUTE) + "s").c_str(), 0, GUIDesignLabelThick);
80 
81  // Create table in left frame
82  myRouteList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE, GUIDesignTableAdditionals);
83  myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
84  myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
85  myRouteList->setEditable(false);
86 
87  // create add buton and label for vehicle types
88  FXHorizontalFrame* buttonAndLabelVehicleType = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
89  myAddVehicleType = new FXButton(buttonAndLabelVehicleType, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE, GUIDesignButtonIcon);
90  new FXLabel(buttonAndLabelVehicleType, ("Add new " + toString(SUMO_TAG_VTYPE) + "s").c_str(), 0, GUIDesignLabelThick);
91 
92  // Create table in left frame
93  myVehicleTypeList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE, GUIDesignTableAdditionals);
94  myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
95  myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
96  myVehicleTypeList->setEditable(false);
97 
98  // create add buton and label for flows in right frame
99  FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
100  myAddFlow = new FXButton(buttonAndLabelFlow, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_FLOW, GUIDesignButtonIcon);
101  myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str(), 0, GUIDesignLabelThick);
102 
103  // Create table in right frame
104  myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals);
105  myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
106  myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
107  myFlowList->setEditable(false);
108 
109  // obtain copy of calibrator values
110  myCopyOfCalibratorRoutes = myCalibratorParent->getCalibratorRoutes();
111  myCopyOfCalibratorFlows = myCalibratorParent->getCalibratorFlows();
112  myCopyOfCalibratorVehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
113 
114  // update tables
115  updateRouteTable();
116  updateFlowTable();
117  updateVehicleTypeTable();
118 
119  // Execute additional dialog (To make it modal)
120  execute();
121 }
122 
123 
125 }
126 
127 
130  return myCalibratorParent;
131 }
132 
133 
134 long
135 GNECalibratorDialog::onCmdAccept(FXObject*, FXSelector, void*) {
136  // Stop Modal
137  getApp()->stopModal(this, TRUE);
138  return 1;
139 }
140 
141 
142 long
143 GNECalibratorDialog::onCmdCancel(FXObject*, FXSelector, void*) {
144  // set original VTypes, routes and flows into calibrator
148  // Stop Modal
149  getApp()->stopModal(this, FALSE);
150  return 1;
151 }
152 
153 
154 long
155 GNECalibratorDialog::onCmdReset(FXObject*, FXSelector, void*) {
156  // set original VTypes, routes and flows into calibrator
160  // update tables
163  updateFlowTable();
164  return 1;
165 }
166 
167 
168 long
169 GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) {
170  // create empty calibrator route and configure it with GNECalibratorRouteDialog
172  if (GNECalibratorRouteDialog(this, newRoute, false).execute() == TRUE) {
173  // if new route was sucesfully configured, add it to calibrator routes
174  std::vector<GNECalibratorRoute> vehicleTypes = myCalibratorParent->getCalibratorRoutes();
175  vehicleTypes.push_back(newRoute);
177  // update routes table
179  return 1;
180  } else {
181  return 0;
182  }
183 }
184 
185 
186 long
187 GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) {
188  // check if some delete button was pressed
189  for (int i = 0; i < (int)myCalibratorParent->getCalibratorRoutes().size(); i++) {
190  if (myRouteList->getItem(i, 2)->hasFocus()) {
191  // find all flows that contains route to delete as "route" parameter
192  std::vector<GNECalibratorFlow> calibratorFlowsToErase;
193  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
194  if (j->getRoute() == myRouteList->getItem(i, 0)->getText().text()) {
195  calibratorFlowsToErase.push_back(*j);
196  }
197  }
198  // if there are flows that has route to remove as "route" parameter
199  if (calibratorFlowsToErase.size() > 0) {
200  // write warning if netedit is running in testing mode
202  WRITE_WARNING("Opening FXMessageBox of type 'question'");
203  }
204  // open question dialog box
205  FXuint answer = FXMessageBox::question(myCalibratorParent->getViewNet()->getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s",
206  ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() +
207  "' will remove " + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) +
208  ". Continue?").c_str());
209  if (answer != 1) { //1:yes, 2:no, 4:esc
210  // write warning if netedit is running in testing mode
211  if ((answer == 2) && (myCalibratorParent->getViewNet()->isTestingModeEnabled() == true)) {
212  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'No'");
213  } else if ((answer == 4) && (myCalibratorParent->getViewNet()->isTestingModeEnabled() == true)) {
214  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'ESC'");
215  }
216  // abort deletion of route
217  return 0;
218  } else {
219  // write warning if netedit is running in testing mode
221  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'Yes'");
222  }
223  // remove flows with route to delete
224  std::vector<GNECalibratorFlow> flowSubstraction;
225  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
226  if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
227  flowSubstraction.push_back(*j);
228  }
229  }
230  // set substracted flows into calibrator
231  myCalibratorParent->setCalibratorFlows(flowSubstraction);
232  // update flows table
233  updateFlowTable();
234  }
235  }
236  // remove route of calibrator routes
237  std::vector<GNECalibratorRoute> vehicleTypes = myCalibratorParent->getCalibratorRoutes();
238  vehicleTypes.erase(vehicleTypes.begin() + i);
240  // update routes table
242  return 1;
243  }
244  }
245  // check if other field was pressed
246  for (int i = 0; i < (int)myCalibratorParent->getCalibratorRoutes().size(); i++) {
247  if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) {
248  // modify route of calibrator routes
249  std::vector<GNECalibratorRoute> routes = myCalibratorParent->getCalibratorRoutes();
250  if (GNECalibratorRouteDialog(this, routes.at(i), true).execute() == TRUE) {
252  // update routes table
254  }
255  return 1;
256  }
257  }
258  // nothing to do
259  return 0;
260 }
261 
262 
263 long
264 GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) {
265  // create empty calibrator flow and configure it with GNECalibratorFlowDialog
267  if (GNECalibratorFlowDialog(this, newFlow, false).execute() == TRUE) {
268  // if new flow was sucesfully configured, add it to calibrator flows
269  std::vector<GNECalibratorFlow> vehicleTypes = myCalibratorParent->getCalibratorFlows();
270  vehicleTypes.push_back(newFlow);
271  myCalibratorParent->setCalibratorFlows(vehicleTypes);
272  // update flows table
273  updateFlowTable();
274  return 1;
275  } else {
276  return 0;
277  }
278 }
279 
280 
281 long
282 GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
283  // check if some delete button was pressed
284  for (int i = 0; i < (int)myCalibratorParent->getCalibratorFlows().size(); i++) {
285  if (myFlowList->getItem(i, 3)->hasFocus()) {
286  // remove flow of calibrator flows
287  std::vector<GNECalibratorFlow> flows = myCalibratorParent->getCalibratorFlows();
288  flows.erase(flows.begin() + i);
290  // update flows table
291  updateFlowTable();
292  return 1;
293  }
294  }
295  // check if other field was pressed
296  for (int i = 0; i < (int)myCalibratorParent->getCalibratorFlows().size(); i++) {
297  if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus() || myFlowList->getItem(i, 2)->hasFocus()) {
298  // modify flow of calibrator flows
299  std::vector<GNECalibratorFlow> flows = myCalibratorParent->getCalibratorFlows();
300  if (GNECalibratorFlowDialog(this, flows.at(i), true).execute() == TRUE) {
302  // update flows table
303  updateFlowTable();
304  }
305  return 1;
306  }
307  }
308  // nothing to do
309  return 0;
310 }
311 
312 
313 long
314 GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
315  // create empty calibrator flow and configure it with GNECalibratorVehicleTypeDialog
317  if (GNECalibratorVehicleTypeDialog(this, newVehicleType, false).execute() == TRUE) {
318  // if new vehicle type was sucesfully configured, add it to calibrator vehicle types
319  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
320  vehicleTypes.push_back(newVehicleType);
322  // update vehicle types table
324  return 1;
325  } else {
326  return 0;
327  }
328 }
329 
330 
331 long
332 GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
333  // check if some delete button was pressed
334  for (int i = 0; i < (int)myCalibratorParent->getCalibratorVehicleTypes().size(); i++) {
335  if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
336  // find all flows that contains vehicle type to delete as "vehicle type" parameter
337  std::vector<GNECalibratorFlow> calibratorFlowsToErase;
338  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
339  if (j->getVehicleType() == myVehicleTypeList->getItem(i, 0)->getText().text()) {
340  calibratorFlowsToErase.push_back(*j);
341  }
342  }
343  // if there are flows that has vehicle type to remove as "vehicle type" parameter
344  if (calibratorFlowsToErase.size() > 0) {
345  FXuint answer = FXMessageBox::question(myCalibratorParent->getViewNet()->getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s",
346  ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() +
347  "' will remove " + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) +
348  ". Continue?").c_str());
349  if (answer != 1) { //1:yes, 2:no, 4:esc
350  // write warning if netedit is running in testing mode
351  if ((answer == 2) && (myCalibratorParent->getViewNet()->isTestingModeEnabled() == true)) {
352  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'No'");
353  } else if ((answer == 4) && (myCalibratorParent->getViewNet()->isTestingModeEnabled() == true)) {
354  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'ESC'");
355  }
356  // abort deletion of vehicle type
357  return 0;
358  } else {
359  // write warning if netedit is running in testing mode
361  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'Yes'");
362  }
363  // remove flows with vehicle type to delete
364  std::vector<GNECalibratorFlow> flowSubstraction;
365  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
366  if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
367  flowSubstraction.push_back(*j);
368  }
369  }
370  // set substracted flows into calibrator
371  myCalibratorParent->setCalibratorFlows(flowSubstraction);
372  // update flows table
373  updateFlowTable();
374  }
375  }
376  // remove vehicle type of calibrator vehicle types
377  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
378  vehicleTypes.erase(vehicleTypes.begin() + i);
380  // update vehicle types table
382  return 1;
383  }
384  }
385  // check if other field was pressed
386  for (int i = 0; i < (int)myCalibratorParent->getCalibratorVehicleTypes().size(); i++) {
387  if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
388  // modify vehicle type of calibratorVehicleTypes
389  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
390  if (GNECalibratorVehicleTypeDialog(this, vehicleTypes.at(i), true).execute() == TRUE) {
392  // update vehicle types table
394  }
395  return 1;
396  }
397  }
398  // nothing to do
399  return 0;
400 }
401 
402 
403 void
405  // clear table
406  myRouteList->clearItems();
407  // set number of rows
408  myRouteList->setTableSize(int(myCalibratorParent->getCalibratorRoutes().size()), 3);
409  // Configure list
410  myRouteList->setVisibleColumns(4);
411  myRouteList->setColumnWidth(0, 136);
412  myRouteList->setColumnWidth(1, 136);
413  myRouteList->setColumnWidth(2, GUIDesignTableIconCellWidth);
414  myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
415  myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
416  myRouteList->setColumnText(2, "");
417  myRouteList->getRowHeader()->setWidth(0);
418  // Declare index for rows and pointer to FXTableItem
419  int indexRow = 0;
420  FXTableItem* item = 0;
421  // iterate over values
422  for (std::vector<GNECalibratorRoute>::const_iterator i = myCalibratorParent->getCalibratorRoutes().begin(); i != myCalibratorParent->getCalibratorRoutes().end(); i++) {
423  // Set ID
424  item = new FXTableItem(toString(i->getRouteID()).c_str());
425  myRouteList->setItem(indexRow, 0, item);
426  // Set edges
427  item = new FXTableItem(toString(i->getEdgesIDs()).c_str());
428  myRouteList->setItem(indexRow, 1, item);
429  // set remove
430  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
431  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
432  item->setEnabled(false);
433  myRouteList->setItem(indexRow, 2, item);
434  // Update index
435  indexRow++;
436  }
437  // enable or disable flow and label button
439 }
440 
441 
442 void
444  // clear table
445  myFlowList->clearItems();
446  // set number of rows
447  myFlowList->setTableSize(int(myCalibratorParent->getCalibratorFlows().size()), 4);
448  // Configure list
449  myFlowList->setVisibleColumns(4);
450  myFlowList->setColumnWidth(0, 92);
451  myFlowList->setColumnWidth(1, 90);
452  myFlowList->setColumnWidth(2, 90);
453  myFlowList->setColumnWidth(3, GUIDesignTableIconCellWidth);
454  myFlowList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
455  myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
456  myFlowList->setColumnText(2, toString(SUMO_ATTR_ROUTE).c_str());
457  myFlowList->setColumnText(3, "");
458  myFlowList->getRowHeader()->setWidth(0);
459  // Declare index for rows and pointer to FXTableItem
460  int indexRow = 0;
461  FXTableItem* item = 0;
462  // iterate over values
463  for (std::vector<GNECalibratorFlow>::const_iterator i = myCalibratorParent->getCalibratorFlows().begin(); i != myCalibratorParent->getCalibratorFlows().end(); i++) {
464  // Set id
465  item = new FXTableItem(toString(i->getFlowID()).c_str());
466  myFlowList->setItem(indexRow, 0, item);
467  // Set vehicle type
468  item = new FXTableItem(toString(i->getVehicleType()).c_str());
469  myFlowList->setItem(indexRow, 1, item);
470  // Set route
471  item = new FXTableItem(toString(i->getRoute()).c_str());
472  myFlowList->setItem(indexRow, 2, item);
473  // set remove
474  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
475  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
476  item->setEnabled(false);
477  myFlowList->setItem(indexRow, 3, item);
478  // Update index
479  indexRow++;
480  }
481  // enable or disable flow and label button
483 }
484 
485 
486 void
488  // clear table
489  myVehicleTypeList->clearItems();
490  // set number of rows
491  myVehicleTypeList->setTableSize(int(myCalibratorParent->getCalibratorVehicleTypes().size()), 3);
492  // Configure list
493  myVehicleTypeList->setVisibleColumns(4);
494  myVehicleTypeList->setColumnWidth(0, 136);
495  myVehicleTypeList->setColumnWidth(1, 136);
497  myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
498  myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
499  myVehicleTypeList->setColumnText(2, "");
500  myVehicleTypeList->getRowHeader()->setWidth(0);
501  // Declare index for rows and pointer to FXTableItem
502  int indexRow = 0;
503  FXTableItem* item = 0;
504  // iterate over values
505  for (std::vector<GNECalibratorVehicleType>::const_iterator i = myCalibratorParent->getCalibratorVehicleTypes().begin(); i != myCalibratorParent->getCalibratorVehicleTypes().end(); i++) {
506  // Set id
507  item = new FXTableItem(toString(i->getVehicleTypeID()).c_str());
508  myVehicleTypeList->setItem(indexRow, 0, item);
509  // Set VClass
510  item = new FXTableItem(toString(i->getVClass()).c_str());
511  myVehicleTypeList->setItem(indexRow, 1, item);
512  // set remove
513  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
514  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
515  item->setEnabled(false);
516  myVehicleTypeList->setItem(indexRow, 2, item);
517  // Update index
518  indexRow++;
519  }
520  // enable or disable flow and label button
522 }
523 
524 void
526  // Enable or disable AddFlow button and flow list depending of currently there are routes and vehicle types defined
527  std::string errorMsg;
529  errorMsg = " and ";
530  }
532  myAddFlow->disable();
533  myFlowList->disable();
534  std::string errorMessage = "No " + (myCalibratorParent->getCalibratorRoutes().empty() ? (toString(SUMO_TAG_ROUTE) + "s") : ("")) + errorMsg +
535  (myCalibratorParent->getCalibratorVehicleTypes().empty() ? (toString(SUMO_TAG_VTYPE) + "s") : ("")) + " defined";
536  myLabelFlow->setText(errorMessage.c_str());
537  } else {
538  myAddFlow->enable();
539  myFlowList->enable();
540  myLabelFlow->setText(("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str());
541  }
542 }
543 
544 /****************************************************************************/
void updateFlowTable()
update data table with flows
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
Definition: GUIDesigns.h:412
const std::vector< GNECalibratorFlow > & getCalibratorFlows() const
get calibrator flows
description of a vehicle type
FXButton * myAddFlow
button for add new flow
a flow definition (used by router)
long onCmdAddVehicleType(FXObject *, FXSelector, void *)
add new vehicle type
Dialog to edit sequences, parameters, etc.. of Additionals.
long onCmdAddRoute(FXObject *, FXSelector, void *)
add new route
FXTable * myFlowList
list with flows
void updateRouteTable()
update data table with routes
const std::vector< GNECalibratorRoute > & getCalibratorRoutes() const
get calibrator routes
GNECalibrator * myCalibratorParent
pointer to calibrator parent
FXLabel * myLabelFlow
label for flows
begin/end of the description of a route
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:200
void updateFlowAndLabelButton()
update flow and label button
bool isTestingModeEnabled() const
check if netedit is running in testing mode
Definition: GNEViewNet.cpp:405
GNECalibrator * getCalibratorParent() const
get calibrator parent
std::vector< GNECalibratorVehicleType > myCopyOfCalibratorVehicleTypes
vector with a copy of calibrator vehicle types (used by reset)
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTable * myRouteList
list with routes
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
Definition: GUIDesigns.h:241
the edges of a route
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:56
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition: GUIDesigns.h:250
long onCmdClickedRoute(FXObject *, FXSelector, void *)
remove or edit route
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Definition: GUIDesigns.h:244
void setCalibratorVehicleTypes(const std::vector< GNECalibratorVehicleType > &calibratorVehicleType)
set calibrator vehicleTypes values
FXTable * myVehicleTypeList
list with vehicle types
Dialog for edit rerouter intervals.
long onCmdClickedFlow(FXObject *, FXSelector, void *)
remove or edit flow
void updateVehicleTypeTable()
update data table with vehicle types
long onCmdAddFlow(FXObject *, FXSelector, void *)
add new flow
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition: GUIDesigns.h:409
void setCalibratorRoutes(const std::vector< GNECalibratorRoute > &calibratorRoutes)
set calibrator route values
#define GUIDesignButtonIcon
button only with icon (23x23)
Definition: GUIDesigns.h:66
std::vector< GNECalibratorRoute > myCopyOfCalibratorRoutes
vector with a copy of calibrator routes (used by reset)
Dialog for edit calibrators.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
Dialog for edit rerouter intervals.
std::vector< GNECalibratorFlow > myCopyOfCalibratorFlows
vector with a copy of calibrator flows (used by reset)
#define GUIDesignLabelThick
label extended over frame with thick and with text justify to left
Definition: GUIDesigns.h:153
FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[]
const std::vector< GNECalibratorVehicleType > & getCalibratorVehicleTypes() const
get calibrator vehicleTypes
void setCalibratorFlows(const std::vector< GNECalibratorFlow > &calibratorFlows)
set calibrator flow values
Dialog for edit rerouter intervals.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
long onCmdClickedVehicleType(FXObject *, FXSelector, void *)
remove or edit vehicle type
long onCmdAccept(FXObject *, FXSelector, void *)