SUMO - Simulation of Urban MObility
GNECalibratorDialog.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 // Dialog for edit calibrators
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>
36 
37 #include "GNECalibratorDialog.h"
38 #include "GNECalibrator.h"
39 #include "GNEViewNet.h"
43 
44 
45 // ===========================================================================
46 // FOX callback mapping
47 // ===========================================================================
48 
49 FXDEFMAP(GNECalibratorDialog) GNECalibratorDialogMap[] = {
59 };
60 
61 // Object implementation
62 FXIMPLEMENT(GNECalibratorDialog, FXDialogBox, GNECalibratorDialogMap, ARRAYNUMBER(GNECalibratorDialogMap))
63 
64 // ===========================================================================
65 // member method definitions
66 // ===========================================================================
67 
69  GNEAdditionalDialog(calibratorParent, 640, 480),
70  myCalibratorParent(calibratorParent) {
71 
72  // Create two columns, one for Routes and VehicleTypes, and other for Flows
73  FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
74  FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
75  FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
76 
77  // create add buton and label for routes
78  FXHorizontalFrame* buttonAndLabelRoute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
79  myAddRoute = new FXButton(buttonAndLabelRoute, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_ROUTE, GUIDesignButtonIcon);
80  new FXLabel(buttonAndLabelRoute, ("Add new " + toString(SUMO_TAG_ROUTE) + "s").c_str(), 0, GUIDesignLabelThick);
81 
82  // Create table in left frame
83  myRouteList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_ROUTE, GUIDesignTableAdditionals);
84  myRouteList->setSelBackColor(FXRGBA(255, 255, 255, 255));
85  myRouteList->setSelTextColor(FXRGBA(0, 0, 0, 255));
86  myRouteList->setEditable(false);
87 
88  // create add buton and label for vehicle types
89  FXHorizontalFrame* buttonAndLabelVehicleType = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
90  myAddVehicleType = new FXButton(buttonAndLabelVehicleType, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_VEHICLETYPE, GUIDesignButtonIcon);
91  new FXLabel(buttonAndLabelVehicleType, ("Add new " + toString(SUMO_TAG_VTYPE) + "s").c_str(), 0, GUIDesignLabelThick);
92 
93  // Create table in left frame
94  myVehicleTypeList = new FXTable(columnLeft, this, MID_GNE_CALIBRATORDIALOG_TABLE_VEHICLETYPE, GUIDesignTableAdditionals);
95  myVehicleTypeList->setSelBackColor(FXRGBA(255, 255, 255, 255));
96  myVehicleTypeList->setSelTextColor(FXRGBA(0, 0, 0, 255));
97  myVehicleTypeList->setEditable(false);
98 
99  // create add buton and label for flows in right frame
100  FXHorizontalFrame* buttonAndLabelFlow = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
101  myAddFlow = new FXButton(buttonAndLabelFlow, "", GUIIconSubSys::getIcon(ICON_ADD), this, MID_GNE_CALIBRATORDIALOG_ADD_FLOW, GUIDesignButtonIcon);
102  myLabelFlow = new FXLabel(buttonAndLabelFlow, ("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str(), 0, GUIDesignLabelThick);
103 
104  // Create table in right frame
105  myFlowList = new FXTable(columnRight, this, MID_GNE_CALIBRATORDIALOG_TABLE_FLOW, GUIDesignTableAdditionals);
106  myFlowList->setSelBackColor(FXRGBA(255, 255, 255, 255));
107  myFlowList->setSelTextColor(FXRGBA(0, 0, 0, 255));
108  myFlowList->setEditable(false);
109 
110  // obtain copy of calibrator values
111  myCopyOfCalibratorRoutes = myCalibratorParent->getCalibratorRoutes();
112  myCopyOfCalibratorFlows = myCalibratorParent->getCalibratorFlows();
113  myCopyOfCalibratorVehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
114 
115  // update tables
116  updateRouteTable();
117  updateFlowTable();
118  updateVehicleTypeTable();
119 
120  // Execute additional dialog (To make it modal)
121  execute();
122 }
123 
124 
126 }
127 
128 
131  return myCalibratorParent;
132 }
133 
134 
135 long
136 GNECalibratorDialog::onCmdAccept(FXObject*, FXSelector, void*) {
137  // Stop Modal
138  getApp()->stopModal(this, TRUE);
139  return 1;
140 }
141 
142 
143 long
144 GNECalibratorDialog::onCmdCancel(FXObject*, FXSelector, void*) {
145  // set original VTypes, routes and flows into calibrator
149  // Stop Modal
150  getApp()->stopModal(this, FALSE);
151  return 1;
152 }
153 
154 
155 long
156 GNECalibratorDialog::onCmdReset(FXObject*, FXSelector, void*) {
157  // set original VTypes, routes and flows into calibrator
161  // update tables
164  updateFlowTable();
165  return 1;
166 }
167 
168 
169 long
170 GNECalibratorDialog::onCmdAddRoute(FXObject*, FXSelector, void*) {
171  // create empty calibrator route and configure it with GNECalibratorRouteDialog
173  if (GNECalibratorRouteDialog(this, newRoute, false).execute() == TRUE) {
174  // if new route was sucesfully configured, add it to calibrator routes
175  std::vector<GNECalibratorRoute> vehicleTypes = myCalibratorParent->getCalibratorRoutes();
176  vehicleTypes.push_back(newRoute);
178  // update routes table
180  return 1;
181  } else {
182  return 0;
183  }
184 }
185 
186 
187 long
188 GNECalibratorDialog::onCmdClickedRoute(FXObject*, FXSelector, void*) {
189  // check if some delete button was pressed
190  for (int i = 0; i < (int)myCalibratorParent->getCalibratorRoutes().size(); i++) {
191  if (myRouteList->getItem(i, 2)->hasFocus()) {
192  // find all flows that contains route to delete as "route" parameter
193  std::vector<GNECalibratorFlow> calibratorFlowsToErase;
194  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
195  if (j->getRoute() == myRouteList->getItem(i, 0)->getText().text()) {
196  calibratorFlowsToErase.push_back(*j);
197  }
198  }
199  // if there are flows that has route to remove as "route" parameter
200  if (calibratorFlowsToErase.size() > 0) {
201  // write warning if netedit is running in testing mode
202  if (OptionsCont::getOptions().getBool("gui-testing-debug")) {
203  WRITE_WARNING("Opening FXMessageBox of type 'question'");
204  }
205  // open question dialog box
206  FXuint answer = FXMessageBox::question(myCalibratorParent->getViewNet()->getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s",
207  ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() +
208  "' will remove " + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) +
209  ". Continue?").c_str());
210  if (answer != 1) { //1:yes, 2:no, 4:esc
211  // write warning if netedit is running in testing mode
212  if ((answer == 2) && (OptionsCont::getOptions().getBool("gui-testing-debug"))) {
213  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'No'");
214  } else if ((answer == 4) && (OptionsCont::getOptions().getBool("gui-testing-debug"))) {
215  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'ESC'");
216  }
217  // abort deletion of route
218  return 0;
219  } else {
220  // write warning if netedit is running in testing mode
221  if (OptionsCont::getOptions().getBool("gui-testing-debug")) {
222  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'Yes'");
223  }
224  // remove flows with route to delete
225  std::vector<GNECalibratorFlow> flowSubstraction;
226  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
227  if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
228  flowSubstraction.push_back(*j);
229  }
230  }
231  // set substracted flows into calibrator
232  myCalibratorParent->setCalibratorFlows(flowSubstraction);
233  // update flows table
234  updateFlowTable();
235  }
236  }
237  // remove route of calibrator routes
238  std::vector<GNECalibratorRoute> vehicleTypes = myCalibratorParent->getCalibratorRoutes();
239  vehicleTypes.erase(vehicleTypes.begin() + i);
241  // update routes table
243  return 1;
244  }
245  }
246  // check if other field was pressed
247  for (int i = 0; i < (int)myCalibratorParent->getCalibratorRoutes().size(); i++) {
248  if (myRouteList->getItem(i, 0)->hasFocus() || myRouteList->getItem(i, 1)->hasFocus()) {
249  // modify route of calibrator routes
250  std::vector<GNECalibratorRoute> routes = myCalibratorParent->getCalibratorRoutes();
251  if (GNECalibratorRouteDialog(this, routes.at(i), true).execute() == TRUE) {
253  // update routes table
255  }
256  return 1;
257  }
258  }
259  // nothing to do
260  return 0;
261 }
262 
263 
264 long
265 GNECalibratorDialog::onCmdAddFlow(FXObject*, FXSelector, void*) {
266  // create empty calibrator flow and configure it with GNECalibratorFlowDialog
268  if (GNECalibratorFlowDialog(this, newFlow, false).execute() == TRUE) {
269  // if new flow was sucesfully configured, add it to calibrator flows
270  std::vector<GNECalibratorFlow> vehicleTypes = myCalibratorParent->getCalibratorFlows();
271  vehicleTypes.push_back(newFlow);
272  myCalibratorParent->setCalibratorFlows(vehicleTypes);
273  // update flows table
274  updateFlowTable();
275  return 1;
276  } else {
277  return 0;
278  }
279 }
280 
281 
282 long
283 GNECalibratorDialog::onCmdClickedFlow(FXObject*, FXSelector, void*) {
284  // check if some delete button was pressed
285  for (int i = 0; i < (int)myCalibratorParent->getCalibratorFlows().size(); i++) {
286  if (myFlowList->getItem(i, 3)->hasFocus()) {
287  // remove flow of calibrator flows
288  std::vector<GNECalibratorFlow> flows = myCalibratorParent->getCalibratorFlows();
289  flows.erase(flows.begin() + i);
291  // update flows table
292  updateFlowTable();
293  return 1;
294  }
295  }
296  // check if other field was pressed
297  for (int i = 0; i < (int)myCalibratorParent->getCalibratorFlows().size(); i++) {
298  if (myFlowList->getItem(i, 0)->hasFocus() || myFlowList->getItem(i, 1)->hasFocus() || myFlowList->getItem(i, 2)->hasFocus()) {
299  // modify flow of calibrator flows
300  std::vector<GNECalibratorFlow> flows = myCalibratorParent->getCalibratorFlows();
301  if (GNECalibratorFlowDialog(this, flows.at(i), true).execute() == TRUE) {
303  // update flows table
304  updateFlowTable();
305  }
306  return 1;
307  }
308  }
309  // nothing to do
310  return 0;
311 }
312 
313 
314 long
315 GNECalibratorDialog::onCmdAddVehicleType(FXObject*, FXSelector, void*) {
316  // create empty calibrator flow and configure it with GNECalibratorVehicleTypeDialog
318  if (GNECalibratorVehicleTypeDialog(this, newVehicleType, false).execute() == TRUE) {
319  // if new vehicle type was sucesfully configured, add it to calibrator vehicle types
320  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
321  vehicleTypes.push_back(newVehicleType);
323  // update vehicle types table
325  return 1;
326  } else {
327  return 0;
328  }
329 }
330 
331 
332 long
333 GNECalibratorDialog::onCmdClickedVehicleType(FXObject*, FXSelector, void*) {
334  // check if some delete button was pressed
335  for (int i = 0; i < (int)myCalibratorParent->getCalibratorVehicleTypes().size(); i++) {
336  if (myVehicleTypeList->getItem(i, 2)->hasFocus()) {
337  // find all flows that contains vehicle type to delete as "vehicle type" parameter
338  std::vector<GNECalibratorFlow> calibratorFlowsToErase;
339  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
340  if (j->getVehicleType() == myVehicleTypeList->getItem(i, 0)->getText().text()) {
341  calibratorFlowsToErase.push_back(*j);
342  }
343  }
344  // if there are flows that has vehicle type to remove as "vehicle type" parameter
345  if (calibratorFlowsToErase.size() > 0) {
346  FXuint answer = FXMessageBox::question(myCalibratorParent->getViewNet()->getApp(), MBOX_YES_NO, ("Remove " + toString(SUMO_TAG_FLOW) + "s").c_str(), "%s",
347  ("Deletion of " + toString(SUMO_TAG_ROUTE) + " '" + myRouteList->getItem(i, 0)->getText().text() +
348  "' will remove " + toString(calibratorFlowsToErase.size()) + " " + toString(SUMO_TAG_FLOW) + (calibratorFlowsToErase.size() > 1 ? ("s") : ("")) +
349  ". Continue?").c_str());
350  if (answer != 1) { //1:yes, 2:no, 4:esc
351  // write warning if netedit is running in testing mode
352  if ((answer == 2) && (OptionsCont::getOptions().getBool("gui-testing-debug"))) {
353  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'No'");
354  } else if ((answer == 4) && (OptionsCont::getOptions().getBool("gui-testing-debug"))) {
355  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'ESC'");
356  }
357  // abort deletion of vehicle type
358  return 0;
359  } else {
360  // write warning if netedit is running in testing mode
361  if (OptionsCont::getOptions().getBool("gui-testing-debug")) {
362  WRITE_WARNING("Closed FXMessageBox of type 'question' with 'Yes'");
363  }
364  // remove flows with vehicle type to delete
365  std::vector<GNECalibratorFlow> flowSubstraction;
366  for (std::vector<GNECalibratorFlow>::const_iterator j = myCalibratorParent->getCalibratorFlows().begin(); j != myCalibratorParent->getCalibratorFlows().end(); j++) {
367  if (std::find(calibratorFlowsToErase.begin(), calibratorFlowsToErase.end(), *j) == calibratorFlowsToErase.end()) {
368  flowSubstraction.push_back(*j);
369  }
370  }
371  // set substracted flows into calibrator
372  myCalibratorParent->setCalibratorFlows(flowSubstraction);
373  // update flows table
374  updateFlowTable();
375  }
376  }
377  // remove vehicle type of calibrator vehicle types
378  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
379  vehicleTypes.erase(vehicleTypes.begin() + i);
381  // update vehicle types table
383  return 1;
384  }
385  }
386  // check if other field was pressed
387  for (int i = 0; i < (int)myCalibratorParent->getCalibratorVehicleTypes().size(); i++) {
388  if (myVehicleTypeList->getItem(i, 0)->hasFocus() || myVehicleTypeList->getItem(i, 1)->hasFocus()) {
389  // modify vehicle type of calibratorVehicleTypes
390  std::vector<GNECalibratorVehicleType> vehicleTypes = myCalibratorParent->getCalibratorVehicleTypes();
391  if (GNECalibratorVehicleTypeDialog(this, vehicleTypes.at(i), true).execute() == TRUE) {
393  // update vehicle types table
395  }
396  return 1;
397  }
398  }
399  // nothing to do
400  return 0;
401 }
402 
403 
404 void
406  // clear table
407  myRouteList->clearItems();
408  // set number of rows
409  myRouteList->setTableSize(int(myCalibratorParent->getCalibratorRoutes().size()), 3);
410  // Configure list
411  myRouteList->setVisibleColumns(4);
412  myRouteList->setColumnWidth(0, 136);
413  myRouteList->setColumnWidth(1, 136);
414  myRouteList->setColumnWidth(2, GUIDesignTableIconCellWidth);
415  myRouteList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
416  myRouteList->setColumnText(1, toString(SUMO_ATTR_EDGES).c_str());
417  myRouteList->setColumnText(2, "");
418  myRouteList->getRowHeader()->setWidth(0);
419  // Declare index for rows and pointer to FXTableItem
420  int indexRow = 0;
421  FXTableItem* item = 0;
422  // iterate over values
423  for (std::vector<GNECalibratorRoute>::const_iterator i = myCalibratorParent->getCalibratorRoutes().begin(); i != myCalibratorParent->getCalibratorRoutes().end(); i++) {
424  // Set ID
425  item = new FXTableItem(toString(i->getRouteID()).c_str());
426  myRouteList->setItem(indexRow, 0, item);
427  // Set edges
428  item = new FXTableItem(toString(i->getEdgesIDs()).c_str());
429  myRouteList->setItem(indexRow, 1, item);
430  // set remove
431  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
432  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
433  item->setEnabled(false);
434  myRouteList->setItem(indexRow, 2, item);
435  // Update index
436  indexRow++;
437  }
438  // enable or disable flow and label button
440 }
441 
442 
443 void
445  // clear table
446  myFlowList->clearItems();
447  // set number of rows
448  myFlowList->setTableSize(int(myCalibratorParent->getCalibratorFlows().size()), 4);
449  // Configure list
450  myFlowList->setVisibleColumns(4);
451  myFlowList->setColumnWidth(0, 92);
452  myFlowList->setColumnWidth(1, 90);
453  myFlowList->setColumnWidth(2, 90);
454  myFlowList->setColumnWidth(3, GUIDesignTableIconCellWidth);
455  myFlowList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
456  myFlowList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
457  myFlowList->setColumnText(2, toString(SUMO_ATTR_ROUTE).c_str());
458  myFlowList->setColumnText(3, "");
459  myFlowList->getRowHeader()->setWidth(0);
460  // Declare index for rows and pointer to FXTableItem
461  int indexRow = 0;
462  FXTableItem* item = 0;
463  // iterate over values
464  for (std::vector<GNECalibratorFlow>::const_iterator i = myCalibratorParent->getCalibratorFlows().begin(); i != myCalibratorParent->getCalibratorFlows().end(); i++) {
465  // Set id
466  item = new FXTableItem(toString(i->getFlowID()).c_str());
467  myFlowList->setItem(indexRow, 0, item);
468  // Set vehicle type
469  item = new FXTableItem(toString(i->getVehicleType()).c_str());
470  myFlowList->setItem(indexRow, 1, item);
471  // Set route
472  item = new FXTableItem(toString(i->getRoute()).c_str());
473  myFlowList->setItem(indexRow, 2, item);
474  // set remove
475  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
476  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
477  item->setEnabled(false);
478  myFlowList->setItem(indexRow, 3, item);
479  // Update index
480  indexRow++;
481  }
482  // enable or disable flow and label button
484 }
485 
486 
487 void
489  // clear table
490  myVehicleTypeList->clearItems();
491  // set number of rows
492  myVehicleTypeList->setTableSize(int(myCalibratorParent->getCalibratorVehicleTypes().size()), 3);
493  // Configure list
494  myVehicleTypeList->setVisibleColumns(4);
495  myVehicleTypeList->setColumnWidth(0, 136);
496  myVehicleTypeList->setColumnWidth(1, 136);
498  myVehicleTypeList->setColumnText(0, toString(SUMO_ATTR_ID).c_str());
499  myVehicleTypeList->setColumnText(1, toString(SUMO_ATTR_VCLASS).c_str());
500  myVehicleTypeList->setColumnText(2, "");
501  myVehicleTypeList->getRowHeader()->setWidth(0);
502  // Declare index for rows and pointer to FXTableItem
503  int indexRow = 0;
504  FXTableItem* item = 0;
505  // iterate over values
506  for (std::vector<GNECalibratorVehicleType>::const_iterator i = myCalibratorParent->getCalibratorVehicleTypes().begin(); i != myCalibratorParent->getCalibratorVehicleTypes().end(); i++) {
507  // Set id
508  item = new FXTableItem(toString(i->getVehicleTypeID()).c_str());
509  myVehicleTypeList->setItem(indexRow, 0, item);
510  // Set VClass
511  item = new FXTableItem(toString(i->getVClass()).c_str());
512  myVehicleTypeList->setItem(indexRow, 1, item);
513  // set remove
514  item = new FXTableItem("", GUIIconSubSys::getIcon(ICON_REMOVE));
515  item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
516  item->setEnabled(false);
517  myVehicleTypeList->setItem(indexRow, 2, item);
518  // Update index
519  indexRow++;
520  }
521  // enable or disable flow and label button
523 }
524 
525 void
527  // Enable or disable AddFlow button and flow list depending of currently there are routes and vehicle types defined
528  std::string errorMsg;
530  errorMsg = " and ";
531  }
533  myAddFlow->disable();
534  myFlowList->disable();
535  std::string errorMessage = "No " + (myCalibratorParent->getCalibratorRoutes().empty() ? (toString(SUMO_TAG_ROUTE) + "s") : ("")) + errorMsg +
536  (myCalibratorParent->getCalibratorVehicleTypes().empty() ? (toString(SUMO_TAG_VTYPE) + "s") : ("")) + " defined";
537  myLabelFlow->setText(errorMessage.c_str());
538  } else {
539  myAddFlow->enable();
540  myFlowList->enable();
541  myLabelFlow->setText(("Add new " + toString(SUMO_TAG_FLOW) + "s").c_str());
542  }
543 }
544 
545 /****************************************************************************/
void updateFlowTable()
update data table with flows
#define GUIDesignTableIconCellWidth
width of cells that only contains an Icon
Definition: GUIDesigns.h:412
const std::vector< GNECalibratorRoute > & getCalibratorRoutes() const
get calibrator routes
description of a vehicle type
const std::vector< GNECalibratorVehicleType > & getCalibratorVehicleTypes() const
get calibrator vehicleTypes
FXButton * myAddFlow
button for add new flow
a flow definition (used by router)
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
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
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
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:65
void updateFlowAndLabelButton()
update flow and label button
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
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
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.
const std::vector< GNECalibratorFlow > & getCalibratorFlows() const
get calibrator flows
Dialog for edit rerouter intervals.
GNECalibrator * getCalibratorParent() const
get calibrator parent
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[]
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 *)