Eclipse SUMO - Simulation of Urban MObility
GNERouteFrame.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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // The Widget for remove network-elements
15 /****************************************************************************/
16 
17 
18 // ===========================================================================
19 // included modules
20 // ===========================================================================
21 #include <config.h>
22 
25 #include <utils/gui/div/GLHelper.h>
32 #include <netedit/GNEViewNet.h>
33 #include <netedit/GNENet.h>
34 #include <netedit/GNEUndoList.h>
35 #include <netedit/GNEViewParent.h>
37 
38 #include "GNERouteFrame.h"
39 
40 // ===========================================================================
41 // FOX callback mapping
42 // ===========================================================================
43 
44 FXDEFMAP(GNERouteFrame::RouteModeSelector) RouteModeSelectorMap[] = {
47 };
48 
49 FXDEFMAP(GNERouteFrame::ConsecutiveEdges) ConsecutiveEdgesMap[] = {
53 };
54 
55 FXDEFMAP(GNERouteFrame::NonConsecutiveEdges) NonConsecutiveEdgesMap[] = {
59 };
60 
61 // Object implementation
62 FXIMPLEMENT(GNERouteFrame::RouteModeSelector, FXGroupBox, RouteModeSelectorMap, ARRAYNUMBER(RouteModeSelectorMap))
63 FXIMPLEMENT(GNERouteFrame::ConsecutiveEdges, FXGroupBox, ConsecutiveEdgesMap, ARRAYNUMBER(ConsecutiveEdgesMap))
64 FXIMPLEMENT(GNERouteFrame::NonConsecutiveEdges, FXGroupBox, NonConsecutiveEdgesMap, ARRAYNUMBER(NonConsecutiveEdgesMap))
65 
66 
67 // ===========================================================================
68 // method definitions
69 // ===========================================================================
70 
71 // ---------------------------------------------------------------------------
72 // GNERouteFrame::RouteModeSelector - methods
73 // ---------------------------------------------------------------------------
74 
76  FXGroupBox(routeFrameParent->myContentFrame, "Route mode", GUIDesignGroupBoxFrame),
77  myRouteFrameParent(routeFrameParent),
78  myCurrentRouteMode(ROUTEMODE_CONSECUTIVE_EDGES),
79  myCurrentVehicleClass(SVC_PASSENGER),
80  myValidVClass(true) {
81  // first fill myRouteModesStrings
82  myRouteModesStrings.push_back(std::make_pair(ROUTEMODE_CONSECUTIVE_EDGES, "consecutive edges"));
83  myRouteModesStrings.push_back(std::make_pair(ROUTEMODE_NONCONSECUTIVE_EDGES, "non consecutive edges"));
84  // Create FXComboBox for Route mode
85  myRouteModeMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_ROUTEFRAME_ROUTEMODE, GUIDesignComboBox);
86  // fill myRouteModeMatchBox with route modes
87  for (const auto& i : myRouteModesStrings) {
88  myRouteModeMatchBox->appendItem(i.second.c_str());
89  }
90  // Set visible items
91  myRouteModeMatchBox->setNumVisible((int)myRouteModeMatchBox->getNumItems());
92  // Create FXComboBox for VClass
93  myVClassMatchBox = new FXComboBox(this, GUIDesignComboBoxNCol, this, MID_GNE_ROUTEFRAME_VCLASS, GUIDesignComboBox);
94  // fill myVClassMatchBox with all VCLass
95  for (const auto& i : SumoVehicleClassStrings.getStrings()) {
96  myVClassMatchBox->appendItem(i.c_str());
97  }
98  // set Passenger als default VCLass
99  myVClassMatchBox->setCurrentItem(7);
100  // Set visible items
101  myVClassMatchBox->setNumVisible((int)myVClassMatchBox->getNumItems());
102  // RouteModeSelector is always shown
103  show();
104 }
105 
106 
108 
109 
112  return myCurrentRouteMode;
113 }
114 
115 
118  return myCurrentVehicleClass;
119 }
120 
121 
122 bool
124  return myValidVClass;
125 }
126 
127 
128 void
130  // make sure that route isn't invalid
131  if (routemode != ROUTEMODE_INVALID) {
132  // restore color
133  myRouteModeMatchBox->setTextColor(FXRGB(0, 0, 0));
134  // set current route mode
135  myCurrentRouteMode = routemode;
136  // set item in myTypeMatchBox
137  for (int i = 0; i < (int)myRouteModesStrings.size(); i++) {
138  if (myRouteModesStrings.at(i).first == myCurrentRouteMode) {
139  myRouteModeMatchBox->setCurrentItem(i);
140  }
141  }
142  // show route attributes modul
143  myRouteFrameParent->myRouteAttributes->showAttributesCreatorModul(GNEAttributeCarrier::getTagProperties(SUMO_TAG_ROUTE), {});
144  // show modes moduls
145  if ((routemode == ROUTEMODE_CONSECUTIVE_EDGES) && (myCurrentVehicleClass != SVC_IGNORING)) {
146  myRouteFrameParent->myConsecutiveEdges->showConsecutiveEdgesModul();
147  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
148  } else if ((routemode == ROUTEMODE_NONCONSECUTIVE_EDGES) && (myCurrentVehicleClass != SVC_IGNORING)) {
149  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
150  myRouteFrameParent->myNonConsecutiveEdges->showNonConsecutiveEdgesModul();
151  }
152  } else {
153  // hide all moduls if route mode isnt' valid
154  myRouteFrameParent->myRouteAttributes->hideAttributesCreatorModul();
155  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
156  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
157  }
158 }
159 
160 
161 long
163  // first abort all current operations in moduls
164  myRouteFrameParent->myConsecutiveEdges->onCmdAbortRoute(0, 0, 0);
165  myRouteFrameParent->myNonConsecutiveEdges->onCmdAbortRoute(0, 0, 0);
166  // Check if value of myTypeMatchBox correspond of an allowed additional tags
167  for (const auto& i : myRouteModesStrings) {
168  if (i.second == myRouteModeMatchBox->getText().text()) {
169  // set color of myTypeMatchBox to black (valid)
170  myRouteModeMatchBox->setTextColor(FXRGB(0, 0, 0));
171  // Set new current type
172  myCurrentRouteMode = i.first;
173  // show route attributes modul
174  myRouteFrameParent->myRouteAttributes->showAttributesCreatorModul(GNEAttributeCarrier::getTagProperties(SUMO_TAG_ROUTE), {});
175  // show modes moduls
176  if ((myCurrentRouteMode == ROUTEMODE_CONSECUTIVE_EDGES) && (myCurrentVehicleClass != SVC_IGNORING)) {
177  myRouteFrameParent->myConsecutiveEdges->showConsecutiveEdgesModul();
178  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
179  } else if ((myCurrentRouteMode == ROUTEMODE_NONCONSECUTIVE_EDGES) && (myCurrentVehicleClass != SVC_IGNORING)) {
180  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
181  myRouteFrameParent->myNonConsecutiveEdges->showNonConsecutiveEdgesModul();
182  }
183  // Write Warning in console if we're in testing mode
184  WRITE_DEBUG(("Selected RouteMode '" + myRouteModeMatchBox->getText() + "' in RouteModeSelector").text());
185  return 1;
186  }
187  }
188  // if Route mode isn't correct, set ROUTEMODE_INVALID as current route mde
189  myCurrentRouteMode = ROUTEMODE_INVALID;
190  // hide all moduls if route mode isn't valid
191  myRouteFrameParent->myRouteAttributes->hideAttributesCreatorModul();
192  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
193  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
194  // set color of myTypeMatchBox to red (invalid)
195  myRouteModeMatchBox->setTextColor(FXRGB(255, 0, 0));
196  // Write Warning in console if we're in testing mode
197  WRITE_DEBUG("Selected invalid RouteMode in RouteModeSelector");
198  return 1;
199 }
200 
201 
202 long
204  // first abort all current operations in moduls
205  myRouteFrameParent->myConsecutiveEdges->onCmdAbortRoute(0, 0, 0);
206  myRouteFrameParent->myNonConsecutiveEdges->onCmdAbortRoute(0, 0, 0);
207  // Check if value of myTypeMatchBox correspond of an allowed additional tags
208  for (const auto& i : SumoVehicleClassStrings.getStrings()) {
209  if (i == myVClassMatchBox->getText().text()) {
210  // set color of myTypeMatchBox to black (valid)
211  myVClassMatchBox->setTextColor(FXRGB(0, 0, 0));
212  // Set new current type
213  myCurrentVehicleClass = SumoVehicleClassStrings.get(i);
214  // change flag
215  myValidVClass = true;
216  // show route attributes modul
217  myRouteFrameParent->myRouteAttributes->showAttributesCreatorModul(GNEAttributeCarrier::getTagProperties(SUMO_TAG_ROUTE), {});
218  // enable moduls if current route is valid
219  if (myCurrentRouteMode == ROUTEMODE_CONSECUTIVE_EDGES) {
220  myRouteFrameParent->myConsecutiveEdges->showConsecutiveEdgesModul();
221  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
222  } else if (myCurrentRouteMode == ROUTEMODE_NONCONSECUTIVE_EDGES) {
223  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
224  myRouteFrameParent->myNonConsecutiveEdges->showNonConsecutiveEdgesModul();
225  }
226  // Write Warning in console if we're in testing mode
227  WRITE_DEBUG(("Selected VClass '" + myVClassMatchBox->getText() + "' in RouteModeSelector").text());
228  return 1;
229  }
230  }
231  // if VClass name isn't correct, set SVC_IGNORING as current type
232  myCurrentVehicleClass = SVC_IGNORING;
233  // change flag
234  myValidVClass = false;
235  // hide all moduls if route mode isnt' valid
236  myRouteFrameParent->myRouteAttributes->hideAttributesCreatorModul();
237  myRouteFrameParent->myConsecutiveEdges->hideConsecutiveEdgesModul();
238  myRouteFrameParent->myNonConsecutiveEdges->hideNonConsecutiveEdgesModul();
239  // set color of myTypeMatchBox to red (invalid)
240  myVClassMatchBox->setTextColor(FXRGB(255, 0, 0));
241  // Write Warning in console if we're in testing mode
242  WRITE_DEBUG("Selected invalid VClass in RouteModeSelector");
243  return 1;
244 }
245 
246 // ---------------------------------------------------------------------------
247 // GNERouteFrame::ConsecutiveEdges - methods
248 // ---------------------------------------------------------------------------
249 
251  FXGroupBox(routeFrameParent->myContentFrame, "Consecutive edges", GUIDesignGroupBoxFrame),
252  myRouteFrameParent(routeFrameParent) {
253  // create label for route info
254  myInfoRouteLabel = new FXLabel(this, "No edges selected", 0, GUIDesignLabelFrameInformation);
255  // Create button for create routes
256  myCreateRouteButton = new FXButton(this, "Create route", 0, this, MID_GNE_EDGEPATH_FINISH, GUIDesignButton);
257  myCreateRouteButton->disable();
258  // Create button for create routes
259  myAbortCreationButton = new FXButton(this, "Abort creation", 0, this, MID_GNE_EDGEPATH_ABORT, GUIDesignButton);
260  myAbortCreationButton->disable();
261  // create button for remove last inserted edge
262  myRemoveLastInsertedEdge = new FXButton(this, "Remove last inserted edge", nullptr, this, MID_GNE_EDGEPATH_REMOVELAST, GUIDesignButton);
263  myRemoveLastInsertedEdge->disable();
264  // ConsecutiveEdges is by default shown
265  show();
266 }
267 
268 
270 
271 
272 void
274  // recalc before show (to avoid graphic problems)
275  recalc();
276  // show modul
277  show();
278 }
279 
280 
281 void
283  // first abort route creation
284  onCmdAbortRoute(0, 0, 0);
285  // now hide modul
286  hide();
287 }
288 
289 
290 bool
292  // check if currently we're creating a new route
293  if (myRouteEdges.empty()) {
294  // block undo/redo
295  myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation");
296  // add edge into list
297  myRouteEdges.push_back(edge);
298  // refresh edge candidates
299  refreshEdgeCandidates();
300  // enable create route and abort edge route
301  myCreateRouteButton->enable();
302  myAbortCreationButton->enable();
303  // edge added, then return true
304  return true;
305  } else {
306  // check if clicked edge is in the candidate edges
307  for (const auto& i : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
308  if ((i == edge) && GNEDemandElement::getRouteCalculatorInstance()->areEdgesConsecutives(myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass(), myRouteEdges.back(), edge)) {
309  // restore colors of outgoing edges
310  for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
311  for (const auto& k : j->getLanes()) {
312  k->setSpecialColor(nullptr);
313  }
314  }
315  // add new edge in the list of route edges
316  myRouteEdges.push_back(edge);
317  // enable remove last inserted edge
318  myRemoveLastInsertedEdge->enable();
319  // refresh edge candidates
320  refreshEdgeCandidates();
321  // edge added, then return true
322  return true;
323  }
324  }
325  // edge isn't a candidate edge, then return false
326  return false;
327  }
328 }
329 
330 
331 void
333  // first check that at least there is a candidate edge
334  if (myRouteEdges.size() > 0) {
335  // set selected color in all edges
336  for (const auto& j : myRouteEdges) {
337  for (const auto& k : j->getLanes()) {
338  k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor());
339  }
340  }
341  // set new candidate colors
342  for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
343  // check if exist a connection between both edges
344  if (GNEDemandElement::getRouteCalculatorInstance()->areEdgesConsecutives(myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass(), myRouteEdges.back(), j)) {
345  for (const auto& k : j->getLanes()) {
346  k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor());
347  }
348  }
349  }
350  // update route label
351  updateInfoRouteLabel();
352  // update view
353  myRouteFrameParent->getViewNet()->update();
354  }
355 }
356 
357 
358 void
360  // disable special color in candidate edges
361  for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
362  for (const auto& k : j->getLanes()) {
363  k->setSpecialColor(nullptr);
364  }
365  }
366  // disable special color in current route edges
367  for (const auto& j : myRouteEdges) {
368  for (const auto& k : j->getLanes()) {
369  k->setSpecialColor(nullptr);
370  }
371  }
372  // clear route edges
373  myRouteEdges.clear();
374 }
375 
376 
377 const std::vector<GNEEdge*>&
379  return myRouteEdges;
380 }
381 
382 
383 long
385  // check that route attributes are valid
386  if (!myRouteFrameParent->myRouteAttributes->areValuesValid()) {
387  myRouteFrameParent->myRouteAttributes->showWarningMessage();
388  } else if (myRouteEdges.size() > 0) {
389  // obtain attributes
390  std::map<SumoXMLAttr, std::string> valuesMap = myRouteFrameParent->myRouteAttributes->getAttributesAndValues(true);
391  // declare a route parameter
392  GNERouteHandler::RouteParameter routeParameters;
393  // Check if ID has to be generated
394  if (valuesMap.count(SUMO_ATTR_ID) == 0) {
395  routeParameters.routeID = myRouteFrameParent->getViewNet()->getNet()->generateDemandElementID("", SUMO_TAG_ROUTE);
396  } else {
397  routeParameters.routeID = valuesMap[SUMO_ATTR_ID];
398  }
399  // fill rest of elements
400  routeParameters.color = GNEAttributeCarrier::parse<RGBColor>(valuesMap.at(SUMO_ATTR_COLOR));
401  routeParameters.edges = myRouteEdges;
402  routeParameters.vClass = myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass();
403  // create route
404  GNERoute* route = new GNERoute(myRouteFrameParent->getViewNet(), routeParameters);
405  // add it into GNENet using GNEChange_DemandElement (to allow undo-redo)
406  myRouteFrameParent->getViewNet()->getUndoList()->p_begin("add " + route->getTagStr());
407  myRouteFrameParent->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(route, true), true);
408  myRouteFrameParent->getViewNet()->getUndoList()->p_end();
409  // abort route creation (because route was already created and vector/colors has to be cleaned)
410  onCmdAbortRoute(0, 0, 0);
411  // refresh route attributes
412  myRouteFrameParent->myRouteAttributes->refreshRows();
413  }
414  return 1;
415 }
416 
417 
418 long
420  // first check that there is route edges selected
421  if (myRouteEdges.size() > 0) {
422  // unblock undo/redo
423  myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo();
424  // clear edges
425  clearEdges();
426  // disable buttons
427  myCreateRouteButton->disable();
428  myAbortCreationButton->disable();
429  myRemoveLastInsertedEdge->disable();
430  // update route label
431  updateInfoRouteLabel();
432  // update view
433  myRouteFrameParent->getViewNet()->update();
434  }
435  return 1;
436 }
437 
438 
439 long
441  if (myRouteEdges.size() > 1) {
442  // restore colors of last inserted edge edges
443  for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
444  for (const auto& k : j->getLanes()) {
445  k->setSpecialColor(nullptr);
446  }
447  }
448  // add new edge in the list of route edges
449  myRouteEdges.pop_back();
450  // set selected color in all edges
451  for (const auto& j : myRouteEdges) {
452  for (const auto& k : j->getLanes()) {
453  k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateColor());
454  }
455  }
456  // set new candidate colors
457  for (const auto& j : myRouteEdges.back()->getGNEJunctionDestiny()->getGNEOutgoingEdges()) {
458  if (j != myRouteEdges.back()) {
459  for (const auto& k : j->getLanes()) {
460  k->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor());
461  }
462  }
463  }
464  // disable remove last edge button if there is only one edge
465  if (myRouteEdges.size() == 1) {
466  myRemoveLastInsertedEdge->disable();
467  }
468  // update route label
469  updateInfoRouteLabel();
470  // update view
471  myRouteFrameParent->getViewNet()->update();
472  // edge added, then return true
473  return true;
474  } else {
475  return false;
476  }
477 }
478 
479 void
481  if (myRouteEdges.size() > 0) {
482  // declare variables for route info
483  double length = 0;
484  double speed = 0;
485  for (const auto& i : myRouteEdges) {
486  length += i->getNBEdge()->getLength();
487  speed += i->getNBEdge()->getSpeed();
488  }
489  // declare ostringstream for label and fill it
490  std::ostringstream information;
491  information
492  << "- Number of Edges: " << toString(myRouteEdges.size()) << "\n"
493  << "- Length: " << toString(length) << "\n"
494  << "- Average speed: " << toString(speed / myRouteEdges.size());
495  // set new label
496  myInfoRouteLabel->setText(information.str().c_str());
497  } else {
498  myInfoRouteLabel->setText("No edges selected");
499  }
500 }
501 
502 // ---------------------------------------------------------------------------
503 // GNERouteFrame::NonConsecutiveEdges - methods
504 // ---------------------------------------------------------------------------
505 
507  FXGroupBox(routeFrameParent->myContentFrame, "Route creator", GUIDesignGroupBoxFrame),
508  myRouteFrameParent(routeFrameParent) {
509  // create label for route info
510  myInfoRouteLabel = new FXLabel(this, "No edges selected", 0, GUIDesignLabelFrameInformation);
511  // create button for finish route creation
512  myFinishCreationButton = new FXButton(this, "Finish route creation", nullptr, this, MID_GNE_EDGEPATH_FINISH, GUIDesignButton);
513  myFinishCreationButton->disable();
514  // create button for abort route creation
515  myAbortCreationButton = new FXButton(this, "Abort route creation", nullptr, this, MID_GNE_EDGEPATH_ABORT, GUIDesignButton);
516  myAbortCreationButton->disable();
517  // create button for remove last inserted edge
518  myRemoveLastInsertedEdge = new FXButton(this, "Remove last inserted edge", nullptr, this, MID_GNE_EDGEPATH_REMOVELAST, GUIDesignButton);
519  myRemoveLastInsertedEdge->disable();
520 }
521 
522 
524 }
525 
526 
527 void
529  // disable buttons
530  myFinishCreationButton->disable();
531  myAbortCreationButton->disable();
532  myRemoveLastInsertedEdge->disable();
533  // recalc before show (to avoid graphic problems)
534  recalc();
535  // show modul
536  show();
537 }
538 
539 
540 void
542  hide();
543 }
544 
545 
546 std::vector<GNEEdge*>
548  return mySelectedEdges;
549 }
550 
551 
552 bool
554  if (mySelectedEdges.empty() || ((mySelectedEdges.size() > 0) && (mySelectedEdges.back() != edge))) {
555  mySelectedEdges.push_back(edge);
556  // enable abort route button
557  myAbortCreationButton->enable();
558  // enable finish button
559  myFinishCreationButton->enable();
560  // disable undo/redo
561  myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo("route creation");
562  // set special color
563  for (auto i : edge->getLanes()) {
564  i->setSpecialColor(&myRouteFrameParent->getEdgeCandidateSelectedColor());
565  }
566  // calculate route if there is more than two edges
567  if (mySelectedEdges.size() > 1) {
568  // enable remove last edge button
569  myRemoveLastInsertedEdge->enable();
570  // calculate temporal route
571  myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute(myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass(), mySelectedEdges);
572  } else {
573  // Routes with only one edge are allowed
574  myTemporalRoute.clear();
575  myTemporalRoute.push_back(mySelectedEdges.front());
576  }
577  // update info route label
578  updateInfoRouteLabel();
579  return true;
580  } else {
581  return false;
582  }
583 }
584 
585 
586 void
588  // restore colors
589  for (const auto& i : mySelectedEdges) {
590  for (const auto& j : i->getLanes()) {
591  j->setSpecialColor(nullptr);
592  }
593  }
594  // clear edges
595  mySelectedEdges.clear();
596  myTemporalRoute.clear();
597 }
598 
599 
600 const std::vector<GNEEdge*>&
602  return myTemporalRoute;
603 }
604 
605 
606 bool
608  return mySelectedEdges.size() > 0;
609 }
610 
611 
612 long
614  // check that route attributes are valid
615  if (!myRouteFrameParent->myRouteAttributes->areValuesValid()) {
616  myRouteFrameParent->myRouteAttributes->showWarningMessage();
617  } else if (mySelectedEdges.size() > 0) {
618  // declare a route parameter
619  GNERouteHandler::RouteParameter routeParameters;
620  routeParameters.edges.reserve(myTemporalRoute.size());
621  for (const auto& i : myTemporalRoute) {
622  routeParameters.edges.push_back(myRouteFrameParent->myViewNet->getNet()->retrieveEdge(i->getID()));
623  }
624  // obtain attributes
625  std::map<SumoXMLAttr, std::string> valuesMap = myRouteFrameParent->myRouteAttributes->getAttributesAndValues(true);
626  // Check if ID has to be generated
627  if (valuesMap.count(SUMO_ATTR_ID) == 0) {
628  routeParameters.routeID = myRouteFrameParent->getViewNet()->getNet()->generateDemandElementID("", SUMO_TAG_ROUTE);
629  }
630  // fill rest of elements
631  routeParameters.color = GNEAttributeCarrier::parse<RGBColor>(valuesMap.at(SUMO_ATTR_COLOR));
632  routeParameters.vClass = myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass();
633  // create route
634  GNERoute* route = new GNERoute(myRouteFrameParent->getViewNet(), routeParameters);
635  // add it into GNENet using GNEChange_DemandElement (to allow undo-redo)
636  myRouteFrameParent->getViewNet()->getUndoList()->p_begin("add " + route->getTagStr());
637  myRouteFrameParent->getViewNet()->getUndoList()->add(new GNEChange_DemandElement(route, true), true);
638  myRouteFrameParent->getViewNet()->getUndoList()->p_end();
639  // abort route creation (because route was already created and vector/colors has to be cleaned)
640  onCmdAbortRoute(0, 0, 0);
641  // refresh route attributes
642  myRouteFrameParent->myRouteAttributes->refreshRows();
643  }
644  return 1;
645 }
646 
647 
648 long
650  // first check that there is route edges selected
651  if (mySelectedEdges.size() > 0) {
652  // unblock undo/redo
653  myRouteFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo();
654  // clear edges
655  clearEdges();
656  // disable buttons
657  myFinishCreationButton->disable();
658  myAbortCreationButton->disable();
659  myRemoveLastInsertedEdge->disable();
660  // update info route label
661  updateInfoRouteLabel();
662  // update view (to see the new route)
663  myRouteFrameParent->getViewNet()->update();
664  }
665  return 1;
666 }
667 
668 
669 long
671  if (mySelectedEdges.size() > 1) {
672  // remove special color of last selected edge
673  for (auto i : mySelectedEdges.back()->getLanes()) {
674  i->setSpecialColor(0);
675  }
676  // remove last edge
677  mySelectedEdges.pop_back();
678  // check if remove last route edge button has to be disabled
679  if (mySelectedEdges.size() == 1) {
680  // avoid remove last edge
681  myRemoveLastInsertedEdge->disable();
682  // Routes with only one edge are allowed
683  myTemporalRoute.clear();
684  myTemporalRoute.push_back(mySelectedEdges.front());
685  } else {
686  // calculate temporal route
687  myTemporalRoute = GNEDemandElement::getRouteCalculatorInstance()->calculateDijkstraRoute(myRouteFrameParent->myRouteModeSelector->getCurrentVehicleClass(), mySelectedEdges);
688  }
689  // update info route label
690  updateInfoRouteLabel();
691  // update view
692  myRouteFrameParent->myViewNet->update();
693  return true;
694  } else {
695  return false;
696  }
697 }
698 
699 void
701  if (myTemporalRoute.size() > 0) {
702  // declare variables for route info
703  double length = 0;
704  double speed = 0;
705  for (const auto& i : myTemporalRoute) {
706  length += i->getNBEdge()->getLength();
707  speed += i->getNBEdge()->getSpeed();
708  }
709  // declare ostringstream for label and fill it
710  std::ostringstream information;
711  information
712  << "- Number of Edges: " << toString(myTemporalRoute.size()) << "\n"
713  << "- Length: " << toString(length) << "\n"
714  << "- Average speed: " << toString(speed / myTemporalRoute.size());
715  // set new label
716  myInfoRouteLabel->setText(information.str().c_str());
717  } else {
718  myInfoRouteLabel->setText("No edges selected");
719  }
720 }
721 
722 // ---------------------------------------------------------------------------
723 // GNERouteFrame - methods
724 // ---------------------------------------------------------------------------
725 
726 GNERouteFrame::GNERouteFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
727  GNEFrame(horizontalFrameParent, viewNet, "Routes") {
728 
729  // create route mode Selector modul
731 
732  // Create route parameters
734 
735  // create consecutive edges modul
737 
738  // create non consecutive edges modul
740 
741  // set ROUTEMODE_CONSECUTIVE_EDGES as default mode
743 }
744 
745 
747 
748 
749 void
751  // refresh myRouteModeSelector
753  // show route frame
754  GNEFrame::show();
755 }
756 
757 
758 void
760  GNEFrame::hide();
761 }
762 
763 
764 void
766  // first check if current vClass is valid and edge exist
767  if (myRouteModeSelector->isValidVehicleClass() && clickedEdge) {
768  // continue dependig of current mode
771  // check if edge can be inserted in consecutive edges modul modul
772  if (myConsecutiveEdges->addEdge(clickedEdge)) {
773  WRITE_DEBUG("Edge added in ConsecutiveEdges mode");
774  } else {
775  WRITE_DEBUG("Edge wasn't added in ConsecutiveEdges mode");
776  }
777  break;
779  // check if edge can be inserted in non consecutive edges modul modul
780  if (myNonConsecutiveEdges->addEdge(clickedEdge)) {
781  WRITE_DEBUG("Edge added in NonConsecutiveEdges mode");
782  } else {
783  WRITE_DEBUG("Edge wasn't added in NonConsecutiveEdges mode");
784  }
785  break;
786  default:
787  break;
788  }
789  // update view
790  myViewNet->update();
791  }
792 }
793 
794 
795 void
797  // first check if current vClass is valid
799  // continue dependig of current mode
803  break;
806  break;
807  default:
808  break;
809  }
810  // update view
811  myViewNet->update();
812  }
813 }
814 
815 
816 void
818  // first check if current vClass is valid
820  // continue dependig of current mode
824  break;
827  break;
828  default:
829  break;
830  }
831  // update view
832  myViewNet->update();
833  }
834 }
835 
836 
837 void
839  // first check if current vClass is valid
841  // continue dependig of current mode
845  break;
848  break;
849  default:
850  break;
851  }
852  // update view
853  myViewNet->update();
854  }
855 }
856 
857 
858 void
860  // declare a vector with temporal route edges
861  std::vector<GNEEdge*> temporalRoute;
862  // obtain temporal route depending of current route mode
865  // convert GNEEdges to NBEdges
866  temporalRoute.reserve(myConsecutiveEdges->getRouteEdges().size());
867  for (const auto& i : myConsecutiveEdges->getRouteEdges()) {
868  temporalRoute.push_back(i);
869  }
870  break;
872  temporalRoute = myNonConsecutiveEdges->getTemporalRoute();
873  break;
874  default:
875  break;
876  }
877  // only draw if there is at least two edges
878  if (temporalRoute.size() > 1) {
879  // Add a draw matrix
880  glPushMatrix();
881  // Start with the drawing of the area traslating matrix to origin
882  glTranslated(0, 0, GLO_MAX);
883  // set orange color
885  // set line width
886  glLineWidth(5);
887  // draw first line
888  GLHelper::drawLine(temporalRoute.at(0)->getNBEdge()->getLanes().front().shape.front(),
889  temporalRoute.at(0)->getNBEdge()->getLanes().front().shape.back());
890  // draw rest of lines
891  for (int i = 1; i < (int)temporalRoute.size(); i++) {
892  GLHelper::drawLine(temporalRoute.at(i - 1)->getNBEdge()->getLanes().front().shape.back(),
893  temporalRoute.at(i)->getNBEdge()->getLanes().front().shape.front());
894  GLHelper::drawLine(temporalRoute.at(i)->getNBEdge()->getLanes().front().shape.front(),
895  temporalRoute.at(i)->getNBEdge()->getLanes().front().shape.back());
896  }
897  // Pop last matrix
898  glPopMatrix();
899  }
900 }
901 
902 /****************************************************************************/
GNERouteFrame::drawTemporalRoute
void drawTemporalRoute() const
draw temporal route
Definition: GNERouteFrame.cpp:859
GLO_MAX
@ GLO_MAX
empty max
Definition: GUIGlObjectTypes.h:165
SUMOVehicleClass
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
Definition: SUMOVehicleClass.h:133
GNERouteFrame::NonConsecutiveEdges::onCmdCreateRoute
long onCmdCreateRoute(FXObject *, FXSelector, void *)
Definition: GNERouteFrame.cpp:613
FXDEFMAP
FXDEFMAP(GNERouteFrame::RouteModeSelector) RouteModeSelectorMap[]
GNEChange_DemandElement
Definition: GNEChange_DemandElement.h:45
GNERouteFrame::hotkeyEnter
void hotkeyEnter()
function called when user press ENTER key
Definition: GNERouteFrame.cpp:796
GNERouteFrame::NonConsecutiveEdges
Definition: GNERouteFrame.h:179
GNERouteFrame::RouteModeSelector::setCurrentRouteMode
void setCurrentRouteMode(RouteMode routemode)
set current route mode type manually
Definition: GNERouteFrame.cpp:129
GNERouteFrame::NonConsecutiveEdges::hideNonConsecutiveEdgesModul
void hideNonConsecutiveEdgesModul()
show NonConsecutiveEdges
Definition: GNERouteFrame.cpp:541
GNEDemandElement::getRouteCalculatorInstance
static RouteCalculator * getRouteCalculatorInstance()
obtain instance of RouteCalculator
Definition: GNEDemandElement.cpp:280
GNERouteFrame::hotkeyEsc
void hotkeyEsc()
function called when user press ESC key
Definition: GNERouteFrame.cpp:838
GNEChange_DemandElement.h
GNERouteHandler::RouteParameter::edges
std::vector< GNEEdge * > edges
edges
Definition: GNERouteHandler.h:74
GNERouteFrame::NonConsecutiveEdges::getSelectedEdges
std::vector< GNEEdge * > getSelectedEdges() const
get current selected edgesm
Definition: GNERouteFrame.cpp:547
GNERouteFrame::RouteModeSelector::~RouteModeSelector
~RouteModeSelector()
destructor
Definition: GNERouteFrame.cpp:107
GNERouteFrame::NonConsecutiveEdges::NonConsecutiveEdges
NonConsecutiveEdges(GNERouteFrame *routeFrameParent)
FOX-declaration.
Definition: GNERouteFrame.cpp:506
GNERouteFrame::ConsecutiveEdges::myRemoveLastInsertedEdge
FXButton * myRemoveLastInsertedEdge
button for removing last inserted edge
Definition: GNERouteFrame.h:169
GNEFrameAttributesModuls::AttributesCreator
Definition: GNEFrameAttributesModuls.h:148
GNERouteFrame::ConsecutiveEdges::updateInfoRouteLabel
void updateInfoRouteLabel()
update InfoRouteLabel
Definition: GNERouteFrame.cpp:480
GNERouteFrame::NonConsecutiveEdges::myAbortCreationButton
FXButton * myAbortCreationButton
button for abort route creation
Definition: GNERouteFrame.h:246
GNERouteFrame::ConsecutiveEdges::myAbortCreationButton
FXButton * myAbortCreationButton
@bief FXButton for abort creating route
Definition: GNERouteFrame.h:166
GNERoute
Definition: GNERoute.h:41
Route
C++ TraCI client API implementation.
GUIDesignComboBoxNCol
#define GUIDesignComboBoxNCol
number of column of every combo box
Definition: GUIDesigns.h:217
GNERouteFrame::ConsecutiveEdges::onCmdCreateRoute
long onCmdCreateRoute(FXObject *, FXSelector, void *)
Definition: GNERouteFrame.cpp:384
GNEFrame
Definition: GNEFrame.h:34
SUMO_ATTR_COLOR
@ SUMO_ATTR_COLOR
A color information.
Definition: SUMOXMLDefinitions.h:704
GNERouteFrame::myRouteModeSelector
RouteModeSelector * myRouteModeSelector
route mode selector
Definition: GNERouteFrame.h:284
GNEViewNet
Definition: GNEViewNet.h:42
MID_GNE_EDGEPATH_ABORT
@ MID_GNE_EDGEPATH_ABORT
abort edge path creation
Definition: GUIAppEnum.h:676
GNERouteFrame::ConsecutiveEdges::~ConsecutiveEdges
~ConsecutiveEdges()
destructor
Definition: GNERouteFrame.cpp:269
SUMO_ATTR_ID
@ SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
MID_GNE_ROUTEFRAME_VCLASS
@ MID_GNE_ROUTEFRAME_VCLASS
select a VClass
Definition: GUIAppEnum.h:826
GNERouteFrame::RouteModeSelector::onCmdSelectRouteMode
long onCmdSelectRouteMode(FXObject *, FXSelector, void *)
Definition: GNERouteFrame.cpp:162
GLHelper.h
GUIDesigns.h
GNEViewNet::update
void update() const
Mark the entire GNEViewNet to be repainted later.
Definition: GNEViewNet.cpp:299
GNERouteFrame::myNonConsecutiveEdges
NonConsecutiveEdges * myNonConsecutiveEdges
Create routes using non consecutive edges modul.
Definition: GNERouteFrame.h:293
GNEFrame::myContentFrame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:124
GLHelper::setColor
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
Definition: GLHelper.cpp:621
GNERouteFrame::ConsecutiveEdges::getRouteEdges
const std::vector< GNEEdge * > & getRouteEdges() const
get temporal route
Definition: GNERouteFrame.cpp:378
GUIDesignButton
#define GUIDesignButton
Definition: GUIDesigns.h:50
GNERouteHandler::RouteParameter::color
RGBColor color
string for saving parsed route colors
Definition: GNERouteHandler.h:80
SumoVehicleClassStrings
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
GNERouteFrame.h
GUIAppEnum.h
GNEJunction.h
GUIDesignLabelFrameInformation
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:194
GNERouteFrame::NonConsecutiveEdges::myRemoveLastInsertedEdge
FXButton * myRemoveLastInsertedEdge
button for removing last inserted edge
Definition: GNERouteFrame.h:249
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNERoute.h
GNERouteFrame::NonConsecutiveEdges::clearEdges
void clearEdges()
clear edges (and restore colors)
Definition: GNERouteFrame.cpp:587
GNERouteFrame::show
void show()
show delete frame
Definition: GNERouteFrame.cpp:750
GNERouteFrame::NonConsecutiveEdges::myFinishCreationButton
FXButton * myFinishCreationButton
button for finish route creation
Definition: GNERouteFrame.h:243
GNERouteHandler::RouteParameter
struct for saving route parameters
Definition: GNERouteHandler.h:53
GNERouteFrame::ConsecutiveEdges::myCreateRouteButton
FXButton * myCreateRouteButton
FXButton for create routes.
Definition: GNERouteFrame.h:163
GNERouteFrame::RouteModeSelector::getCurrentVehicleClass
SUMOVehicleClass getCurrentVehicleClass() const
get current selected VClass
Definition: GNERouteFrame.cpp:117
GNERouteFrame::myRouteAttributes
GNEFrameAttributesModuls::AttributesCreator * myRouteAttributes
internal additional attributes
Definition: GNERouteFrame.h:287
RGBColor::ORANGE
static const RGBColor ORANGE
Definition: RGBColor.h:195
GNERouteFrame::ConsecutiveEdges::showConsecutiveEdgesModul
void showConsecutiveEdgesModul()
show ConsecutiveEdges modul
Definition: GNERouteFrame.cpp:273
GNERouteFrame
Definition: GNERouteFrame.h:31
GNEViewNet.h
SVC_PASSENGER
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
Definition: SUMOVehicleClass.h:159
GNERouteFrame::hotkeyBackSpace
void hotkeyBackSpace()
function called when user press BACKSPACE key
Definition: GNERouteFrame.cpp:817
GNERouteFrame::RouteModeSelector::getCurrentRouteMode
const RouteMode & getCurrentRouteMode() const
get current route mode
Definition: GNERouteFrame.cpp:111
GNERouteFrame::ROUTEMODE_INVALID
@ ROUTEMODE_INVALID
Definition: GNERouteFrame.h:37
GNEApplicationWindow.h
GNEEdge.h
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:121
GNERouteHandler::RouteParameter::routeID
std::string routeID
string for saving parsed Route ID
Definition: GNERouteHandler.h:68
GNERouteFrame::NonConsecutiveEdges::onCmdRemoveLastRouteEdge
long onCmdRemoveLastRouteEdge(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted edge".
Definition: GNERouteFrame.cpp:670
GLHelper::drawLine
static void drawLine(const Position &beg, double rot, double visLength)
Draws a thin line.
Definition: GLHelper.cpp:274
GNERouteFrame::ConsecutiveEdges
Definition: GNERouteFrame.h:108
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:239
GNEEdge::getLanes
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
Definition: GNEEdge.cpp:874
GNELane.h
GNERouteFrame::ConsecutiveEdges::onCmdRemoveLastRouteEdge
long onCmdRemoveLastRouteEdge(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted edge".
Definition: GNERouteFrame.cpp:440
GNERouteFrame::RouteMode
RouteMode
route creation modes
Definition: GNERouteFrame.h:36
GNEViewParent.h
GLIncludes.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GNERouteFrame::RouteModeSelector::isValidVehicleClass
bool isValidVehicleClass() const
check if current VClass is Valid
Definition: GNERouteFrame.cpp:123
GNERouteFrame::myConsecutiveEdges
ConsecutiveEdges * myConsecutiveEdges
Create routes using consecutive edges modul.
Definition: GNERouteFrame.h:290
GNERouteFrame::NonConsecutiveEdges::getTemporalRoute
const std::vector< GNEEdge * > & getTemporalRoute() const
get temporal route
Definition: GNERouteFrame.cpp:601
GNERouteFrame::ConsecutiveEdges::refreshEdgeCandidates
void refreshEdgeCandidates()
refresh edge candidates
Definition: GNERouteFrame.cpp:332
GNERouteFrame::ConsecutiveEdges::hideConsecutiveEdgesModul
void hideConsecutiveEdgesModul()
hide ConsecutiveEdges modul
Definition: GNERouteFrame.cpp:282
GNERouteFrame::ConsecutiveEdges::ConsecutiveEdges
ConsecutiveEdges(GNERouteFrame *routeFrameParent)
FOX-declaration.
Definition: GNERouteFrame.cpp:250
GNERouteHandler::RouteParameter::vClass
SUMOVehicleClass vClass
vClass used by this route
Definition: GNERouteHandler.h:77
GUIDesignComboBox
#define GUIDesignComboBox
Definition: GUIDesigns.h:205
GNERouteFrame::ConsecutiveEdges::addEdge
bool addEdge(GNEEdge *edge)
add edge to current route (note: edge must be included in set of candidate edges
Definition: GNERouteFrame.cpp:291
GNERouteFrame::~GNERouteFrame
~GNERouteFrame()
Destructor.
Definition: GNERouteFrame.cpp:746
MID_GNE_ROUTEFRAME_ROUTEMODE
@ MID_GNE_ROUTEFRAME_ROUTEMODE
select a route mode
Definition: GUIAppEnum.h:824
GNERouteFrame::NonConsecutiveEdges::myInfoRouteLabel
FXLabel * myInfoRouteLabel
label with route info
Definition: GNERouteFrame.h:234
GNERouteFrame::handleEdgeClick
void handleEdgeClick(GNEEdge *clickedEdge)
handle edge click
Definition: GNERouteFrame.cpp:765
SUMO_TAG_ROUTE
@ SUMO_TAG_ROUTE
begin/end of the description of a route
Definition: SUMOXMLDefinitions.h:125
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1298
GNERouteFrame::ROUTEMODE_NONCONSECUTIVE_EDGES
@ ROUTEMODE_NONCONSECUTIVE_EDGES
Definition: GNERouteFrame.h:39
GNERouteFrame::ROUTEMODE_CONSECUTIVE_EDGES
@ ROUTEMODE_CONSECUTIVE_EDGES
Definition: GNERouteFrame.h:38
GNEDemandElement::RouteCalculator::calculateDijkstraRoute
std::vector< GNEEdge * > calculateDijkstraRoute(SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra route between a list of partial edges
Definition: GNEDemandElement.cpp:76
GNERouteFrame::ConsecutiveEdges::myInfoRouteLabel
FXLabel * myInfoRouteLabel
label with route info
Definition: GNERouteFrame.h:160
GNERouteFrame::GNERouteFrame
GNERouteFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNERouteFrame.cpp:726
GNERouteFrame::NonConsecutiveEdges::updateInfoRouteLabel
void updateInfoRouteLabel()
update InfoRouteLabel
Definition: GNERouteFrame.cpp:700
GNERouteFrame::ConsecutiveEdges::onCmdAbortRoute
long onCmdAbortRoute(FXObject *, FXSelector, void *)
Called when the user press create route button.
Definition: GNERouteFrame.cpp:419
GNERouteFrame::ConsecutiveEdges::clearEdges
void clearEdges()
clear edges (and restore colors)
Definition: GNERouteFrame.cpp:359
GNERouteFrame::NonConsecutiveEdges::onCmdAbortRoute
long onCmdAbortRoute(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
Definition: GNERouteFrame.cpp:649
GNEAttributeCarrier::getTagStr
const std::string & getTagStr() const
get tag assigned to this object in string format
Definition: GNEAttributeCarrier.cpp:1267
GNERouteFrame::NonConsecutiveEdges::~NonConsecutiveEdges
~NonConsecutiveEdges()
destructor
Definition: GNERouteFrame.cpp:523
MID_GNE_EDGEPATH_FINISH
@ MID_GNE_EDGEPATH_FINISH
finish edge path creation
Definition: GUIAppEnum.h:678
GNERouteFrame::hide
void hide()
hide delete frame
Definition: GNERouteFrame.cpp:759
GNERouteFrame::RouteModeSelector
Definition: GNERouteFrame.h:46
SVC_IGNORING
@ SVC_IGNORING
vehicles ignoring classes
Definition: SUMOVehicleClass.h:135
GNERouteFrame::NonConsecutiveEdges::showNonConsecutiveEdgesModul
void showNonConsecutiveEdgesModul()
show NonConsecutiveEdges
Definition: GNERouteFrame.cpp:528
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:107
GNERouteFrame::RouteModeSelector::onCmdSelectVClass
long onCmdSelectVClass(FXObject *, FXSelector, void *)
Called when the user select another VClass.
Definition: GNERouteFrame.cpp:203
GNERouteFrame::NonConsecutiveEdges::isValid
bool isValid(SUMOVehicleClass vehicleClass) const
check if from and to edges create a valid route
Definition: GNERouteFrame.cpp:607
WRITE_DEBUG
#define WRITE_DEBUG(msg)
Definition: MsgHandler.h:284
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:116
GNERouteFrame::NonConsecutiveEdges::addEdge
bool addEdge(GNEEdge *edge)
set edge from (and change color)
Definition: GNERouteFrame.cpp:553
GNENet.h
MID_GNE_EDGEPATH_REMOVELAST
@ MID_GNE_EDGEPATH_REMOVELAST
remove last inserted element in path
Definition: GUIAppEnum.h:680
GNEUndoList.h