Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNERerouterIntervalDialog.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// Dialog for edit rerouter intervals
19/****************************************************************************/
20
21#include <netedit/GNENet.h>
23#include <netedit/GNEUndoList.h>
24#include <netedit/GNEViewNet.h>
28
30
31// ===========================================================================
32// FOX callback mapping
33// ===========================================================================
34
35FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[] = {
36 // called when user click over buttons
42
43 // clicked table (Double and triple clicks allow to remove element more fast)
59
60 // use "update" instead of "command" to avoid problems mit icons
67};
68
69// Object implementation
70FXIMPLEMENT(GNERerouterIntervalDialog, GNEAdditionalDialog, GNERerouterIntervalDialogMap, ARRAYNUMBER(GNERerouterIntervalDialogMap))
71
72// ===========================================================================
73// member method definitions
74// ===========================================================================
75
76GNERerouterIntervalDialog::GNERerouterIntervalDialog(GNEAdditional* rerouterInterval, bool updatingElement) :
77 GNEAdditionalDialog(rerouterInterval, updatingElement, 960, 480),
78 myBeginEndValid(true),
79 myClosingLaneReroutesValid(true),
80 myClosingReroutesValid(true),
81 myDestProbReroutesValid(true),
82 myParkingAreaReroutesValid(true),
83 myRouteProbReroutesValid(true) {
84 // fill closing Reroutes
85 for (auto i : myEditedAdditional->getChildAdditionals()) {
86 if (i->getTagProperty()->getTag() == SUMO_TAG_CLOSING_REROUTE) {
87 myClosingReroutesEdited.push_back(i);
88 }
89 }
90 // fill closing Lane Reroutes
91 for (auto i : myEditedAdditional->getChildAdditionals()) {
92 if (i->getTagProperty()->getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) {
93 myClosingLaneReroutesEdited.push_back(i);
94 }
95 }
96 // fill Dest Prob Reroutes
97 for (auto i : myEditedAdditional->getChildAdditionals()) {
98 if (i->getTagProperty()->getTag() == SUMO_TAG_DEST_PROB_REROUTE) {
99 myDestProbReroutesEdited.push_back(i);
100 }
101 }
102 // fill Route Prob Reroutes
103 for (auto i : myEditedAdditional->getChildAdditionals()) {
104 if (i->getTagProperty()->getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) {
105 myRouteProbReroutesEdited.push_back(i);
106 }
107 }
108 // fill Parking Area reroutes
109 for (auto i : myEditedAdditional->getChildAdditionals()) {
110 if (i->getTagProperty()->getTag() == SUMO_TAG_PARKING_AREA_REROUTE) {
111 myParkingAreaRerouteEdited.push_back(i);
112 }
113 }
114 // change default header
115 std::string typeOfOperation = myUpdatingElement ? "Edit " + myEditedAdditional->getTagStr() + " of " : "Create " + myEditedAdditional->getTagStr() + " for ";
116 changeAdditionalDialogHeader(typeOfOperation + myEditedAdditional->getParentAdditionals().at(0)->getTagStr() + " '" + myEditedAdditional->getParentAdditionals().at(0)->getID() + "'");
117
118 // Create auxiliar frames for tables
119 FXHorizontalFrame* columns = new FXHorizontalFrame(myContentFrame, GUIDesignUniformHorizontalFrame);
120 FXVerticalFrame* columnLeft = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
121 FXVerticalFrame* columnRight = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
122 FXVerticalFrame* columnRight2 = new FXVerticalFrame(columns, GUIDesignAuxiliarFrame);
123
124 // create horizontal frame for begin and end label
125 FXHorizontalFrame* beginEndElementsLeft = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
126 new FXLabel(beginEndElementsLeft, (toString(SUMO_ATTR_BEGIN) + " and " + toString(SUMO_ATTR_END) + " of " + myEditedAdditional->getTagStr()).c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
127 myCheckLabel = new FXLabel(beginEndElementsLeft, "", GUIIconSubSys::getIcon(GUIIcon::CORRECT), GUIDesignLabelIcon32x32Thicked);
128
129 // create horizontal frame for begin and end text fields
130 FXHorizontalFrame* beginEndElementsRight = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
131 myBeginTextField = new FXTextField(beginEndElementsRight, GUIDesignTextFieldNCol, this, MID_GNE_REROUTEDIALOG_EDIT_INTERVAL, GUIDesignTextField);
132 myBeginTextField->setText(toString(myEditedAdditional->getAttribute(SUMO_ATTR_BEGIN)).c_str());
133 myEndTextField = new FXTextField(beginEndElementsRight, GUIDesignTextFieldNCol, this, MID_GNE_REROUTEDIALOG_EDIT_INTERVAL, GUIDesignTextField);
134 myEndTextField->setText(toString(myEditedAdditional->getAttribute(SUMO_ATTR_END)).c_str());
135
136 // Create labels and tables
137 FXHorizontalFrame* buttonAndLabelClosingLaneReroute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
138 myAddClosingLaneReroutes = GUIDesigns::buildFXButton(buttonAndLabelClosingLaneReroute, "", "", "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_REROUTEDIALOG_ADD_CLOSINGLANEREROUTE, GUIDesignButtonIcon);
139 new FXLabel(buttonAndLabelClosingLaneReroute, ("Add new " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
140 myClosingLaneRerouteTable = new FXTable(columnLeft, this, MID_GNE_REROUTEDIALOG_TABLE_CLOSINGLANEREROUTE, GUIDesignTableAdditionals);
141 myClosingLaneRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
142 myClosingLaneRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
143
144 FXHorizontalFrame* buttonAndLabelClosinReroute = new FXHorizontalFrame(columnLeft, GUIDesignAuxiliarHorizontalFrame);
145 myAddClosingReroutes = GUIDesigns::buildFXButton(buttonAndLabelClosinReroute, "", "", "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_REROUTEDIALOG_ADD_CLOSINGREROUTE, GUIDesignButtonIcon);
146 new FXLabel(buttonAndLabelClosinReroute, ("Add new " + toString(SUMO_TAG_CLOSING_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
147 myClosingRerouteTable = new FXTable(columnLeft, this, MID_GNE_REROUTEDIALOG_TABLE_CLOSINGREROUTE, GUIDesignTableAdditionals);
148 myClosingRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
149 myClosingRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
150
151 FXHorizontalFrame* buttonAndLabelDestProbReroute = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
152 myAddDestProbReroutes = GUIDesigns::buildFXButton(buttonAndLabelDestProbReroute, "", "", "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_REROUTEDIALOG_ADD_DESTPROBREROUTE, GUIDesignButtonIcon);
153 new FXLabel(buttonAndLabelDestProbReroute, ("Add new " + toString(SUMO_TAG_DEST_PROB_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
154 myDestProbRerouteTable = new FXTable(columnRight, this, MID_GNE_REROUTEDIALOG_TABLE_DESTPROBREROUTE, GUIDesignTableAdditionals);
155 myDestProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
156 myDestProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
157
158 FXHorizontalFrame* buttonAndLabelRouteProbReroute = new FXHorizontalFrame(columnRight, GUIDesignAuxiliarHorizontalFrame);
159 myAddRouteProbReroute = GUIDesigns::buildFXButton(buttonAndLabelRouteProbReroute, "", "", "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_REROUTEDIALOG_ADD_ROUTEPROBREROUTE, GUIDesignButtonIcon);
160 FXLabel* routeProbRerouteLabel = new FXLabel(buttonAndLabelRouteProbReroute, ("Add new " + toString(SUMO_TAG_ROUTE_PROB_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
161 myRouteProbRerouteTable = new FXTable(columnRight, this, MID_GNE_REROUTEDIALOG_TABLE_ROUTEPROBREROUTE, GUIDesignTableAdditionals);
162 myRouteProbRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
163 myRouteProbRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
164
165 FXHorizontalFrame* buttonAndLabelParkingAreaReroute = new FXHorizontalFrame(columnRight2, GUIDesignAuxiliarHorizontalFrame);
166 FXButton* parkingAreaRerouteButton = myAddParkingAreaReroute = GUIDesigns::buildFXButton(buttonAndLabelParkingAreaReroute, "", "", "", GUIIconSubSys::getIcon(GUIIcon::ADD), this, MID_GNE_REROUTEDIALOG_ADD_PARKINGAREAREROUTE, GUIDesignButtonIcon);
167 FXLabel* parkingAreaRerouteLabel = new FXLabel(buttonAndLabelParkingAreaReroute, ("Add new " + toString(SUMO_TAG_PARKING_AREA_REROUTE) + "s").c_str(), nullptr, GUIDesignLabelThick(JUSTIFY_NORMAL));
168 myParkingAreaRerouteTable = new FXTable(columnRight2, this, MID_GNE_REROUTEDIALOG_TABLE_PARKINGAREAREROUTE, GUIDesignTableAdditionals);
169 myParkingAreaRerouteTable->setSelBackColor(FXRGBA(255, 255, 255, 255));
170 myParkingAreaRerouteTable->setSelTextColor(FXRGBA(0, 0, 0, 255));
171
172 // disable add parkingAreaReroute Button and change label if there isn't parkingAreas in net
173 if (rerouterInterval->getNet()->getAttributeCarriers()->getAdditionals().at(SUMO_TAG_PARKING_AREA).size() == 0) {
174 parkingAreaRerouteButton->disable();
175 parkingAreaRerouteLabel->setText(("There isn't " + toString(SUMO_TAG_PARKING_AREA) + "s in net").c_str());
176 }
177
178 // disable add routeProbReroute Button and change label if the rerouter has multiple edges (random routes can only work from one edge)
179 // for whatever reason, sonar complains in the next line that parkingAreaRerouteLabel may leak, but fox does the cleanup
180 if (rerouterInterval->getParentAdditionals().at(0)->getChildEdges().size() > 1) { // NOSONAR
181 myAddRouteProbReroute->disable();
182 routeProbRerouteLabel->setText(TL("Rerouter has more than one edge"));
183 }
184
185 // update tables
186 // for whatever reason, sonar complains in the next line that routeProbRerouteLabel may leak, but fox does the cleanup
187 updateClosingLaneReroutesTable(); // NOSONAR
188 updateClosingReroutesTable();
189 updateDestProbReroutesTable();
190 updateRouteProbReroutesTable();
191 updateParkingAreaReroutesTable();
192
193 // start a undo list for editing local to this additional
194 initChanges();
195
196 // add element if we aren't updating an existent element
197 if (!myUpdatingElement) {
198 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(myEditedAdditional, true), true);
199 }
200
201 // Open as modal dialog
202 openAsModalDialog();
203}
204
205
207
208
209long
210GNERerouterIntervalDialog::onCmdAccept(FXObject*, FXSelector, void*) {
211 // set strings for dialogs
212 std::string errorTitle = "Error" + toString(myUpdatingElement ? "updating" : "creating") + " " + myEditedAdditional->getTagStr() + " of " + myEditedAdditional->getParentAdditionals().at(0)->getTagStr();
213 std::string operationType = myEditedAdditional->getParentAdditionals().at(0)->getTagStr() + "'s " + myEditedAdditional->getTagStr() + " cannot be " + (myUpdatingElement ? "updated" : "created") + " because ";
214 if (!myBeginEndValid) {
215 // open warning Box
216 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + myEditedAdditional->getTagStr() + " defined by " + toString(SUMO_ATTR_BEGIN) + " and " + toString(SUMO_ATTR_END) + " is invalid.").c_str());
217 return 0;
218 } else if (myClosingLaneReroutesEdited.empty() &&
219 myClosingReroutesEdited.empty() &&
220 myDestProbReroutesEdited.empty() &&
223 // open warning Box
224 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "at least one " + myEditedAdditional->getTagStr() + "'s element must be defined.").c_str());
225 return 0;
226 } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingLaneReroutesValid == false)) {
227 // open warning Box
228 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_LANE_REROUTE) + "s.").c_str());
229 return 0;
230 } else if ((myClosingLaneReroutesEdited.size() > 0) && (myClosingReroutesValid == false)) {
231 // open warning Box
232 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_CLOSING_REROUTE) + "s.").c_str());
233 return 0;
234 } else if ((myDestProbReroutesEdited.size() > 0) && (myDestProbReroutesValid == false)) {
235 // open warning Box
236 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_PARKING_AREA_REROUTE) + "s.").c_str());
237 return 0;
238 } else if ((myParkingAreaRerouteEdited.size() > 0) && (myParkingAreaReroutesValid == false)) {
239 // open warning Box
240 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_DEST_PROB_REROUTE) + "s.").c_str());
241 return 0;
242 } else if ((myRouteProbReroutesEdited.size() > 0) && (myRouteProbReroutesValid == false)) {
243 // open warning Box
244 FXMessageBox::warning(getApp(), MBOX_OK, errorTitle.c_str(), "%s", (operationType + "there are invalid " + toString(SUMO_TAG_ROUTE_PROB_REROUTE) + "s.").c_str());
245 return 0;
246 } else {
247 // accept changes before closing dialog
249 // Stop Modal
250 getApp()->stopModal(this, TRUE);
251 return 1;
252 }
253}
254
255
256long
257GNERerouterIntervalDialog::onCmdCancel(FXObject*, FXSelector, void*) {
258 // cancel changes
260 // Stop Modal
261 getApp()->stopModal(this, FALSE);
262 return 1;
263}
264
265
266long
267GNERerouterIntervalDialog::onCmdReset(FXObject*, FXSelector, void*) {
268 // reset changes
269 resetChanges();
270 // update tables
275 return 1;
276}
277
278
279long
281 // first check if there is lanes in the network
282 if (myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().size() > 0) {
283 // get lane
284 GNELane* lane = myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().begin()->second->getChildLanes().front();
285 // create closing lane reroute
287 // add it using undoList
288 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(closingLaneReroute, true), true);
289 myClosingLaneReroutesEdited.push_back(closingLaneReroute);
290 // update closing lane reroutes table
292 } else {
293 WRITE_WARNING(TL("There are no lanes in the network"));
294 }
295 return 1;
296}
297
298
299long
301 // first check if there is lanes in the network
302 if (myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().size() > 0) {
303 // get edge
304 GNEEdge* edge = myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().begin()->second;
305 // create closing reroute
306 GNEClosingReroute* closingReroute = new GNEClosingReroute(myEditedAdditional, edge, SVCAll);
307 // add it using undoList
308 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(closingReroute, true), true);
309 myClosingReroutesEdited.push_back(closingReroute);
310 // update closing reroutes table
312 } else {
313 WRITE_WARNING(TL("There are no edges in the network"));
314 }
315 return 1;
316}
317
318
319long
321 // first check if there is lanes in the network
322 if (myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().size() > 0) {
323 // get edge
324 GNEEdge* edge = myEditedAdditional->getNet()->getAttributeCarriers()->getEdges().begin()->second;
325 // create closing reroute and add it to table
326 GNEDestProbReroute* destProbReroute = new GNEDestProbReroute(myEditedAdditional, edge, 1);
327 // add it using undoList
328 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(destProbReroute, true), true);
329 myDestProbReroutesEdited.push_back(destProbReroute);
330 // update dest Prob reroutes table
332 } else {
333 WRITE_WARNING(TL("There are no edges in the network"));
334 }
335 return 1;
336}
337
338
339long
341 // get routes
343 // check if there is at least one route
344 if (routes.size() > 0) {
345 // create route Prob Reroute
346 GNERouteProbReroute* routeProbReroute = new GNERouteProbReroute(myEditedAdditional, routes.begin()->second, 1);
347 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(routeProbReroute, true), true);
348 myRouteProbReroutesEdited.push_back(routeProbReroute);
349 // update route prob reroutes table
351 }
352 return 1;
353}
354
355
356long
358 // first check if there is lanes in the network
360 // get parking area
362 // create parkingAreaReroute and add it to table
363 GNEParkingAreaReroute* parkingAreaReroute = new GNEParkingAreaReroute(myEditedAdditional, parkingArea, 1, 1);
364 // add it using undoList
365 myEditedAdditional->getNet()->getViewNet()->getUndoList()->add(new GNEChange_Additional(parkingAreaReroute, true), true);
366 myParkingAreaRerouteEdited.push_back(parkingAreaReroute);
367 // update dest Prob reroutes table
369 } else {
370 WRITE_WARNING(TL("There are no parking areas in the network"));
371 }
372 return 1;
373}
374
375
376long
378 // check if some delete button was pressed
379 for (int i = 0; i < (int)myClosingLaneReroutesEdited.size(); i++) {
380 if (myClosingLaneRerouteTable->getItem(i, 4)->hasFocus()) {
381 myClosingLaneRerouteTable->removeRows(i);
385 return 1;
386 }
387 }
388 return 0;
389}
390
391
392long
394 // check if some delete button was pressed
395 for (int i = 0; i < (int)myClosingReroutesEdited.size(); i++) {
396 if (myClosingRerouteTable->getItem(i, 4)->hasFocus()) {
397 myClosingRerouteTable->removeRows(i);
401 return 1;
402 }
403 }
404 return 1;
405}
406
407
408long
410 // check if some delete button was pressed
411 for (int i = 0; i < (int)myDestProbReroutesEdited.size(); i++) {
412 if (myDestProbRerouteTable->getItem(i, 3)->hasFocus()) {
413 myDestProbRerouteTable->removeRows(i);
417 return 1;
418 }
419 }
420 return 0;
421}
422
423
424long
426 // check if some delete button was pressed
427 for (int i = 0; i < (int)myRouteProbReroutesEdited.size(); i++) {
428 if (myRouteProbRerouteTable->getItem(i, 3)->hasFocus()) {
429 myRouteProbRerouteTable->removeRows(i);
433 return 1;
434 }
435 }
436 return 0;
437}
438
439
440long
442 // check if some delete button was pressed
443 for (int i = 0; i < (int)myParkingAreaRerouteEdited.size(); i++) {
444 if (myParkingAreaRerouteTable->getItem(i, 3)->hasFocus()) {
445 ;
446 } else if (myParkingAreaRerouteTable->getItem(i, 4)->hasFocus()) {
447 myParkingAreaRerouteTable->removeRows(i);
451 return 1;
452 }
453 }
454 return 0;
455}
456
457
458long
461 // iterate over table and check that all parameters are correct
462 for (int i = 0; i < myClosingLaneRerouteTable->getNumRows(); i++) {
463 GNEAdditional* closingLaneReroute = myClosingLaneReroutesEdited.at(i);
464 if (!SUMOXMLDefinitions::isValidNetID(myClosingLaneRerouteTable->getItem(i, 0)->getText().text())) {
467 } else if (closingLaneReroute->isValid(SUMO_ATTR_LANE, myClosingLaneRerouteTable->getItem(i, 0)->getText().text()) == false) {
470 } else if (closingLaneReroute->isValid(SUMO_ATTR_ALLOW, myClosingLaneRerouteTable->getItem(i, 1)->getText().text()) == false) {
473 } else if (closingLaneReroute->isValid(SUMO_ATTR_DISALLOW, myClosingLaneRerouteTable->getItem(i, 2)->getText().text()) == false) {
476 } else {
477 // check if allow/disallow should be changed
478 bool changeAllow = myClosingLaneRerouteTable->getItem(i, 1)->getText().text() != closingLaneReroute->getAttribute(SUMO_ATTR_ALLOW);
479 bool changeDisallow = myClosingLaneRerouteTable->getItem(i, 2)->getText().text() != closingLaneReroute->getAttribute(SUMO_ATTR_DISALLOW);
480 // set new values in Closing reroute
481 closingLaneReroute->setAttribute(SUMO_ATTR_LANE, myClosingLaneRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
482 if (changeAllow) {
483 closingLaneReroute->setAttribute(SUMO_ATTR_ALLOW, myClosingLaneRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
484 myClosingLaneRerouteTable->getItem(i, 2)->setText(closingLaneReroute->getAttribute(SUMO_ATTR_DISALLOW).c_str());
485
486 }
487 if (changeDisallow) {
488 closingLaneReroute->setAttribute(SUMO_ATTR_DISALLOW, myClosingLaneRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
489 myClosingLaneRerouteTable->getItem(i, 1)->setText(closingLaneReroute->getAttribute(SUMO_ATTR_ALLOW).c_str());
490 }
491 // set Correct label
493 }
494 }
495 // update list
497 return 1;
498}
499
500
501long
504 // iterate over table and check that all parameters are correct
505 for (int i = 0; i < myClosingRerouteTable->getNumRows(); i++) {
506 GNEAdditional* closingReroute = myClosingReroutesEdited.at(i);
507 if (!SUMOXMLDefinitions::isValidNetID(myClosingRerouteTable->getItem(i, 0)->getText().text())) {
510 } else if (closingReroute->isValid(SUMO_ATTR_EDGE, myClosingRerouteTable->getItem(i, 0)->getText().text()) == false) {
513 } else if (closingReroute->isValid(SUMO_ATTR_ALLOW, myClosingRerouteTable->getItem(i, 1)->getText().text()) == false) {
516 } else if (closingReroute->isValid(SUMO_ATTR_DISALLOW, myClosingRerouteTable->getItem(i, 2)->getText().text()) == false) {
519 } else {
520 // check if allow/disallow should be changed
521 bool changeAllow = myClosingRerouteTable->getItem(i, 1)->getText().text() != closingReroute->getAttribute(SUMO_ATTR_ALLOW);
522 bool changeDisallow = myClosingRerouteTable->getItem(i, 2)->getText().text() != closingReroute->getAttribute(SUMO_ATTR_DISALLOW);
523 // set new values in Closing reroute
524 closingReroute->setAttribute(SUMO_ATTR_EDGE, myClosingRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
525 if (changeAllow) {
526 closingReroute->setAttribute(SUMO_ATTR_ALLOW, myClosingRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
527 myClosingRerouteTable->getItem(i, 2)->setText(closingReroute->getAttribute(SUMO_ATTR_DISALLOW).c_str());
528
529 }
530 if (changeDisallow) {
531 closingReroute->setAttribute(SUMO_ATTR_DISALLOW, myClosingRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
532 myClosingRerouteTable->getItem(i, 1)->setText(closingReroute->getAttribute(SUMO_ATTR_ALLOW).c_str());
533 }
534 // set Correct label
536 }
537 }
538 // update list
539 myClosingRerouteTable->update();
540 return 1;
541}
542
543
544long
547 // iterate over table and check that all parameters are correct
548 for (int i = 0; i < myDestProbRerouteTable->getNumRows(); i++) {
549 GNEAdditional* destProbReroute = myDestProbReroutesEdited.at(i);
550 if (!SUMOXMLDefinitions::isValidNetID(myDestProbRerouteTable->getItem(i, 0)->getText().text())) {
553 } else if (destProbReroute->isValid(SUMO_ATTR_EDGE, myDestProbRerouteTable->getItem(i, 0)->getText().text()) == false) {
556 } else if (destProbReroute->isValid(SUMO_ATTR_PROB, myDestProbRerouteTable->getItem(i, 1)->getText().text()) == false) {
559 } else {
560 // set new values in Closing reroute
561 destProbReroute->setAttribute(SUMO_ATTR_EDGE, myDestProbRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
562 destProbReroute->setAttribute(SUMO_ATTR_PROB, myDestProbRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
563 // set Correct label
565 }
566 }
567 // update list
568 myDestProbRerouteTable->update();
569 return 1;
570}
571
572
573long
576 // iterate over table and check that all parameters are correct
577 for (int i = 0; i < myRouteProbRerouteTable->getNumRows(); i++) {
578 GNEAdditional* routeProbReroute = myRouteProbReroutesEdited.at(i);
579 if (!SUMOXMLDefinitions::isValidNetID(myRouteProbRerouteTable->getItem(i, 0)->getText().text())) {
582 } else if (routeProbReroute->isValid(SUMO_ATTR_PROB, myRouteProbRerouteTable->getItem(i, 1)->getText().text()) == false) {
585 } else {
586 // set new values in Closing reroute
587 routeProbReroute->setAttribute(SUMO_ATTR_ROUTE, myRouteProbRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
588 routeProbReroute->setAttribute(SUMO_ATTR_PROB, myRouteProbRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
589 // set Correct label
591 }
592 }
593 // update list
594 myRouteProbRerouteTable->update();
595 return 1;
596}
597
598
599long
602 // iterate over table and check that all parameters are correct
603 for (int i = 0; i < myParkingAreaRerouteTable->getNumRows(); i++) {
604 GNEAdditional* parkingAreaReroute = myParkingAreaRerouteEdited.at(i);
605 if (parkingAreaReroute->isValid(SUMO_ATTR_PARKING, myParkingAreaRerouteTable->getItem(i, 0)->getText().text()) == false) {
608 } else if (parkingAreaReroute->isValid(SUMO_ATTR_PROB, myParkingAreaRerouteTable->getItem(i, 1)->getText().text()) == false) {
611 } else if (parkingAreaReroute->isValid(SUMO_ATTR_VISIBLE, myParkingAreaRerouteTable->getItem(i, 2)->getText().text()) == false) {
614 } else {
615 // set new values in Closing reroute
616 parkingAreaReroute->setAttribute(SUMO_ATTR_PARKING, myParkingAreaRerouteTable->getItem(i, 0)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
617 parkingAreaReroute->setAttribute(SUMO_ATTR_PROB, myParkingAreaRerouteTable->getItem(i, 1)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
618 parkingAreaReroute->setAttribute(SUMO_ATTR_VISIBLE, myParkingAreaRerouteTable->getItem(i, 2)->getText().text(), myEditedAdditional->getNet()->getViewNet()->getUndoList());
619 // set Correct label
621 }
622 }
623 // update list
625 return 1;
626}
627
628
629long
631 const auto begin = GNEAttributeCarrier::canParse<SUMOTime>(myBeginTextField->getText().text()) ? GNEAttributeCarrier::parse<SUMOTime>(myBeginTextField->getText().text()) : -1;
632 const auto end = GNEAttributeCarrier::canParse<SUMOTime>(myEndTextField->getText().text()) ? GNEAttributeCarrier::parse<SUMOTime>(myEndTextField->getText().text()) : -1;
633 // check that both begin and end are positive, and begin <= end
634 myBeginEndValid = (begin >= 0) && (end >= 0) && (begin <= end);
635 if (myBeginEndValid) {
636 // set new values in rerouter interval
639 // change icon
641 } else {
643 }
644 return 0;
645}
646
647
648void
650 // clear table
651 myClosingLaneRerouteTable->clearItems();
652 // set number of rows
653 myClosingLaneRerouteTable->setTableSize(int(myClosingLaneReroutesEdited.size()), 5);
654 // Configure list
655 myClosingLaneRerouteTable->setVisibleColumns(5);
656 myClosingLaneRerouteTable->setColumnWidth(0, 83);
657 myClosingLaneRerouteTable->setColumnWidth(1, 83);
658 myClosingLaneRerouteTable->setColumnWidth(2, 82);
659 myClosingLaneRerouteTable->setColumnWidth(3, GUIDesignHeight);
660 myClosingLaneRerouteTable->setColumnWidth(4, GUIDesignHeight);
661 myClosingLaneRerouteTable->setColumnText(0, toString(SUMO_ATTR_LANE).c_str());
662 myClosingLaneRerouteTable->setColumnText(1, toString(SUMO_ATTR_ALLOW).c_str());
663 myClosingLaneRerouteTable->setColumnText(2, toString(SUMO_ATTR_DISALLOW).c_str());
664 myClosingLaneRerouteTable->setColumnText(3, "");
665 myClosingLaneRerouteTable->setColumnText(4, "");
666 myClosingLaneRerouteTable->getRowHeader()->setWidth(0);
667 // Declare pointer to FXTableItem
668 FXTableItem* item = nullptr;
669 // iterate over values
670 for (int i = 0; i < (int)myClosingLaneReroutesEdited.size(); i++) {
671 // Set closing edge
672 item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_LANE).c_str());
673 myClosingLaneRerouteTable->setItem(i, 0, item);
674 // set allow vehicles
675 item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ALLOW).c_str());
676 myClosingLaneRerouteTable->setItem(i, 1, item);
677 // set disallow vehicles
678 item = new FXTableItem(myClosingLaneReroutesEdited.at(i)->getAttribute(SUMO_ATTR_DISALLOW).c_str());
679 myClosingLaneRerouteTable->setItem(i, 2, item);
680 // set valid icon
681 item = new FXTableItem("");
683 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
684 item->setEnabled(false);
685 myClosingLaneRerouteTable->setItem(i, 3, item);
686 // set remove
687 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
688 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
689 item->setEnabled(false);
690 myClosingLaneRerouteTable->setItem(i, 4, item);
691 }
692}
693
694
695void
697 // clear table
698 myClosingRerouteTable->clearItems();
699 // set number of rows
700 myClosingRerouteTable->setTableSize(int(myClosingReroutesEdited.size()), 5);
701 // Configure list
702 myClosingRerouteTable->setVisibleColumns(5);
703 myClosingRerouteTable->setColumnWidth(0, 83);
704 myClosingRerouteTable->setColumnWidth(1, 83);
705 myClosingRerouteTable->setColumnWidth(2, 82);
706 myClosingRerouteTable->setColumnWidth(3, GUIDesignHeight);
707 myClosingRerouteTable->setColumnWidth(4, GUIDesignHeight);
708 myClosingRerouteTable->setColumnText(0, toString(SUMO_ATTR_EDGE).c_str());
709 myClosingRerouteTable->setColumnText(1, toString(SUMO_ATTR_ALLOW).c_str());
710 myClosingRerouteTable->setColumnText(2, toString(SUMO_ATTR_DISALLOW).c_str());
711 myClosingRerouteTable->setColumnText(3, "");
712 myClosingRerouteTable->setColumnText(4, "");
713 myClosingRerouteTable->getRowHeader()->setWidth(0);
714 // Declare pointer to FXTableItem
715 FXTableItem* item = nullptr;
716 // iterate over values
717 for (int i = 0; i < (int)myClosingReroutesEdited.size(); i++) {
718 // Set closing edge
719 item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_EDGE).c_str());
720 myClosingRerouteTable->setItem(i, 0, item);
721 // set allow vehicles
722 item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ALLOW).c_str());
723 myClosingRerouteTable->setItem(i, 1, item);
724 // set disallow vehicles
725 item = new FXTableItem(myClosingReroutesEdited.at(i)->getAttribute(SUMO_ATTR_DISALLOW).c_str());
726 myClosingRerouteTable->setItem(i, 2, item);
727 // set valid icon
728 item = new FXTableItem("");
730 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
731 item->setEnabled(false);
732 myClosingRerouteTable->setItem(i, 3, item);
733 // set remove
734 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
735 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
736 item->setEnabled(false);
737 myClosingRerouteTable->setItem(i, 4, item);
738 }
739}
740
741
742void
744 // clear table
745 myDestProbRerouteTable->clearItems();
746 // set number of rows
747 myDestProbRerouteTable->setTableSize(int(myDestProbReroutesEdited.size()), 4);
748 // Configure list
749 myDestProbRerouteTable->setVisibleColumns(4);
750 myDestProbRerouteTable->setColumnWidth(0, 124);
751 myDestProbRerouteTable->setColumnWidth(1, 124);
752 myDestProbRerouteTable->setColumnWidth(2, GUIDesignHeight);
753 myDestProbRerouteTable->setColumnWidth(3, GUIDesignHeight);
754 myDestProbRerouteTable->setColumnText(0, toString(SUMO_ATTR_EDGE).c_str());
755 myDestProbRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
756 myDestProbRerouteTable->setColumnText(2, "");
757 myDestProbRerouteTable->setColumnText(3, "");
758 myDestProbRerouteTable->getRowHeader()->setWidth(0);
759 // Declare pointer to FXTableItem
760 FXTableItem* item = nullptr;
761 // iterate over values
762 for (int i = 0; i < (int)myDestProbReroutesEdited.size(); i++) {
763 // Set new destination
764 item = new FXTableItem(myDestProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_EDGE).c_str());
765 myDestProbRerouteTable->setItem(i, 0, item);
766 // Set probability
767 item = new FXTableItem(myDestProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
768 myDestProbRerouteTable->setItem(i, 1, item);
769 // set valid icon
770 item = new FXTableItem("");
772 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
773 item->setEnabled(false);
774 myDestProbRerouteTable->setItem(i, 2, item);
775 // set remove
776 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
777 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
778 item->setEnabled(false);
779 myDestProbRerouteTable->setItem(i, 3, item);
780 }
781}
782
783
784void
786 // clear table
787 myRouteProbRerouteTable->clearItems();
788 // set number of rows
789 myRouteProbRerouteTable->setTableSize(int(myRouteProbReroutesEdited.size()), 4);
790 // Configure list
791 myRouteProbRerouteTable->setVisibleColumns(4);
792 myRouteProbRerouteTable->setColumnWidth(0, 124);
793 myRouteProbRerouteTable->setColumnWidth(1, 124);
794 myRouteProbRerouteTable->setColumnWidth(2, GUIDesignHeight);
795 myRouteProbRerouteTable->setColumnWidth(3, GUIDesignHeight);
796 myRouteProbRerouteTable->setColumnText(0, toString(SUMO_ATTR_ROUTE).c_str());
797 myRouteProbRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
798 myRouteProbRerouteTable->setColumnText(2, "");
799 myRouteProbRerouteTable->setColumnText(3, "");
800 myRouteProbRerouteTable->getRowHeader()->setWidth(0);
801 // Declare pointer to FXTableItem
802 FXTableItem* item = nullptr;
803 // iterate over values
804 for (int i = 0; i < (int)myRouteProbReroutesEdited.size(); i++) {
805 // Set new route
806 item = new FXTableItem(myRouteProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_ROUTE).c_str());
807 myRouteProbRerouteTable->setItem(i, 0, item);
808 // Set probability
809 item = new FXTableItem(myRouteProbReroutesEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
810 myRouteProbRerouteTable->setItem(i, 1, item);
811 // set valid icon
812 item = new FXTableItem("");
814 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
815 item->setEnabled(false);
816 myRouteProbRerouteTable->setItem(i, 2, item);
817 // set remove
818 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
819 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
820 item->setEnabled(false);
821 myRouteProbRerouteTable->setItem(i, 3, item);
822 }
823}
824
825
826void
828 // clear table
829 myParkingAreaRerouteTable->clearItems();
830 // set number of rows
831 myParkingAreaRerouteTable->setTableSize(int(myParkingAreaRerouteEdited.size()), 5);
832 // Configure list
833 myParkingAreaRerouteTable->setVisibleColumns(4);
834 myParkingAreaRerouteTable->setColumnWidth(0, 124);
835 myParkingAreaRerouteTable->setColumnWidth(1, 90);
836 myParkingAreaRerouteTable->setColumnWidth(2, 35);
837 myParkingAreaRerouteTable->setColumnWidth(3, GUIDesignHeight);
838 myParkingAreaRerouteTable->setColumnWidth(4, GUIDesignHeight);
839 myParkingAreaRerouteTable->setColumnText(0, toString(SUMO_ATTR_PARKING).c_str());
840 myParkingAreaRerouteTable->setColumnText(1, toString(SUMO_ATTR_PROB).c_str());
841 myParkingAreaRerouteTable->setColumnText(2, "vis.");
842 myParkingAreaRerouteTable->setColumnText(3, "");
843 myParkingAreaRerouteTable->setColumnText(4, "");
844 myParkingAreaRerouteTable->getRowHeader()->setWidth(0);
845 // Declare pointer to FXTableItem
846 FXTableItem* item = nullptr;
847 // iterate over values
848 for (int i = 0; i < (int)myParkingAreaRerouteEdited.size(); i++) {
849 // Set new destination
850 item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_PARKING).c_str());
851 myParkingAreaRerouteTable->setItem(i, 0, item);
852 // Set probability
853 item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_PROB).c_str());
854 myParkingAreaRerouteTable->setItem(i, 1, item);
855 // Set visible
856 item = new FXTableItem(myParkingAreaRerouteEdited.at(i)->getAttribute(SUMO_ATTR_VISIBLE) == "1" ? "true" : "false");
857 myParkingAreaRerouteTable->setItem(i, 2, item);
858 // set valid icon
859 item = new FXTableItem("");
861 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
862 item->setEnabled(false);
863 myParkingAreaRerouteTable->setItem(i, 3, item);
864 // set remove
865 item = new FXTableItem("", GUIIconSubSys::getIcon(GUIIcon::REMOVE));
866 item->setJustify(FXTableItem::CENTER_X | FXTableItem::CENTER_Y);
867 item->setEnabled(false);
868 myParkingAreaRerouteTable->setItem(i, 4, item);
869 }
870}
871
872
873/****************************************************************************/
FXDEFMAP(GNERerouterIntervalDialog) GNERerouterIntervalDialogMap[]
@ MID_GNE_REROUTEDIALOG_EDIT_INTERVAL
edit interval
@ MID_GNE_REROUTEDIALOG_TABLE_PARKINGAREAREROUTE
change table parkingAreaReroute
@ MID_GNE_REROUTEDIALOG_ADD_CLOSINGREROUTE
add closing reroute
@ MID_GNE_REROUTEDIALOG_TABLE_CLOSINGLANEREROUTE
change table closing lane reroute reroute
@ MID_GNE_REROUTEDIALOG_ADD_CLOSINGLANEREROUTE
add closing lane reroute
@ MID_GNE_REROUTEDIALOG_TABLE_ROUTEPROBREROUTE
change table route probability reroute
@ MID_GNE_REROUTEDIALOG_ADD_PARKINGAREAREROUTE
add parkingAreaReroute
@ MID_GNE_REROUTEDIALOG_ADD_DESTPROBREROUTE
add destination probability route
@ MID_GNE_REROUTEDIALOG_TABLE_DESTPROBREROUTE
change table destination probability reroute
@ MID_GNE_REROUTEDIALOG_TABLE_CLOSINGREROUTE
change table route closing reroute
@ MID_GNE_REROUTEDIALOG_ADD_ROUTEPROBREROUTE
add route probability route
#define GUIDesignButtonIcon
button only with icon
Definition GUIDesigns.h:91
#define GUIDesignTableAdditionals
design for tables used in additional dialogs
Definition GUIDesigns.h:634
#define GUIDesignTextField
Definition GUIDesigns.h:59
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:399
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:74
#define GUIDesignUniformHorizontalFrame
design for horizontal frame used to pack another frames with a uniform width
Definition GUIDesigns.h:411
#define GUIDesignLabelIcon32x32Thicked
label ticked filled only with an icon of 32x32
Definition GUIDesigns.h:267
#define GUIDesignLabelThick(justify)
label extended over frame with thick and with text justify to left
Definition GUIDesigns.h:249
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
Definition GUIDesigns.h:390
#define WRITE_WARNING(msg)
Definition MsgHandler.h:287
#define TL(string)
Definition MsgHandler.h:305
const SVCPermissions SVCAll
all VClasses are allowed
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_ROUTE
description of a route
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_ATTR_PARKING
@ SUMO_ATTR_DISALLOW
@ SUMO_ATTR_ALLOW
@ SUMO_ATTR_LANE
@ SUMO_ATTR_EDGE
@ SUMO_ATTR_BEGIN
weights: time range begin
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_PROB
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_VISIBLE
int GUIDesignHeight
the default size for GUI elements
Definition StdDefs.cpp:36
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
Dialog to edit sequences, parameters, etc.. of Additionals.
bool myUpdatingElement
flag to indicate if additional are being created or modified (cannot be changed after open dialog)
void acceptChanges()
Accept changes did in this dialog.
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditional * myEditedAdditional
pointer to edited additional
void resetChanges()
reset changes did in this dialog.
virtual std::string getAttribute(SumoXMLAttr key) const =0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
method for setting the attribute and letting the object perform additional changes
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
method for checking if the key and their correspondent attribute are valids
const std::string & getTagStr() const
get tag assigned to this object in string format
GNENet * getNet() const
get pointer to net
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * >, std::hash< int > > & getDemandElements() const
get demand elements
const std::map< std::string, GNEEdge * > & getEdges() const
map with the ID and pointer to edges of net
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEAdditional * >, std::hash< int > > & getAdditionals() const
get additionals
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:147
GNEViewNet * getViewNet() const
get view net
Definition GNENet.cpp:2195
Dialog for edit rerouter intervals.
long onCmdAddDestProbReroute(FXObject *, FXSelector, void *)
add dest prob reroute
long onCmdClickedClosingReroute(FXObject *, FXSelector, void *)
remove closing reroute
bool myRouteProbReroutesValid
flag to check if route prob reroutes are valid
long onCmdAddClosingReroute(FXObject *, FXSelector, void *)
add closing reroute
void updateRouteProbReroutesTable()
update data of probability reroutes table
std::vector< GNEAdditional * > myRouteProbReroutesEdited
Route Prob Reroutes edited.
long onCmdClickedClosingLaneReroute(FXObject *, FXSelector, void *)
remove closing lane reroute
void updateClosingLaneReroutesTable()
update data of closing lane reroute table
FXTable * myDestProbRerouteTable
list with destination probability reroutes
bool myDestProbReroutesValid
flag to check if Destination probability reroutes are valid
long onCmdClickedRouteProbReroute(FXObject *, FXSelector, void *)
remove route prob reroute
FXTable * myClosingRerouteTable
list with closing reroutes
long onCmdReset(FXObject *, FXSelector, void *)
event after press reset button
FXTextField * myEndTextField
end time text field
long onCmdEditClosingLaneReroute(FXObject *, FXSelector, void *)
/edit closing lane reroute
std::vector< GNEAdditional * > myClosingReroutesEdited
closing Reroutes edited
void updateClosingReroutesTable()
update data of closing reroute table
long onCmdEditRouteProbReroute(FXObject *, FXSelector, void *)
/edit route prob reroute
void updateDestProbReroutesTable()
update data of destination probability reroute table
FXLabel * myCheckLabel
begin/end time check label
FXTextField * myBeginTextField
begin time text field
std::vector< GNEAdditional * > myClosingLaneReroutesEdited
closing Lane Reroutes edited
FXTable * myParkingAreaRerouteTable
list with parkingAreaReroutes
bool myClosingReroutesValid
flag to check if closing reroutes are valid
long onCmdAddRouteProbReroute(FXObject *, FXSelector, void *)
add route prob reroute
long onCmdChangeBeginEnd(FXObject *, FXSelector, void *)
called when begin or end is changed
long onCmdAddParkingAreaReroute(FXObject *, FXSelector, void *)
add parkingAreaReroute
bool myParkingAreaReroutesValid
flag to check if parkingAreaReroutes are valid
long onCmdAddClosingLaneReroute(FXObject *, FXSelector, void *)
add closing lane reroute
FXTable * myClosingLaneRerouteTable
list with closing lane reroutes
bool myBeginEndValid
flag to check if begin an end are valid
FXTable * myRouteProbRerouteTable
list with route probability reroute
long onCmdEditClosingReroute(FXObject *, FXSelector, void *)
/edit closing reroute
long onCmdClickedParkingAreaReroute(FXObject *, FXSelector, void *)
remove parkingAreaReroute
long onCmdCancel(FXObject *, FXSelector, void *)
event after press cancel button
std::vector< GNEAdditional * > myParkingAreaRerouteEdited
Parking Area reroute edited.
long onCmdEditDestProbReroute(FXObject *, FXSelector, void *)
/edit dest prob reroute
bool myClosingLaneReroutesValid
flag to check if closing lane reroutes are valid
long onCmdClickedDestProbReroute(FXObject *, FXSelector, void *)
remove dest prob reroute
long onCmdAccept(FXObject *, FXSelector, void *)
long onCmdEditParkingAreaReroute(FXObject *, FXSelector, void *)
/edit parkingAreaReroute
std::vector< GNEAdditional * > myDestProbReroutesEdited
Dest Prob Reroutes edited.
void updateParkingAreaReroutesTable()
update data of parkingAreaReroute table
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
GNEUndoList * getUndoList() const
get the undoList object
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static bool isValidNetID(const std::string &value)
whether the given string is a valid id for a network element