Eclipse SUMO - Simulation of Urban MObility
GNETAZFrame.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 add TAZ elements
15 /****************************************************************************/
16 
17 // ===========================================================================
18 // included modules
19 // ===========================================================================
20 #include <config.h>
21 
25 #include <netedit/GNENet.h>
26 #include <netedit/GNEViewNet.h>
33 #include <netedit/GNEUndoList.h>
34 
35 #include "GNETAZFrame.h"
36 
37 
38 // ===========================================================================
39 // FOX callback mapping
40 // ===========================================================================
41 
42 FXDEFMAP(GNETAZFrame::TAZParameters) TAZParametersMap[] = {
45  FXMAPFUNC(SEL_COMMAND, MID_HELP, GNETAZFrame::TAZParameters::onCmdHelp),
46 };
47 
48 FXDEFMAP(GNETAZFrame::TAZSaveChanges) TAZSaveChangesMap[] = {
51 };
52 
53 FXDEFMAP(GNETAZFrame::TAZChildDefaultParameters) TAZChildDefaultParametersMap[] = {
56 };
57 
58 FXDEFMAP(GNETAZFrame::TAZSelectionStatistics) TAZSelectionStatisticsMap[] = {
60 };
61 
62 FXDEFMAP(GNETAZFrame::TAZEdgesGraphic) TAZEdgesGraphicMap[] = {
64 };
65 
66 // Object implementation
67 FXIMPLEMENT(GNETAZFrame::TAZParameters, FXGroupBox, TAZParametersMap, ARRAYNUMBER(TAZParametersMap))
68 FXIMPLEMENT(GNETAZFrame::TAZSaveChanges, FXGroupBox, TAZSaveChangesMap, ARRAYNUMBER(TAZSaveChangesMap))
69 FXIMPLEMENT(GNETAZFrame::TAZChildDefaultParameters, FXGroupBox, TAZChildDefaultParametersMap, ARRAYNUMBER(TAZChildDefaultParametersMap))
70 FXIMPLEMENT(GNETAZFrame::TAZSelectionStatistics, FXGroupBox, TAZSelectionStatisticsMap, ARRAYNUMBER(TAZSelectionStatisticsMap))
71 FXIMPLEMENT(GNETAZFrame::TAZEdgesGraphic, FXGroupBox, TAZEdgesGraphicMap, ARRAYNUMBER(TAZEdgesGraphicMap))
72 
73 
74 // ===========================================================================
75 // method definitions
76 // ===========================================================================
77 
78 // ---------------------------------------------------------------------------
79 // GNETAZFrame::TAZCurrent - methods
80 // ---------------------------------------------------------------------------
81 
82 GNETAZFrame::TAZCurrent::TAZEdge::TAZEdge(TAZCurrent* TAZCurrentParent, GNEEdge* _edge, GNETAZSourceSink* _TAZSource, GNETAZSourceSink* _TAZSink) :
83  edge(_edge),
84  TAZSource(_TAZSource),
85  TAZSink(_TAZSink),
86  sourceColor(0),
87  sinkColor(0),
88  sourcePlusSinkColor(0),
89  sourceMinusSinkColor(0),
90  myTAZCurrentParent(TAZCurrentParent)
91 { }
92 
93 
95 
96 
97 void
99  sourceColor = GNEAttributeCarrier::parse<int>(TAZSource->getAttribute(GNE_ATTR_TAZCOLOR));
100  sinkColor = GNEAttributeCarrier::parse<int>(TAZSink->getAttribute(GNE_ATTR_TAZCOLOR));
101  // Obtain Source+Sink needs more steps. First obtain Source+Sink Weight
102  double sourcePlusSinkWeight = TAZSource->getDepartWeight() + TAZSink->getDepartWeight();
103  // avoid division between zero
104  if ((myTAZCurrentParent->myMaxSourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight) == 0) {
105  sourcePlusSinkColor = 0;
106  } else {
107  // calculate percentage relative to the max and min Source+Sink weight
108  double percentage = (sourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight) /
109  (myTAZCurrentParent->myMaxSourcePlusSinkWeight - myTAZCurrentParent->myMinSourcePlusSinkWeight);
110  // convert percentage to a value between [0-9] (because we have only 10 colors)
111  if (percentage >= 1) {
112  sourcePlusSinkColor = 9;
113  } else if (percentage < 0) {
114  sourcePlusSinkColor = 0;
115  } else {
116  sourcePlusSinkColor = (int)(percentage * 10);
117  }
118  }
119  // Obtain Source+Sink needs more steps. First obtain Source-Sink Weight
120  double sourceMinusSinkWeight = TAZSource->getDepartWeight() - TAZSink->getDepartWeight();
121  // avoid division between zero
122  if ((myTAZCurrentParent->myMaxSourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight) == 0) {
123  sourceMinusSinkColor = 0;
124  } else {
125  // calculate percentage relative to the max and min Source-Sink weight
126  double percentage = (sourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight) /
127  (myTAZCurrentParent->myMaxSourceMinusSinkWeight - myTAZCurrentParent->myMinSourceMinusSinkWeight);
128  // convert percentage to a value between [0-9] (because we have only 10 colors)
129  if (percentage >= 1) {
130  sourceMinusSinkColor = 9;
131  } else if (percentage < 0) {
132  sourceMinusSinkColor = 0;
133  } else {
134  sourceMinusSinkColor = (int)(percentage * 10);
135  }
136  }
137 }
138 
139 
141  FXGroupBox(TAZFrameParent->myContentFrame, "TAZ", GUIDesignGroupBoxFrame),
142  myTAZFrameParent(TAZFrameParent),
143  myEditedTAZ(nullptr),
148  // create TAZ label
149  myTAZCurrentLabel = new FXLabel(this, "No TAZ selected", 0, GUIDesignLabelLeft);
150 }
151 
152 
154 
155 
156 void
158  // set new current TAZ
159  myEditedTAZ = editedTAZ;
160  // update label and moduls
161  if (myEditedTAZ != nullptr) {
162  myTAZCurrentLabel->setText(("Current TAZ: " + myEditedTAZ->getID()).c_str());
163  // obtain a copy of all edges of the net (to avoid slowdown during manipulations)
164  myNetEdges = myTAZFrameParent->myViewNet->getNet()->retrieveEdges();
165  // obtain a copy of all SELECTED edges of the net (to avoid slowdown during manipulations)
166  mySelectedEdges = myTAZFrameParent->myViewNet->getNet()->retrieveEdges(true);
167  // resfresh TAZ Edges
168  refreshTAZEdges();
169  // hide TAZ parameters
170  myTAZFrameParent->myTAZParameters->hideTAZParametersModul();
171  // hide Netedit parameters
172  myTAZFrameParent->myNeteditAttributes->hideNeteditAttributesModul();
173  // hide drawing shape
174  myTAZFrameParent->myDrawingShape->hideDrawingShape();
175  // show edge common parameters
176  myTAZFrameParent->myTAZCommonStatistics->showTAZCommonStatisticsModul();
177  // show save TAZ Edges
178  myTAZFrameParent->myTAZSaveChanges->showTAZSaveChangesModul();
179  // show edge common parameters
180  myTAZFrameParent->myTAZChildDefaultParameters->showTAZChildDefaultParametersModul();
181  // show Edges graphics
182  myTAZFrameParent->myTAZEdgesGraphic->showTAZEdgesGraphicModul();
183  } else {
184  // show TAZ parameters
185  myTAZFrameParent->myTAZParameters->showTAZParametersModul();
186  // show Netedit parameters
187  myTAZFrameParent->myNeteditAttributes->showNeteditAttributesModul(GNEAttributeCarrier::getTagProperties(SUMO_TAG_TAZ));
188  // show drawing shape
189  myTAZFrameParent->myDrawingShape->showDrawingShape();
190  // hide edge common parameters
191  myTAZFrameParent->myTAZCommonStatistics->hideTAZCommonStatisticsModul();
192  // hide edge common parameters
193  myTAZFrameParent->myTAZChildDefaultParameters->hideTAZChildDefaultParametersModul();
194  // hide Edges graphics
195  myTAZFrameParent->myTAZEdgesGraphic->hideTAZEdgesGraphicModul();
196  // hide save TAZ Edges
197  myTAZFrameParent->myTAZSaveChanges->hideTAZSaveChangesModul();
198  // restore label
199  myTAZCurrentLabel->setText("No TAZ selected");
200  // clear net edges (always the last step due hideTAZEdgesGraphicModul() function)
201  myNetEdges.clear();
202  // clear selected edges
203  mySelectedEdges.clear();
204  // reset all weight values
205  myMaxSourcePlusSinkWeight = 0;
206  myMinSourcePlusSinkWeight = -1;
207  myMaxSourceMinusSinkWeight = 0;
208  myMinSourceMinusSinkWeight = -1;
209  }
210 }
211 
212 
213 GNETAZ*
215  return myEditedTAZ;
216 }
217 
218 
219 bool
221  // simply iterate over edges and check edge parameter
222  for (const auto& i : myTAZEdges) {
223  if (i.edge == edge) {
224  return true;
225  }
226  }
227  // not found, then return false
228  return false;
229 }
230 
231 
232 const std::vector<GNEEdge*>&
234  return myNetEdges;
235 }
236 
237 
238 const std::vector<GNEEdge*>&
240  return mySelectedEdges;
241 }
242 
243 
244 const std::vector<GNETAZFrame::TAZCurrent::TAZEdge>&
246  return myTAZEdges;
247 }
248 
249 
250 void
252  // clear all curren TAZEdges
253  myTAZEdges.clear();
254  // clear weight values
255  myMaxSourcePlusSinkWeight = 0;
256  myMinSourcePlusSinkWeight = -1;
257  myMaxSourceMinusSinkWeight = 0;
258  myMinSourceMinusSinkWeight = -1;
259  // only refresh if we're editing an TAZ
260  if (myEditedTAZ) {
261  // iterate over child additional and create TAZEdges
262  for (const auto& i : myEditedTAZ->getChildAdditionals()) {
263  addTAZChild(dynamic_cast<GNETAZSourceSink*>(i));
264  }
265  // update colors after add all edges
266  for (auto& i : myTAZEdges) {
267  i.updateColors();
268  }
269  // update edge colors
270  myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
271  }
272 }
273 
274 
275 void
277  // first make sure that additional is an TAZ Source or Sink
278  if (sourceSink && ((sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) || (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSINK))) {
279  GNEEdge* edge = myTAZFrameParent->myViewNet->getNet()->retrieveEdge(sourceSink->getAttribute(SUMO_ATTR_EDGE));
280  // first check if TAZEdge has to be created
281  bool createTAZEdge = true;
282  for (auto& i : myTAZEdges) {
283  if (i.edge == edge) {
284  createTAZEdge = false;
285  // update TAZ Source or Sink
286  if (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) {
287  i.TAZSource = sourceSink;
288  } else {
289  i.TAZSink = sourceSink;
290  }
291  }
292  }
293  // check if additional has to be created
294  if (createTAZEdge) {
295  if (sourceSink->getTagProperty().getTag() == SUMO_TAG_TAZSOURCE) {
296  myTAZEdges.push_back(TAZEdge(this, edge, sourceSink, nullptr));
297  } else {
298  myTAZEdges.push_back(TAZEdge(this, edge, nullptr, sourceSink));
299  }
300  }
301  // recalculate weights
302  myMaxSourcePlusSinkWeight = 0;
303  myMinSourcePlusSinkWeight = -1;
304  myMaxSourceMinusSinkWeight = 0;
305  myMinSourceMinusSinkWeight = -1;
306  for (const auto& i : myTAZEdges) {
307  // make sure that both TAZ Source and Sink exist
308  if (i.TAZSource && i.TAZSink) {
309  // obtain source plus sink
310  double sourcePlusSink = i.TAZSource->getDepartWeight() + i.TAZSink->getDepartWeight();
311  // check myMaxSourcePlusSinkWeight
312  if (sourcePlusSink > myMaxSourcePlusSinkWeight) {
313  myMaxSourcePlusSinkWeight = sourcePlusSink;
314  }
315  // check myMinSourcePlusSinkWeight
316  if ((myMinSourcePlusSinkWeight == -1) || (sourcePlusSink < myMinSourcePlusSinkWeight)) {
317  myMinSourcePlusSinkWeight = sourcePlusSink;
318  }
319  // obtain source minus sink
320  double sourceMinusSink = i.TAZSource->getDepartWeight() - i.TAZSink->getDepartWeight();
321  // use valor absolute
322  if (sourceMinusSink < 0) {
323  sourceMinusSink *= -1;
324  }
325  // check myMaxSourcePlusSinkWeight
326  if (sourceMinusSink > myMaxSourceMinusSinkWeight) {
327  myMaxSourceMinusSinkWeight = sourceMinusSink;
328  }
329  // check myMinSourcePlusSinkWeight
330  if ((myMinSourceMinusSinkWeight == -1) || (sourceMinusSink < myMinSourceMinusSinkWeight)) {
331  myMinSourceMinusSinkWeight = sourceMinusSink;
332  }
333  }
334  }
335  } else {
336  throw ProcessError("Invalid TAZ Child");
337  }
338 }
339 
340 // ---------------------------------------------------------------------------
341 // GNETAZFrame::TAZCommonStatistics - methods
342 // ---------------------------------------------------------------------------
343 
345  FXGroupBox(TAZFrameParent->myContentFrame, "TAZ Statistics", GUIDesignGroupBoxFrame),
346  myTAZFrameParent(TAZFrameParent) {
347  // create label for statistics
348  myStatisticsLabel = new FXLabel(this, "Statistics", 0, GUIDesignLabelFrameInformation);
349 }
350 
351 
353 
354 
355 void
357  // always update statistics after show
358  updateStatistics();
359  show();
360 }
361 
362 
363 void
365  hide();
366 }
367 
368 
369 void
371  if (myTAZFrameParent->myTAZCurrent->getTAZ()) {
372  // declare ostringstream for statistics
373  std::ostringstream information;
374  information
375  << "- Number of Edges: " << toString(myTAZFrameParent->myTAZCurrent->getTAZ()->getChildAdditionals().size() / 2) << "\n"
376  << "- Min source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SOURCE) << "\n"
377  << "- Max source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SOURCE) << "\n"
378  << "- Average source: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SOURCE) << "\n"
379  << "\n"
380  << "- Min sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MIN_SINK) << "\n"
381  << "- Max sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_MAX_SINK) << "\n"
382  << "- Average sink: " << myTAZFrameParent->myTAZCurrent->getTAZ()->getAttribute(GNE_ATTR_AVERAGE_SINK);
383  // set new label
384  myStatisticsLabel->setText(information.str().c_str());
385  } else {
386  myStatisticsLabel->setText("No TAZ Selected");
387  }
388 }
389 
390 // ---------------------------------------------------------------------------
391 // GNETAZFrame::TAZSaveChanges - methods
392 // ---------------------------------------------------------------------------
393 
395  FXGroupBox(TAZFrameParent->myContentFrame, "Modifications", GUIDesignGroupBoxFrame),
396  myTAZFrameParent(TAZFrameParent) {
397  // Create groupbox for save changes
398  mySaveChangesButton = new FXButton(this, "Save changes", GUIIconSubSys::getIcon(ICON_SAVE), this, MID_OK, GUIDesignButton);
399  mySaveChangesButton->disable();
400  // Create groupbox cancel changes
401  myCancelChangesButton = new FXButton(this, "Cancel changes", GUIIconSubSys::getIcon(ICON_CANCEL), this, MID_CANCEL, GUIDesignButton);
402  myCancelChangesButton->disable();
403 }
404 
405 
407 
408 
409 void
411  show();
412 }
413 
414 
415 void
417  // cancel changes before hidding modul
418  onCmdCancelChanges(0, 0, 0);
419  hide();
420 }
421 
422 
423 void
425  // check that save changes is disabled
426  if (!mySaveChangesButton->isEnabled()) {
427  // enable mySaveChangesButton and myCancelChangesButton
428  mySaveChangesButton->enable();
429  myCancelChangesButton->enable();
430  // start undo list set
431  myTAZFrameParent->myViewNet->getUndoList()->p_begin("TAZ attributes");
432  }
433 }
434 
435 
436 bool
438  // simply check if save Changes Button is enabled
439  return mySaveChangesButton->isEnabled();
440 }
441 
442 
443 long
444 GNETAZFrame::TAZSaveChanges::onCmdSaveChanges(FXObject*, FXSelector, void*) {
445  // check that save changes is enabled
446  if (mySaveChangesButton->isEnabled()) {
447  // disable mySaveChangesButton and myCancelChangesButtonand
448  mySaveChangesButton->disable();
449  myCancelChangesButton->disable();
450  // finish undo list set
451  myTAZFrameParent->myViewNet->getUndoList()->p_end();
452  }
453  return 1;
454 }
455 
456 
457 long
458 GNETAZFrame::TAZSaveChanges::onCmdCancelChanges(FXObject*, FXSelector, void*) {
459  // check that save changes is enabled
460  if (mySaveChangesButton->isEnabled()) {
461  // disable buttons
462  mySaveChangesButton->disable();
463  myCancelChangesButton->disable();
464  // abort undo list
465  myTAZFrameParent->myViewNet->getUndoList()->p_abort();
466  // always refresh TAZ Edges after removing TAZSources/Sinks
467  myTAZFrameParent->myTAZCurrent->refreshTAZEdges();
468  // update use edges button
469  myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
470  }
471  return 1;
472 }
473 
474 // ---------------------------------------------------------------------------
475 // GNETAZFrame::TAZChildDefaultParameters - methods
476 // ---------------------------------------------------------------------------
477 
479  FXGroupBox(TAZFrameParent->myContentFrame, "TAZ Sources/Sinks", GUIDesignGroupBoxFrame),
480  myTAZFrameParent(TAZFrameParent),
481  myDefaultTAZSourceWeight(1),
482  myDefaultTAZSinkWeight(1) {
483  // create checkbox for toogle membership
484  FXHorizontalFrame* toogleMembershipFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
485  new FXLabel(toogleMembershipFrame, "Membership", 0, GUIDesignLabelAttribute);
486  myToggleMembership = new FXCheckButton(toogleMembershipFrame, "Toggle", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
487  // by default enabled
488  myToggleMembership->setCheck(TRUE);
489  // create default TAZ Source weight
490  myDefaultTAZSourceFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
491  new FXLabel(myDefaultTAZSourceFrame, "New source", 0, GUIDesignLabelAttribute);
493  myTextFieldDefaultValueTAZSources->setText("1");
494  // create default TAZ Sink weight
495  myDefaultTAZSinkFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
496  new FXLabel(myDefaultTAZSinkFrame, "New sink", 0, GUIDesignLabelAttribute);
498  myTextFieldDefaultValueTAZSinks->setText("1");
499  // Create button for use selected edges
500  myUseSelectedEdges = new FXButton(this, "Use selected edges", nullptr, this, MID_GNE_SELECT, GUIDesignButton);
501  // Create information label
502  std::ostringstream information;
503  information
504  << "- Toogle Membership:\n"
505  << " Create new Sources/Sinks\n"
506  << " with given weights.";
507  myInformationLabel = new FXLabel(this, information.str().c_str(), 0, GUIDesignLabelFrameInformation);
508 }
509 
510 
512 
513 
514 void
516  // check if TAZ selection Statistics Modul has to be shown
517  if (myToggleMembership->getCheck() == FALSE) {
518  myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModul();
519  } else {
520  myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModul();
521  }
522  // update selected button
523  updateSelectEdgesButton();
524  // show modul
525  show();
526 }
527 
528 
529 void
531  // hide TAZ Selection Statistics Modul
532  myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModul();
533  // hide modul
534  hide();
535 }
536 
537 
538 void
540  if (myToggleMembership->getCheck() == TRUE) {
541  // check if use selected edges has to be enabled
542  if (myTAZFrameParent->myTAZCurrent->getSelectedEdges().size() > 0) {
543  myUseSelectedEdges->setText("Use selected edges");
544  myUseSelectedEdges->enable();
545  } else if (myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0) {
546  myUseSelectedEdges->setText("Remove all edges");
547  myUseSelectedEdges->enable();
548  } else {
549  myUseSelectedEdges->setText("Use selected edges");
550  myUseSelectedEdges->disable();
551  }
552  } else if (myTAZFrameParent->getTAZCurrentModul()->getTAZEdges().size() > 0) {
553  // enable myUseSelectedEdges button
554  myUseSelectedEdges->enable();
555  // update mySelectEdgesOfSelection label
556  if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
557  // check if all edges of TAZChildren are selected
558  bool allSelected = true;
559  for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) {
560  if (!i.edge->isAttributeCarrierSelected()) {
561  allSelected = false;
562  }
563  }
564  if (allSelected) {
565  myUseSelectedEdges->setText("Remove all edges from selection");
566  } else {
567  myUseSelectedEdges->setText("Add all edges to selection");
568  }
569  } else if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 1) {
570  if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().front().edge->isAttributeCarrierSelected()) {
571  myUseSelectedEdges->setText("Remove edge from selection");
572  } else {
573  myUseSelectedEdges->setText("Add edge to selection");
574  }
575  } else {
576  // check if all edges of TAZChildren selected are selected
577  bool allSelected = true;
578  for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
579  if (!i.edge->isAttributeCarrierSelected()) {
580  allSelected = false;
581  }
582  }
583  if (allSelected) {
584  myUseSelectedEdges->setText(("Remove " + toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) + " from to selection").c_str());
585  } else {
586  myUseSelectedEdges->setText(("Add " + toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) + " edges to selection").c_str());
587  }
588  }
589  } else {
590  // TAZ doesn't have children, then disable button
591  myUseSelectedEdges->disable();
592  }
593 }
594 
595 
596 double
598  return myDefaultTAZSourceWeight;
599 }
600 
601 
602 double
604  return myDefaultTAZSinkWeight;
605 }
606 
607 
608 bool
610  return (myToggleMembership->getCheck() == TRUE);
611 }
612 
613 
614 long
616  // find edited object
617  if (obj == myToggleMembership) {
618  // first clear selected edges
619  myTAZFrameParent->myTAZSelectionStatistics->clearSelectedEdges();
620  // set text of myToggleMembership
621  if (myToggleMembership->getCheck() == TRUE) {
622  myToggleMembership->setText("toogle");
623  // show TAZSource/Sink Frames
624  myDefaultTAZSourceFrame->show();
625  myDefaultTAZSinkFrame->show();
626  // update information label
627  std::ostringstream information;
628  information
629  << "- Toogle Membership:\n"
630  << " Create new Sources/Sinks\n"
631  << " with given weights.";
632  myInformationLabel->setText(information.str().c_str());
633  // hide TAZSelectionStatistics
634  myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModul();
635  // check if use selected edges has to be enabled
636  if (myTAZFrameParent->myTAZCurrent->getSelectedEdges().size() > 0) {
637  myUseSelectedEdges->setText("Use selected edges");
638  } else if (myTAZFrameParent->myTAZCurrent->getTAZEdges().size() > 0) {
639  myUseSelectedEdges->setText("Remove all edges");
640  } else {
641  myUseSelectedEdges->setText("Use selected edges");
642  myUseSelectedEdges->disable();
643  }
644  } else {
645  myToggleMembership->setText("keep");
646  // hide TAZSource/Sink Frames
647  myDefaultTAZSourceFrame->hide();
648  myDefaultTAZSinkFrame->hide();
649  // update information label
650  std::ostringstream information;
651  information
652  << "- Keep Membership:\n"
653  << " Select Sources/Sinks.\n"
654  << "- Press ESC to clear\n"
655  << " current selection.";
656  myInformationLabel->setText(information.str().c_str());
657  // show TAZSelectionStatistics
658  myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModul();
659  }
660  // update button
661  updateSelectEdgesButton();
662  } else if (obj == myTextFieldDefaultValueTAZSources) {
663  // check if given value is valid
664  if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSources->getText().text())) {
665  myDefaultTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSources->getText().text());
666  // check if myDefaultTAZSourceWeight is greather than 0
667  if (myDefaultTAZSourceWeight >= 0) {
668  // set valid color
669  myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(0, 0, 0));
670  } else {
671  // set invalid color
672  myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
673  myDefaultTAZSourceWeight = 1;
674  }
675  } else {
676  // set invalid color
677  myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
678  myDefaultTAZSourceWeight = 1;
679  }
680  } else if (obj == myTextFieldDefaultValueTAZSinks) {
681  // check if given value is valid
682  if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSinks->getText().text())) {
683  myDefaultTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSinks->getText().text());
684  // check if myDefaultTAZSinkWeight is greather than 0
685  if (myDefaultTAZSinkWeight >= 0) {
686  // set valid color
687  myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(0, 0, 0));
688  } else {
689  // set invalid color
690  myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
691  myDefaultTAZSinkWeight = 1;
692  }
693  } else {
694  // set invalid color
695  myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
696  myDefaultTAZSinkWeight = 1;
697  }
698  }
699  return 1;
700 }
701 
702 
703 long
705  // select edge or create new TAZ Source/Child, depending of myToggleMembership
706  if (myToggleMembership->getCheck() == TRUE) {
707  // first drop all edges
708  myTAZFrameParent->dropTAZMembers();
709  // iterate over selected edges and add it as TAZMember
710  for (const auto& i : myTAZFrameParent->myTAZCurrent->getSelectedEdges()) {
711  myTAZFrameParent->addOrRemoveTAZMember(i);
712  }
713  // update selected button
714  updateSelectEdgesButton();
715  } else {
716  if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
717  // first check if all TAZEdges are selected
718  bool allSelected = true;
719  for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) {
720  if (!i.edge->isAttributeCarrierSelected()) {
721  allSelected = false;
722  }
723  }
724  // select or unselect all depending of allSelected
725  if (allSelected) {
726  // remove form selection all TAZEdges
727  for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) {
728  // enable save button
729  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
730  // change attribute selected
731  i.edge->setAttribute(GNE_ATTR_SELECTED, "false", myTAZFrameParent->myViewNet->getUndoList());
732  }
733  } else {
734  // add to selection all TAZEdges
735  for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) {
736  // enable save button
737  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
738  // change attribute selected
739  i.edge->setAttribute(GNE_ATTR_SELECTED, "true", myTAZFrameParent->myViewNet->getUndoList());
740  }
741  }
742  } else {
743  // first check if all TAZEdges are selected
744  bool allSelected = true;
745  for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
746  if (!i.edge->isAttributeCarrierSelected()) {
747  allSelected = false;
748  }
749  }
750  // select or unselect all depending of allSelected
751  if (allSelected) {
752  // only remove from selection selected TAZEdges
753  for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
754  if (i.edge->isAttributeCarrierSelected()) {
755  // enable save button
756  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
757  // change attribute selected
758  i.edge->setAttribute(GNE_ATTR_SELECTED, "false", myTAZFrameParent->myViewNet->getUndoList());
759  }
760  }
761  } else {
762  // only add to selection selected TAZEdges
763  for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
764  if (!i.edge->isAttributeCarrierSelected()) {
765  // enable save button
766  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
767  // change attribute selected
768  i.edge->setAttribute(GNE_ATTR_SELECTED, "true", myTAZFrameParent->myViewNet->getUndoList());
769  }
770  }
771  }
772  }
773  }
774  // update selection button
775  myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
776  // update view net
777  myTAZFrameParent->myViewNet->update();
778  return 1;
779 }
780 
781 // ---------------------------------------------------------------------------
782 // GNETAZFrame::TAZSelectionStatistics - methods
783 // ---------------------------------------------------------------------------
784 
786  FXGroupBox(TAZFrameParent->myContentFrame, "Selection Statistics", GUIDesignGroupBoxFrame),
787  myTAZFrameParent(TAZFrameParent) {
788  // create default TAZ Source weight
789  myTAZSourceFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
790  new FXLabel(myTAZSourceFrame, "Source", 0, GUIDesignLabelAttribute);
792  myTAZSourceFrame->hide();
793  // create default TAZ Sink weight
794  myTAZSinkFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
795  new FXLabel(myTAZSinkFrame, "Sink", 0, GUIDesignLabelAttribute);
797  myTAZSinkFrame->hide();
798  // create label for statistics
799  myStatisticsLabel = new FXLabel(this, "Statistics", 0, GUIDesignLabelFrameInformation);
800 }
801 
802 
804 
805 
806 void
808  // update Statistics before show
809  updateStatistics();
810  show();
811 }
812 
813 
814 void
816  // clear children before hide
817  clearSelectedEdges();
818  hide();
819 }
820 
821 
822 bool
824  // find TAZEdge using edge as criterium wasn't previously selected
825  for (const auto& i : myEdgeAndTAZChildrenSelected) {
826  if (i.edge == TAZEdge.edge) {
827  throw ProcessError("TAZEdge already selected");
828  }
829  }
830  // add edge and their TAZ Children into myTAZChildSelected
831  myEdgeAndTAZChildrenSelected.push_back(TAZEdge);
832  // always update statistics after insertion
833  updateStatistics();
834  // update edge colors
835  myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
836  // update selection button
837  myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
838  return true;
839 }
840 
841 
842 bool
844  if (edge) {
845  // find TAZEdge using edge as criterium
846  for (auto i = myEdgeAndTAZChildrenSelected.begin(); i != myEdgeAndTAZChildrenSelected.end(); i++) {
847  if (i->edge == edge) {
848  myEdgeAndTAZChildrenSelected.erase(i);
849  // always update statistics after insertion
850  updateStatistics();
851  // update edge colors
852  myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
853  // update selection button
854  myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
855  return true;
856  }
857  }
858  // throw exception if edge wasn't found
859  throw ProcessError("edge wasn't found");
860  } else {
861  throw ProcessError("Invalid edge");
862  }
863 }
864 
865 
866 bool
868  // find TAZEdge using edge as criterium
869  for (const auto& i : myEdgeAndTAZChildrenSelected) {
870  if (i.edge == edge) {
871  return true;
872  }
873  }
874  // edge wasn't found, then return false
875  return false;
876 }
877 
878 
879 void
881  // clear all selected edges (and the TAZ Children)
882  myEdgeAndTAZChildrenSelected.clear();
883  // always update statistics after clear edges
884  updateStatistics();
885  // update edge colors
886  myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
887  // update selection button
888  myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
889 }
890 
891 
892 const std::vector<GNETAZFrame::TAZCurrent::TAZEdge>&
894  return myEdgeAndTAZChildrenSelected;
895 }
896 
897 
898 long
900  if (obj == myTextFieldTAZSourceWeight) {
901  // check if given value is valid
902  if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSourceWeight->getText().text())) {
903  double newTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSourceWeight->getText().text());
904  // check if myDefaultTAZSourceWeight is greather than 0
905  if (newTAZSourceWeight >= 0) {
906  // set valid color in TextField
907  myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
908  // enable save button
909  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
910  // update weight of all TAZSources
911  for (const auto& i : myEdgeAndTAZChildrenSelected) {
912  i.TAZSource->setAttribute(SUMO_ATTR_WEIGHT, myTextFieldTAZSourceWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
913  }
914  // refresh TAZ Edges
915  myTAZFrameParent->getTAZCurrentModul()->refreshTAZEdges();
916  } else {
917  // set invalid color
918  myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
919  }
920  } else {
921  // set invalid color
922  myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
923  }
924  } else if (obj == myTextFieldTAZSinkWeight) {
925  // check if given value is valid
926  if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSinkWeight->getText().text())) {
927  double newTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSinkWeight->getText().text());
928  // check if myDefaultTAZSinkWeight is greather than 0
929  if (newTAZSinkWeight >= 0) {
930  // set valid color in TextField
931  myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
932  // enable save button
933  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
934  // update weight of all TAZSources
935  for (const auto& i : myEdgeAndTAZChildrenSelected) {
936  i.TAZSink->setAttribute(SUMO_ATTR_WEIGHT, myTextFieldTAZSinkWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
937  }
938  // refresh TAZ Edges
939  myTAZFrameParent->getTAZCurrentModul()->refreshTAZEdges();
940  } else {
941  // set invalid color
942  myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
943  }
944  } else {
945  // set invalid color
946  myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
947  }
948  }
949  return 1;
950 }
951 
952 
953 long
955  if (myEdgeAndTAZChildrenSelected.size() == 0) {
956  // add to selection all TAZEdges
957  for (const auto& i : myTAZFrameParent->getTAZCurrentModul()->getTAZEdges()) {
958  // avoid empty undolists
959  if (!i.edge->isAttributeCarrierSelected()) {
960  // enable save button
961  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
962  // change attribute selected
963  i.edge->setAttribute(GNE_ATTR_SELECTED, "true", myTAZFrameParent->myViewNet->getUndoList());
964  }
965  }
966  } else {
967  // only add to selection selected TAZEdges
968  for (const auto& i : myEdgeAndTAZChildrenSelected) {
969  // avoid empty undolists
970  if (!i.edge->isAttributeCarrierSelected()) {
971  // enable save button
972  myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
973  // change attribute selected
974  i.edge->setAttribute(GNE_ATTR_SELECTED, "true", myTAZFrameParent->myViewNet->getUndoList());
975  }
976  }
977  }
978  // update view net
979  myTAZFrameParent->myViewNet->update();
980  return 1;
981 }
982 
983 
984 void
986  if (myEdgeAndTAZChildrenSelected.size() > 0) {
987  // show TAZSources/Sinks frames
988  myTAZSourceFrame->show();
989  myTAZSinkFrame->show();
990  // declare string sets for TextFields (to avoid duplicated values)
991  std::set<std::string> weightSourceSet;
992  std::set<std::string> weightSinkSet;
993  // declare stadistic variables
994  double weight = 0;
995  double maxWeightSource = 0;
996  double minWeightSource = -1;
997  double averageWeightSource = 0;
998  double maxWeightSink = 0;
999  double minWeightSink = -1;
1000  double averageWeightSink = 0;
1001  // iterate over child additional
1002  for (const auto& i : myEdgeAndTAZChildrenSelected) {
1003  //start with sources
1004  weight = i.TAZSource->getDepartWeight();
1005  // insert source weight in weightSinkTextField
1006  weightSourceSet.insert(toString(weight));
1007  // check max Weight
1008  if (maxWeightSource < weight) {
1009  maxWeightSource = weight;
1010  }
1011  // check min Weight
1012  if (minWeightSource == -1 || (maxWeightSource < weight)) {
1013  minWeightSource = weight;
1014  }
1015  // update Average
1016  averageWeightSource += weight;
1017  // continue with sinks
1018  weight = i.TAZSink->getDepartWeight();
1019  // save sink weight in weightSinkTextField
1020  weightSinkSet.insert(toString(weight));
1021  // check max Weight
1022  if (maxWeightSink < weight) {
1023  maxWeightSink = weight;
1024  }
1025  // check min Weight
1026  if (minWeightSink == -1 || (maxWeightSink < weight)) {
1027  minWeightSink = weight;
1028  }
1029  // update Average
1030  averageWeightSink += weight;
1031  }
1032  // calculate average
1033  averageWeightSource /= myEdgeAndTAZChildrenSelected.size();
1034  averageWeightSink /= myEdgeAndTAZChildrenSelected.size();
1035  // declare ostringstream for statistics
1036  std::ostringstream information;
1037  std::string edgeInformation;
1038  // first fill edgeInformation
1039  if (myEdgeAndTAZChildrenSelected.size() == 1) {
1040  edgeInformation = "- Edge ID: " + myEdgeAndTAZChildrenSelected.begin()->edge->getID();
1041  } else {
1042  edgeInformation = "- Number of edges: " + toString(myEdgeAndTAZChildrenSelected.size());
1043  }
1044  // fill rest of information
1045  information
1046  << edgeInformation << "\n"
1047  << "- Min source: " << toString(minWeightSource) << "\n"
1048  << "- Max source: " << toString(maxWeightSource) << "\n"
1049  << "- Average source: " << toString(averageWeightSource) << "\n"
1050  << "\n"
1051  << "- Min sink: " << toString(minWeightSink) << "\n"
1052  << "- Max sink: " << toString(maxWeightSink) << "\n"
1053  << "- Average sink: " << toString(averageWeightSink);
1054  // set new label
1055  myStatisticsLabel->setText(information.str().c_str());
1056  // set TextFields (Text and color)
1057  myTextFieldTAZSourceWeight->setText(joinToString(weightSourceSet, " ").c_str());
1058  myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1059  myTextFieldTAZSinkWeight->setText(joinToString(weightSinkSet, " ").c_str());
1060  myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1061  } else {
1062  // hide TAZSources/Sinks frames
1063  myTAZSourceFrame->hide();
1064  myTAZSinkFrame->hide();
1065  // hide myStatisticsLabel
1066  myStatisticsLabel->setText("No edges selected");
1067  }
1068 }
1069 
1070 // ---------------------------------------------------------------------------
1071 // GNETAZFrame::TAZParameters- methods
1072 // ---------------------------------------------------------------------------
1073 
1075  FXGroupBox(TAZFrameParent->myContentFrame, "TAZ parameters", GUIDesignGroupBoxFrame),
1076  myTAZFrameParent(TAZFrameParent) {
1077  // create Button and string textField for color and set blue as default color
1078  FXHorizontalFrame* colorParameter = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
1079  myColorEditor = new FXButton(colorParameter, toString(SUMO_ATTR_COLOR).c_str(), 0, this, MID_GNE_SET_ATTRIBUTE_DIALOG, GUIDesignButtonAttribute);
1080  myTextFieldColor = new FXTextField(colorParameter, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
1081  myTextFieldColor->setText("blue");
1082  // create Label and CheckButton for use innen edges with true as default value
1083  FXHorizontalFrame* useInnenEdges = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
1084  new FXLabel(useInnenEdges, "Edges within", 0, GUIDesignLabelAttribute);
1085  myAddEdgesWithinCheckButton = new FXCheckButton(useInnenEdges, "use", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
1086  myAddEdgesWithinCheckButton->setCheck(true);
1087  // Create help button
1088  myHelpTAZAttribute = new FXButton(this, "Help", 0, this, MID_HELP, GUIDesignButtonRectangular);
1089 }
1090 
1091 
1093 
1094 
1095 void
1097  FXGroupBox::show();
1098 }
1099 
1100 
1101 void
1103  FXGroupBox::hide();
1104 }
1105 
1106 
1107 bool
1109  return GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text());
1110 }
1111 
1112 
1113 bool
1115  return (myAddEdgesWithinCheckButton->getCheck() == TRUE);
1116 }
1117 
1118 
1119 std::map<SumoXMLAttr, std::string>
1121  std::map<SumoXMLAttr, std::string> parametersAndValues;
1122  // get color (currently the only editable attribute)
1123  parametersAndValues[SUMO_ATTR_COLOR] = myTextFieldColor->getText().text();
1124  return parametersAndValues;
1125 }
1126 
1127 
1128 long
1130  // create FXColorDialog
1131  FXColorDialog colordialog(this, tr("Color Dialog"));
1132  colordialog.setTarget(this);
1133  // If previous attribute wasn't correct, set black as default color
1134  if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1135  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor(myTextFieldColor->getText().text())));
1136  } else {
1137  colordialog.setRGBA(MFXUtils::getFXColor(RGBColor::parseColor("blue")));
1138  }
1139  // execute dialog to get a new color
1140  if (colordialog.execute()) {
1141  myTextFieldColor->setText(toString(MFXUtils::getRGBColor(colordialog.getRGBA())).c_str());
1142  onCmdSetAttribute(0, 0, 0);
1143  }
1144  return 0;
1145 }
1146 
1147 
1148 long
1149 GNETAZFrame::TAZParameters::onCmdSetAttribute(FXObject*, FXSelector, void*) {
1150  // only COLOR text field has to be checked
1151  bool currentParametersValid = GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text());
1152  // change color of textfield dependig of myCurrentParametersValid
1153  if (currentParametersValid) {
1154  myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
1155  myTextFieldColor->killFocus();
1156  } else {
1157  myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
1158  currentParametersValid = false;
1159  }
1160  // change useInnenEdgesCheckButton text
1161  if (myAddEdgesWithinCheckButton->getCheck() == TRUE) {
1162  myAddEdgesWithinCheckButton->setText("use");
1163  } else {
1164  myAddEdgesWithinCheckButton->setText("not use");
1165  }
1166  return 0;
1167 }
1168 
1169 
1170 long
1171 GNETAZFrame::TAZParameters::onCmdHelp(FXObject*, FXSelector, void*) {
1172  myTAZFrameParent->openHelpAttributesDialog(GNEAttributeCarrier::getTagProperties(SUMO_TAG_TAZ));
1173  return 1;
1174 }
1175 
1176 // ---------------------------------------------------------------------------
1177 // GNETAZFrame::TAZEdgesGraphic - methods
1178 // ---------------------------------------------------------------------------
1179 
1181  FXGroupBox(TAZFrameParent->myContentFrame, "Edges", GUIDesignGroupBoxFrame),
1182  myTAZFrameParent(TAZFrameParent),
1183  myEdgeDefaultColor(RGBColor::GREY),
1184  myEdgeSelectedColor(RGBColor::MAGENTA) {
1185  // create label for non taz edge color information
1186  FXLabel* NonTAZEdgeLabel = new FXLabel(this, "Non TAZ Edge", nullptr, GUIDesignLabelCenter);
1187  NonTAZEdgeLabel->setBackColor(MFXUtils::getFXColor(myEdgeDefaultColor));
1188  NonTAZEdgeLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
1189  // create label for selected TAZEdge color information
1190  FXLabel* selectedTAZEdgeLabel = new FXLabel(this, "Selected TAZ Edge", nullptr, GUIDesignLabelCenter);
1191  selectedTAZEdgeLabel->setBackColor(MFXUtils::getFXColor(myEdgeSelectedColor));
1192  // create label for color information
1193  new FXLabel(this, "Scala: Min -> Max", nullptr, GUIDesignLabelCenterThick);
1194  // fill scale colors
1195  myScaleColors.push_back(RGBColor(232, 35, 0));
1196  myScaleColors.push_back(RGBColor(255, 165, 0));
1197  myScaleColors.push_back(RGBColor(255, 255, 0));
1198  myScaleColors.push_back(RGBColor(28, 215, 0));
1199  myScaleColors.push_back(RGBColor(0, 181, 100));
1200  myScaleColors.push_back(RGBColor(0, 255, 191));
1201  myScaleColors.push_back(RGBColor(178, 255, 255));
1202  myScaleColors.push_back(RGBColor(0, 112, 184));
1203  myScaleColors.push_back(RGBColor(56, 41, 131));
1204  myScaleColors.push_back(RGBColor(127, 0, 255));
1205  // create frame for color scale
1206  FXHorizontalFrame* horizontalFrameColors = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
1207  for (const auto& i : myScaleColors) {
1208  FXLabel* colorLabel = new FXLabel(horizontalFrameColors, "", nullptr, GUIDesignLabelLeft);
1209  colorLabel->setBackColor(MFXUtils::getFXColor(i));
1210  }
1211  // create Radio button for show edges by source weight
1212  myColorBySourceWeight = new FXRadioButton(this, "Color by Source", this, MID_CHOOSEN_OPERATION, GUIDesignRadioButton);
1213  // create Radio button for show edges by sink weight
1214  myColorBySinkWeight = new FXRadioButton(this, "Color by Sink", this, MID_CHOOSEN_OPERATION, GUIDesignRadioButton);
1215  // create Radio button for show edges by source + sink weight
1216  myColorBySourcePlusSinkWeight = new FXRadioButton(this, "Color by Source + Sink", this, MID_CHOOSEN_OPERATION, GUIDesignRadioButton);
1217  // create Radio button for show edges by source - sink weight
1218  myColorBySourceMinusSinkWeight = new FXRadioButton(this, "Color by Source - Sink", this, MID_CHOOSEN_OPERATION, GUIDesignRadioButton);
1219  // show by source as default
1220  myColorBySourceWeight->setCheck(true);
1221 }
1222 
1223 
1225 
1226 
1227 void
1229  // update edge colors
1230  updateEdgeColors();
1231  show();
1232 }
1233 
1234 
1235 void
1237  // iterate over all edges and restore color
1238  for (const auto& i : myTAZFrameParent->myTAZCurrent->getNetEdges()) {
1239  for (const auto j : i->getLanes()) {
1240  j->setSpecialColor(nullptr);
1241  }
1242  }
1243  hide();
1244 }
1245 
1246 
1247 void
1249  // start painting all edges in gray
1250  for (const auto& i : myTAZFrameParent->myTAZCurrent->getNetEdges()) {
1251  // set candidate color (in this case, gray)
1252  for (const auto j : i->getLanes()) {
1253  j->setSpecialColor(&myEdgeDefaultColor);
1254  }
1255  }
1256  // now paint Source/sinks colors
1257  for (const auto& i : myTAZFrameParent->myTAZCurrent->getTAZEdges()) {
1258  // set candidate color (in this case,
1259  for (const auto j : i.edge->getLanes()) {
1260  // check what will be painted (source, sink or both)
1261  if (myColorBySourceWeight->getCheck() == TRUE) {
1262  j->setSpecialColor(&myScaleColors.at(i.sourceColor), i.TAZSource->getDepartWeight());
1263  } else if (myColorBySinkWeight->getCheck() == TRUE) {
1264  j->setSpecialColor(&myScaleColors.at(i.sinkColor), i.TAZSink->getDepartWeight());
1265  } else if (myColorBySourcePlusSinkWeight->getCheck() == TRUE) {
1266  j->setSpecialColor(&myScaleColors.at(i.sourcePlusSinkColor), i.TAZSource->getDepartWeight() + i.TAZSink->getDepartWeight());
1267  } else {
1268  j->setSpecialColor(&myScaleColors.at(i.sourceMinusSinkColor), i.TAZSource->getDepartWeight() - i.TAZSink->getDepartWeight());
1269  }
1270  }
1271  }
1272  // as last step paint candidate colors
1273  for (const auto& i : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
1274  // set candidate selected color
1275  for (const auto& j : i.edge->getLanes()) {
1276  j->setSpecialColor(&myEdgeSelectedColor);
1277  }
1278  }
1279  // always update view after setting new colors
1280  myTAZFrameParent->myViewNet->update();
1281 }
1282 
1283 
1284 long
1285 GNETAZFrame::TAZEdgesGraphic::onCmdChoosenBy(FXObject* obj, FXSelector, void*) {
1286  // check what radio was pressed and disable the others
1287  if (obj == myColorBySourceWeight) {
1288  myColorBySinkWeight->setCheck(FALSE);
1289  myColorBySourcePlusSinkWeight->setCheck(FALSE);
1290  myColorBySourceMinusSinkWeight->setCheck(FALSE);
1291  } else if (obj == myColorBySinkWeight) {
1292  myColorBySourceWeight->setCheck(FALSE);
1293  myColorBySourcePlusSinkWeight->setCheck(FALSE);
1294  myColorBySourceMinusSinkWeight->setCheck(FALSE);
1295  } else if (obj == myColorBySourcePlusSinkWeight) {
1296  myColorBySourceWeight->setCheck(FALSE);
1297  myColorBySinkWeight->setCheck(FALSE);
1298  myColorBySourceMinusSinkWeight->setCheck(FALSE);
1299  } else if (obj == myColorBySourceMinusSinkWeight) {
1300  myColorBySourceWeight->setCheck(FALSE);
1301  myColorBySinkWeight->setCheck(FALSE);
1302  myColorBySourcePlusSinkWeight->setCheck(FALSE);
1303  }
1304  // update edge colors
1305  updateEdgeColors();
1306  return 1;
1307 }
1308 
1309 // ---------------------------------------------------------------------------
1310 // GNETAZFrame - methods
1311 // ---------------------------------------------------------------------------
1312 
1313 GNETAZFrame::GNETAZFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
1314  GNEFrame(horizontalFrameParent, viewNet, "TAZs") {
1315 
1316  // create current TAZ modul
1317  myTAZCurrent = new TAZCurrent(this);
1318 
1319  // Create TAZ Parameters modul
1320  myTAZParameters = new TAZParameters(this);
1321 
1324 
1325  // Create drawing controls modul
1327 
1328  // Create TAZ Edges Common Statistics modul
1330 
1331  // Create save TAZ Edges modul
1332  myTAZSaveChanges = new TAZSaveChanges(this);
1333 
1334  // Create TAZ Edges Common Parameters modul
1336 
1337  // Create TAZ Edges Selection Statistics modul
1339 
1340  // Create TAZ Edges Common Parameters modul
1341  myTAZEdgesGraphic = new TAZEdgesGraphic(this);
1342 
1343  // by default there isn't a TAZ
1344  myTAZCurrent->setTAZ(nullptr);
1345 }
1346 
1347 
1349 }
1350 
1351 
1352 void
1354  // hide frame
1355  GNEFrame::hide();
1356 }
1357 
1358 
1359 bool
1360 GNETAZFrame::processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor) {
1361  // Declare map to keep values
1362  std::map<SumoXMLAttr, std::string> valuesOfElement;
1363  if (myDrawingShape->isDrawing()) {
1364  // add or delete a new point depending of flag "delete last created point"
1367  } else {
1368  myDrawingShape->addNewPoint(clickedPosition);
1369  }
1370  return true;
1371  } else if ((myTAZCurrent->getTAZ() == nullptr) || (objectsUnderCursor.getTAZFront() && myTAZCurrent->getTAZ() && !myTAZSaveChanges->isChangesPending())) {
1372  // if user click over an TAZ and there isn't changes pending, then select a new TAZ
1373  if (objectsUnderCursor.getTAZFront()) {
1374  // avoid reset of Frame if user doesn't click over an TAZ
1375  myTAZCurrent->setTAZ(objectsUnderCursor.getTAZFront());
1376  return true;
1377  } else {
1378  return false;
1379  }
1380  } else if (objectsUnderCursor.getEdgeFront()) {
1381  // if toogle Edge is enabled, select edge. In other case create two new TAZSource/Sinks
1383  // create new TAZSource/Sinks or delete it
1384  return addOrRemoveTAZMember(objectsUnderCursor.getEdgeFront());
1385  } else {
1386  // first check if clicked edge was previously selected
1387  if (myTAZSelectionStatistics->isEdgeSelected(objectsUnderCursor.getEdgeFront())) {
1388  // clear selected edges
1390  } else {
1391  // iterate over TAZEdges saved in TAZCurrent (it contains the Edge and Source/sinks)
1392  for (const auto& i : myTAZCurrent->getTAZEdges()) {
1393  if (i.edge == objectsUnderCursor.getEdgeFront()) {
1394  // clear current selection (to avoid having two or more edges selected at the same time using mouse clicks)
1396  // now select edge
1398  // edge selected, then return true
1399  return true;
1400  }
1401  }
1402  }
1403  // edge wasn't selected, then return false
1404  return false;
1405  }
1406  } else {
1407  // nothing to do
1408  return false;
1409  }
1410 }
1411 
1412 
1413 void
1414 GNETAZFrame::processEdgeSelection(const std::vector<GNEEdge*>& edges) {
1415  // first check that a TAZ is selected
1416  if (myTAZCurrent->getTAZ()) {
1417  // if "toogle Membership" is enabled, create new TAZSources/sinks. In other case simply select edges
1419  // iterate over edges
1420  for (auto i : edges) {
1421  // first check if edge owns a TAZEge
1422  if (myTAZCurrent->isTAZEdge(i) == false) {
1423  // create new TAZ Sources/Sinks
1425  }
1426  }
1427  } else {
1428  // iterate over edges
1429  for (auto i : edges) {
1430  // first check that selected edge isn't already selected
1432  // iterate over TAZEdges saved in TAZCurrent (it contains the Edge and Source/sinks)
1433  for (const auto& j : myTAZCurrent->getTAZEdges()) {
1434  if (j.edge == i) {
1436  }
1437  }
1438  }
1439  }
1440  }
1441  }
1442 }
1443 
1444 
1447  return myDrawingShape;
1448 }
1449 
1450 
1453  return myTAZCurrent;
1454 }
1455 
1456 
1459  return myTAZSelectionStatistics;
1460 }
1461 
1462 
1465  return myTAZSaveChanges;
1466 }
1467 
1468 
1469 bool
1471  // show warning dialogbox and stop check if input parameters are valid
1473  return false;
1474  } else if (myDrawingShape->getTemporalShape().size() == 0) {
1475  WRITE_WARNING("TAZ shape cannot be empty");
1476  return false;
1477  } else {
1478  // Declare map to keep TAZ Parameters values
1479  std::map<SumoXMLAttr, std::string> valuesOfElement = myTAZParameters->getAttributesAndValues();
1480 
1481  // obtain Netedit attributes
1482  myNeteditAttributes->getNeteditAttributesAndValues(valuesOfElement, nullptr);
1483 
1484  // generate new ID
1486 
1487  // obtain shape and close it
1489  shape.closePolygon();
1490  valuesOfElement[SUMO_ATTR_SHAPE] = toString(shape);
1491 
1492  // check if TAZ has to be created with edges
1494  std::vector<std::string> edgeIDs;
1495  auto ACsInBoundary = myViewNet->getAttributeCarriersInBoundary(shape.getBoxBoundary(), true);
1496  for (auto i : ACsInBoundary) {
1497  if (i.second->getTagProperty().getTag() == SUMO_TAG_EDGE) {
1498  edgeIDs.push_back(i.first);
1499  }
1500  }
1501  valuesOfElement[SUMO_ATTR_EDGES] = toString(edgeIDs);
1502  } else {
1503  // TAZ is created without edges
1504  valuesOfElement[SUMO_ATTR_EDGES] = "";
1505  }
1506  // declare SUMOSAXAttributesImpl_Cached to convert valuesMap into SUMOSAXAttributes
1507  SUMOSAXAttributesImpl_Cached SUMOSAXAttrs(valuesOfElement, getPredefinedTagsMML(), toString(SUMO_TAG_TAZ));
1508  // return true if TAZ was successfully created
1509  return GNEAdditionalHandler::buildAdditional(myViewNet, true, SUMO_TAG_TAZ, SUMOSAXAttrs, nullptr);
1510  }
1511 }
1512 
1513 
1514 bool
1516  // first check if edge exist;
1517  if (edge) {
1518  // first check if already exist (in this case, remove it)
1519  for (const auto& i : myTAZCurrent->getTAZEdges()) {
1520  if (i.edge == edge) {
1521  // enable save changes button
1523  // remove Source and Sinks using GNEChange_Additional
1524  myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSource, false), true);
1525  myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSink, false), true);
1526  // always refresh TAZ Edges after removing TAZSources/Sinks
1528  // update select edges button
1530  return true;
1531  }
1532  }
1533  // if wasn't found, then add it
1535  // create TAZ Sink using GNEChange_Additional and value of TAZChild default parameters
1537  myViewNet->getUndoList()->add(new GNEChange_Additional(TAZSource, true), true);
1538  // create TAZ Sink using GNEChange_Additional and value of TAZChild default parameters
1540  myViewNet->getUndoList()->add(new GNEChange_Additional(TAZSink, true), true);
1541  // always refresh TAZ Edges after adding TAZSources/Sinks
1543  // update selected button
1545  return true;
1546  } else {
1547  throw ProcessError("Edge cannot be null");
1548  }
1549 }
1550 
1551 
1552 void
1554  // iterate over all TAZEdges
1555  for (const auto& i : myTAZCurrent->getTAZEdges()) {
1556  // enable save changes button
1558  // remove Source and Sinks using GNEChange_Additional
1559  myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSource, false), true);
1560  myViewNet->getUndoList()->add(new GNEChange_Additional(i.TAZSink, false), true);
1561  }
1562  // always refresh TAZ Edges after removing TAZSources/Sinks
1564 }
1565 
1566 /****************************************************************************/
GNETAZFrame::TAZChildDefaultParameters::myTextFieldDefaultValueTAZSinks
FXTextField * myTextFieldDefaultValueTAZSinks
textField to set a default value for TAZ Sinks
Definition: GNETAZFrame.h:293
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:273
GNETAZFrame::TAZSelectionStatistics::onCmdSetNewValues
long onCmdSetNewValues(FXObject *obj, FXSelector, void *)
Definition: GNETAZFrame.cpp:899
GNETAZFrame::TAZCommonStatistics
Definition: GNETAZFrame.h:154
GNETAZFrame::getTAZCurrentModul
TAZCurrent * getTAZCurrentModul() const
get Current TAZ modul
Definition: GNETAZFrame.cpp:1452
GUIDesignTextFieldNCol
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition: GUIDesigns.h:42
GNENet::generateAdditionalID
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
Definition: GNENet.cpp:2306
GNETAZFrame::TAZSaveChanges::~TAZSaveChanges
~TAZSaveChanges()
destructor
Definition: GNETAZFrame.cpp:406
WRITE_WARNING
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:275
GNETAZFrame::TAZSaveChanges::onCmdCancelChanges
long onCmdCancelChanges(FXObject *, FXSelector, void *)
Called when the user press the button cancel changes.
Definition: GNETAZFrame.cpp:458
GNETAZFrame::TAZEdgesGraphic::showTAZEdgesGraphicModul
void showTAZEdgesGraphicModul()
show TAZ Edges Graphic Modul
Definition: GNETAZFrame.cpp:1228
GNETAZFrame::myDrawingShape
GNEFrameModuls::DrawingShape * myDrawingShape
Drawing shape.
Definition: GNETAZFrame.h:564
GUIDesignLabelAttribute
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
Definition: GUIDesigns.h:170
GNE_ATTR_AVERAGE_SINK
average sink (used only by TAZs)
Definition: SUMOXMLDefinitions.h:1001
GNETAZFrame::TAZSaveChanges::TAZSaveChanges
TAZSaveChanges(GNETAZFrame *TAZFrameParent)
FOX-declaration.
Definition: GNETAZFrame.cpp:394
GNETAZFrame::TAZParameters::myAddEdgesWithinCheckButton
FXCheckButton * myAddEdgesWithinCheckButton
CheckButton to enable or disable use edges within TAZ after creation.
Definition: GNETAZFrame.h:438
GNETAZFrame::TAZSelectionStatistics::myTextFieldTAZSourceWeight
FXTextField * myTextFieldTAZSourceWeight
textField for TAZ Source weight
Definition: GNETAZFrame.h:367
GNETAZFrame::myNeteditAttributes
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
Definition: GNETAZFrame.h:561
GNETAZFrame::TAZCurrent::getNetEdges
const std::vector< GNEEdge * > & getNetEdges() const
get current net edges
Definition: GNETAZFrame.cpp:233
GNETAZFrame::TAZSelectionStatistics
Definition: GNETAZFrame.h:312
GNETAZFrame::TAZCurrent::refreshTAZEdges
void refreshTAZEdges()
refresh TAZEdges
Definition: GNETAZFrame.cpp:251
GNETAZFrame::TAZEdgesGraphic::hideTAZEdgesGraphicModul
void hideTAZEdgesGraphicModul()
hide TAZ Edges Graphic Modul
Definition: GNETAZFrame.cpp:1236
GNETAZFrame::myTAZSaveChanges
TAZSaveChanges * myTAZSaveChanges
save TAZ Edges
Definition: GNETAZFrame.h:567
GNETAZFrame::TAZParameters::myHelpTAZAttribute
FXButton * myHelpTAZAttribute
button for help
Definition: GNETAZFrame.h:441
GNETAZFrame::TAZCurrent::myTAZCurrentLabel
FXLabel * myTAZCurrentLabel
Label for current TAZ.
Definition: GNETAZFrame.h:135
GNETAZFrame::TAZEdgesGraphic::updateEdgeColors
void updateEdgeColors()
update edge colors;
Definition: GNETAZFrame.cpp:1248
GNETAZFrame::TAZChildDefaultParameters::getToggleMembership
bool getToggleMembership() const
check if toggle membership is enabled
Definition: GNETAZFrame.cpp:609
GNETAZFrame::TAZCurrent::isTAZEdge
bool isTAZEdge(GNEEdge *edge) const
check if given edge belongs to current TAZ
Definition: GNETAZFrame.cpp:220
GNETAZFrame::TAZParameters::hideTAZParametersModul
void hideTAZParametersModul()
hide TAZ parameters
Definition: GNETAZFrame.cpp:1102
GNETAZFrame::TAZSelectionStatistics::myTextFieldTAZSinkWeight
FXTextField * myTextFieldTAZSinkWeight
textField for TAZ Sink weight
Definition: GNETAZFrame.h:373
GNEFrameAttributesModuls::NeteditAttributes
Definition: GNEFrameAttributesModuls.h:714
GNE_ATTR_MIN_SINK
min sink (used only by TAZs)
Definition: SUMOXMLDefinitions.h:993
GNETAZFrame::processClick
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet
Definition: GNETAZFrame.cpp:1360
GNEFrameModuls::DrawingShape::addNewPoint
void addNewPoint(const Position &P)
add new point to temporal shape
Definition: GNEFrameModuls.cpp:1656
GNETAZFrame::TAZChildDefaultParameters
Definition: GNETAZFrame.h:235
GNETAZFrame::TAZSelectionStatistics::getEdgeAndTAZChildrenSelected
const std::vector< TAZCurrent::TAZEdge > & getEdgeAndTAZChildrenSelected() const
get map with edge and TAZChildren
Definition: GNETAZFrame.cpp:893
GNETAZFrame::TAZSaveChanges::hideTAZSaveChangesModul
void hideTAZSaveChangesModul()
hide TAZ Save Changes Modul
Definition: GNETAZFrame.cpp:416
ICON_SAVE
Definition: GUIIcons.h:48
SUMO_TAG_TAZSOURCE
a source within a district (connection road)
Definition: SUMOXMLDefinitions.h:135
GNEChange_Additional
Definition: GNEChange_Additional.h:44
GNETAZFrame::TAZSelectionStatistics::clearSelectedEdges
void clearSelectedEdges()
clear current TAZ children
Definition: GNETAZFrame.cpp:880
GNETAZFrame::TAZSaveChanges::myCancelChangesButton
FXButton * myCancelChangesButton
@field FXButton for cancel changes in TAZEdges
Definition: GNETAZFrame.h:228
GNETAZFrame::TAZCurrent::setTAZ
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
Definition: GNETAZFrame.cpp:157
GNETAZFrame::TAZCurrent::~TAZCurrent
~TAZCurrent()
destructor
Definition: GNETAZFrame.cpp:153
GNETAZFrame::GNETAZFrame
GNETAZFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNETAZFrame.cpp:1313
SUMO_ATTR_EDGE
Definition: SUMOXMLDefinitions.h:423
GNETAZFrame
Definition: GNETAZFrame.h:40
GNEFrame
Definition: GNEFrame.h:34
GNETAZFrame::TAZChildDefaultParameters::showTAZChildDefaultParametersModul
void showTAZChildDefaultParametersModul()
show TAZ child default parameters Modul
Definition: GNETAZFrame.cpp:515
SUMO_ATTR_COLOR
A color information.
Definition: SUMOXMLDefinitions.h:704
GNEViewNetHelper::ObjectsUnderCursor::getTAZFront
GNETAZ * getTAZFront() const
get front TAZ (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:308
GNEViewNet
Definition: GNEViewNet.h:42
GNETAZFrame::myTAZCurrent
TAZCurrent * myTAZCurrent
current TAZ
Definition: GNETAZFrame.h:552
GNEViewNetHelper::ObjectsUnderCursor::getEdgeFront
GNEEdge * getEdgeFront() const
get front edge (or a pointer to nullptr if there isn't)
Definition: GNEViewNetHelper.cpp:268
SUMO_ATTR_ID
Definition: SUMOXMLDefinitions.h:378
GNETAZFrame::TAZCurrent::getTAZ
GNETAZ * getTAZ() const
get current TAZ
Definition: GNETAZFrame.cpp:214
GNETAZFrame::TAZParameters::showTAZParametersModul
void showTAZParametersModul()
show TAZ parameters and set the default value of parameters
Definition: GNETAZFrame.cpp:1096
GNETAZFrame::getTAZSaveChangesModul
TAZSaveChanges * getTAZSaveChangesModul() const
get TAZ Save Changes modul
Definition: GNETAZFrame.cpp:1464
GUIDesigns.h
GNETAZFrame::TAZCurrent::TAZCurrent
TAZCurrent(GNETAZFrame *TAZFrameParent)
constructor
Definition: GNETAZFrame.cpp:140
GNETAZFrame::TAZChildDefaultParameters::myToggleMembership
FXCheckButton * myToggleMembership
CheckButton to enable or disable Toggle edge Membership.
Definition: GNETAZFrame.h:281
MID_CANCEL
Cancel-button pressed.
Definition: GUIAppEnum.h:230
GUIDesignTextField
#define GUIDesignTextField
Definition: GUIDesigns.h:33
MID_GNE_SET_ATTRIBUTE
attribute edited
Definition: GUIAppEnum.h:646
PositionVector
A list of positions.
Definition: PositionVector.h:45
GNETAZFrame::TAZCurrent
Definition: GNETAZFrame.h:47
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GNETAZFrame::TAZChildDefaultParameters::onCmdUseSelectedEdges
long onCmdUseSelectedEdges(FXObject *obj, FXSelector, void *)
Called when the user press use selected edges.
Definition: GNETAZFrame.cpp:704
GNETAZFrame::myTAZChildDefaultParameters
TAZChildDefaultParameters * myTAZChildDefaultParameters
TAZ child defaults parameters.
Definition: GNETAZFrame.h:570
GNETAZFrame::TAZCurrent::myEditedTAZ
GNETAZ * myEditedTAZ
current edited TAZ
Definition: GNETAZFrame.h:123
GNEFrameModuls::DrawingShape::removeLastPoint
void removeLastPoint()
remove last added point
Definition: GNEFrameModuls.cpp:1666
GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters
TAZChildDefaultParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
Definition: GNETAZFrame.cpp:478
GNEFrameModuls::DrawingShape::getDeleteLastCreatedPoint
bool getDeleteLastCreatedPoint()
get flag delete last created point
Definition: GNEFrameModuls.cpp:1690
GNETAZFrame::TAZEdgesGraphic::myColorBySourcePlusSinkWeight
FXRadioButton * myColorBySourcePlusSinkWeight
add radio button "color source + sink"
Definition: GNETAZFrame.h:488
GNEFrame::myContentFrame
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
Definition: GNEFrame.h:124
GNETAZFrame::TAZEdgesGraphic::myColorBySourceMinusSinkWeight
FXRadioButton * myColorBySourceMinusSinkWeight
add radio button "color source - Sink"
Definition: GNETAZFrame.h:491
GNETAZFrame::TAZSelectionStatistics::myTAZSinkFrame
FXHorizontalFrame * myTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
Definition: GNETAZFrame.h:370
PositionVector::getBoxBoundary
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Definition: PositionVector.cpp:390
GNETAZFrame::TAZCurrent::TAZEdge::edge
GNEEdge * edge
TAZ edge.
Definition: GNETAZFrame.h:62
GNETAZFrame::myTAZSelectionStatistics
TAZSelectionStatistics * myTAZSelectionStatistics
TAZ Edges selection parameters.
Definition: GNETAZFrame.h:573
GUIDesignButton
#define GUIDesignButton
Definition: GUIDesigns.h:50
GNEAttributeCarrier::TagProperties::getTag
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
Definition: GNEAttributeCarrier.cpp:523
GNETAZFrame::TAZSaveChanges::enableButtonsAndBeginUndoList
void enableButtonsAndBeginUndoList()
enable buttons save and cancel changes (And begin Undo List)
Definition: GNETAZFrame.cpp:424
MFXUtils::getRGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:107
SUMO_ATTR_WEIGHT
Definition: SUMOXMLDefinitions.h:421
GNETAZFrame::TAZCommonStatistics::showTAZCommonStatisticsModul
void showTAZCommonStatisticsModul()
show TAZ Common Statistics Modul
Definition: GNETAZFrame.cpp:356
GNETAZFrame::TAZSelectionStatistics::myStatisticsLabel
FXLabel * myStatisticsLabel
Statistics labels.
Definition: GNETAZFrame.h:376
GNEAdditional::myViewNet
GNEViewNet * myViewNet
The GNEViewNet this additional element belongs.
Definition: GNEAdditional.h:335
GUIAppEnum.h
GNE_ATTR_MAX_SOURCE
max source (used only by TAZs)
Definition: SUMOXMLDefinitions.h:995
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
FXDEFMAP
FXDEFMAP(GNETAZFrame::TAZParameters) TAZParametersMap[]
GNETAZFrame::TAZSelectionStatistics::myTAZSourceFrame
FXHorizontalFrame * myTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
Definition: GNETAZFrame.h:364
GNEChange_Additional.h
GNETAZFrame::TAZSelectionStatistics::~TAZSelectionStatistics
~TAZSelectionStatistics()
destructor
Definition: GNETAZFrame.cpp:803
GNETAZFrame::TAZCurrent::myTAZFrameParent
GNETAZFrame * myTAZFrameParent
pointer to TAZ Frame
Definition: GNETAZFrame.h:120
GUIDesignButtonRectangular
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons)
Definition: GUIDesigns.h:56
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
MID_HELP
help button
Definition: GUIAppEnum.h:553
GNETAZFrame::TAZChildDefaultParameters::myUseSelectedEdges
FXButton * myUseSelectedEdges
button for use selected edges
Definition: GNETAZFrame.h:296
GNEViewNet::getNet
GNENet * getNet() const
get the net object
Definition: GNEViewNet.cpp:1014
GNE_ATTR_MIN_SOURCE
min source (used only by TAZs)
Definition: SUMOXMLDefinitions.h:991
GNEAdditionalHandler::buildAdditional
static bool buildAdditional(GNEViewNet *viewNet, bool allowUndoRedo, SumoXMLTag tag, const SUMOSAXAttributes &attrs, HierarchyInsertedAdditionals *insertedAdditionals)
Build additionals.
Definition: GNEAdditionalHandler.cpp:168
GNETAZFrame::TAZEdgesGraphic::myColorBySourceWeight
FXRadioButton * myColorBySourceWeight
add radio button "color by source"
Definition: GNETAZFrame.h:482
GNETAZFrame::TAZParameters::onCmdSetColorAttribute
long onCmdSetColorAttribute(FXObject *, FXSelector, void *)
Definition: GNETAZFrame.cpp:1129
RGBColor
Definition: RGBColor.h:39
GNETAZSourceSink::getAttribute
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
Definition: GNETAZSourceSink.cpp:104
GNETAZFrame::TAZParameters::myTextFieldColor
FXTextField * myTextFieldColor
textField to modify the default value of color parameter
Definition: GNETAZFrame.h:435
GNETAZFrame::TAZEdgesGraphic::onCmdChoosenBy
long onCmdChoosenBy(FXObject *obj, FXSelector, void *)
Definition: GNETAZFrame.cpp:1285
GNETAZ.h
GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics
TAZCommonStatistics(GNETAZFrame *TAZFrameParent)
constructor
Definition: GNETAZFrame.cpp:344
GNETAZFrame::TAZChildDefaultParameters::onCmdSetDefaultValues
long onCmdSetDefaultValues(FXObject *obj, FXSelector, void *)
Definition: GNETAZFrame.cpp:615
GNEAttributeCarrier::getTagProperty
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
Definition: GNEAttributeCarrier.cpp:1273
GNETAZFrame::TAZParameters::isCurrentParametersValid
bool isCurrentParametersValid() const
check if current parameters are valid
Definition: GNETAZFrame.cpp:1108
GNETAZFrame::TAZParameters::myColorEditor
FXButton * myColorEditor
Button for open color editor.
Definition: GNETAZFrame.h:432
GNETAZFrame::TAZCurrent::myMaxSourceMinusSinkWeight
double myMaxSourceMinusSinkWeight
maximum source minus sink value of current TAZ Edges
Definition: GNETAZFrame.h:144
GNETAZFrame::TAZCommonStatistics::updateStatistics
void updateStatistics()
update Statistics label
Definition: GNETAZFrame.cpp:370
SUMOSAXAttributesImpl_Cached
Encapsulated Xerces-SAX-attributes.
Definition: SUMOSAXAttributesImpl_Cached.h:43
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:148
GNETAZFrame::TAZEdgesGraphic::myScaleColors
std::vector< RGBColor > myScaleColors
vector wit the scale colors
Definition: GNETAZFrame.h:494
GNETAZFrame::myTAZParameters
TAZParameters * myTAZParameters
TAZ parameters.
Definition: GNETAZFrame.h:558
GNETAZFrame::TAZChildDefaultParameters::~TAZChildDefaultParameters
~TAZChildDefaultParameters()
destructor
Definition: GNETAZFrame.cpp:511
GNETAZFrame::TAZEdgesGraphic::~TAZEdgesGraphic
~TAZEdgesGraphic()
destructor
Definition: GNETAZFrame.cpp:1224
PositionVector::closePolygon
void closePolygon()
ensures that the last position equals the first
Definition: PositionVector.cpp:1231
MID_OK
Ok-button pressed.
Definition: GUIAppEnum.h:228
GNEViewNet.h
RGBColor::parseColor
static RGBColor parseColor(std::string coldef)
Parses a color information.
Definition: RGBColor.cpp:176
GNEAdditionalHandler.h
GNETAZFrame::shapeDrawed
bool shapeDrawed()
build a shaped element using the drawed shape return true if was sucesfully created
Definition: GNETAZFrame.cpp:1470
GNETAZFrame::TAZParameters
Definition: GNETAZFrame.h:386
GNETAZFrame::TAZSaveChanges::onCmdSaveChanges
long onCmdSaveChanges(FXObject *, FXSelector, void *)
Definition: GNETAZFrame.cpp:444
GNETAZFrame::TAZEdgesGraphic::myEdgeSelectedColor
RGBColor myEdgeSelectedColor
RGBColor color for selected egdes.
Definition: GNETAZFrame.h:500
SUMO_ATTR_EDGES
the edges of a route
Definition: SUMOXMLDefinitions.h:427
GNE_ATTR_AVERAGE_SOURCE
average source (used only by TAZs)
Definition: SUMOXMLDefinitions.h:999
GNETAZFrame::TAZSaveChanges::isChangesPending
bool isChangesPending() const
return true if there is changes to save
Definition: GNETAZFrame.cpp:437
GNETAZFrame::TAZCommonStatistics::myStatisticsLabel
FXLabel * myStatisticsLabel
Statistics labels.
Definition: GNETAZFrame.h:178
GNETAZFrame::TAZSelectionStatistics::onCmdSelectEdges
long onCmdSelectEdges(FXObject *obj, FXSelector, void *)
Called when the user press select edges.
Definition: GNETAZFrame.cpp:954
SUMO_TAG_EDGE
begin/end of the description of an edge
Definition: SUMOXMLDefinitions.h:47
GUIDesignLabelLeft
#define GUIDesignLabelLeft
Definition: GUIDesigns.h:149
GNEFrameModuls::DrawingShape
Definition: GNEFrameModuls.h:393
ProcessError
Definition: UtilExceptions.h:39
GNETAZFrame::TAZChildDefaultParameters::hideTAZChildDefaultParametersModul
void hideTAZChildDefaultParametersModul()
hide TAZ child default parameters Modul
Definition: GNETAZFrame.cpp:530
GUIDesignCheckButton
#define GUIDesignCheckButton
checkButton placed in left position
Definition: GUIDesigns.h:115
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GNEEdge.h
GNETAZFrame::TAZChildDefaultParameters::myDefaultTAZSourceFrame
FXHorizontalFrame * myDefaultTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
Definition: GNETAZFrame.h:284
GNEFrame::myViewNet
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:121
GNEViewNet::getUndoList
GNEUndoList * getUndoList() const
get the undoList object
Definition: GNEViewNet.cpp:1020
GNEFrame::getPredefinedTagsMML
const std::map< int, std::string > & getPredefinedTagsMML() const
get predefinedTagsMML
Definition: GNEFrame.cpp:281
GNETAZ
Definition: GNETAZ.h:34
GNETAZFrame::TAZSelectionStatistics::hideTAZSelectionStatisticsModul
void hideTAZSelectionStatisticsModul()
hide TAZ Selection Statistics Modul
Definition: GNETAZFrame.cpp:815
GUIDesignGroupBoxFrame
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
Definition: GUIDesigns.h:239
GNE_ATTR_MAX_SINK
max sink (used only by TAZs)
Definition: SUMOXMLDefinitions.h:997
GNETAZFrame::TAZCurrent::TAZEdge::updateColors
void updateColors()
update colors
Definition: GNETAZFrame.cpp:98
GNETAZFrame.h
GNETAZFrame::TAZParameters::isAddEdgesWithinEnabled
bool isAddEdgesWithinEnabled() const
check if edges within has to be used after TAZ Creation
Definition: GNETAZFrame.cpp:1114
GNETAZFrame::getTAZSelectionStatisticsModul
TAZSelectionStatistics * getTAZSelectionStatisticsModul() const
get TAZ Selection Statistics modul
Definition: GNETAZFrame.cpp:1458
GNETAZFrame::TAZParameters::onCmdHelp
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
Definition: GNETAZFrame.cpp:1171
GNELane.h
GNEFrameAttributesModuls::NeteditAttributes::getNeteditAttributesAndValues
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, const GNELane *lane) const
fill valuesMap with netedit attributes
Definition: GNEFrameAttributesModuls.cpp:2594
GNETAZFrame::TAZChildDefaultParameters::myDefaultTAZSinkFrame
FXHorizontalFrame * myDefaultTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
Definition: GNETAZFrame.h:290
GNETAZFrame::TAZCommonStatistics::~TAZCommonStatistics
~TAZCommonStatistics()
destructor
Definition: GNETAZFrame.cpp:352
GNETAZFrame::TAZSelectionStatistics::showTAZSelectionStatisticsModul
void showTAZSelectionStatisticsModul()
show TAZ Selection Statistics Modul
Definition: GNETAZFrame.cpp:807
GUIDesignLabelCenterThick
#define GUIDesignLabelCenterThick
label extended over frame with thick and with text justify to center and height of 23
Definition: GUIDesigns.h:167
GUIDesignLabelCenter
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center and height of 23
Definition: GUIDesigns.h:155
GNETAZFrame::TAZCurrent::TAZEdge::~TAZEdge
~TAZEdge()
destructor (needed because RGBColors has to be deleted)
Definition: GNETAZFrame.cpp:94
GNETAZFrame::TAZChildDefaultParameters::myTextFieldDefaultValueTAZSources
FXTextField * myTextFieldDefaultValueTAZSources
textField to set a default value for TAZ Sources
Definition: GNETAZFrame.h:287
SUMO_TAG_TAZ
a traffic assignment zone
Definition: SUMOXMLDefinitions.h:133
GNETAZFrame::TAZParameters::~TAZParameters
~TAZParameters()
destructor
Definition: GNETAZFrame.cpp:1092
GNETAZFrame::hide
void hide()
hide TAZ frame
Definition: GNETAZFrame.cpp:1353
GNETAZFrame::TAZCurrent::myMinSourcePlusSinkWeight
double myMinSourcePlusSinkWeight
minimum source plus sink value of current TAZ Edges
Definition: GNETAZFrame.h:141
GNETAZFrame::TAZSelectionStatistics::isEdgeSelected
bool isEdgeSelected(GNEEdge *edge)
check if an edge is selected
Definition: GNETAZFrame.cpp:867
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
SUMO_TAG_TAZSINK
a sink within a district (connection road)
Definition: SUMOXMLDefinitions.h:137
GNETAZFrame::TAZEdgesGraphic::myColorBySinkWeight
FXRadioButton * myColorBySinkWeight
add radio button "color by sink"
Definition: GNETAZFrame.h:485
GNEViewNet::getAttributeCarriersInBoundary
std::set< std::pair< std::string, GNEAttributeCarrier * > > getAttributeCarriersInBoundary(const Boundary &boundary, bool forceSelectEdges=false)
get AttributeCarriers in Boundary
Definition: GNEViewNet.cpp:306
GNETAZFrame::TAZCurrent::TAZEdge
struct for edges and the source/sink colors
Definition: GNETAZFrame.h:51
GNETAZFrame::myTAZEdgesGraphic
TAZEdgesGraphic * myTAZEdgesGraphic
TAZ Edges Graphic.
Definition: GNETAZFrame.h:576
GNENetElement::getNet
GNENet * getNet() const
get Net in which this element is placed
Definition: GNENetElement.cpp:58
MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trought dialog
Definition: GUIAppEnum.h:672
GNETAZFrame::myTAZCommonStatistics
TAZCommonStatistics * myTAZCommonStatistics
TAZ Edges common parameters.
Definition: GNETAZFrame.h:555
GUIDesignRadioButton
#define GUIDesignRadioButton
Definition: GUIDesigns.h:139
ICON_CANCEL
Definition: GUIIcons.h:387
GNETAZFrame::~GNETAZFrame
~GNETAZFrame()
Destructor.
Definition: GNETAZFrame.cpp:1348
GNETAZFrame::TAZChildDefaultParameters::getDefaultTAZSourceWeight
double getDefaultTAZSourceWeight() const
get default TAZSource weight
Definition: GNETAZFrame.cpp:597
GNETAZFrame::getDrawingShapeModul
GNEFrameModuls::DrawingShape * getDrawingShapeModul() const
get drawing mode modul
Definition: GNETAZFrame.cpp:1446
GNETAZSourceSink.h
GNENet::retrieveEdges
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
Definition: GNENet.cpp:1200
GNETAZFrame::TAZCurrent::addTAZChild
void addTAZChild(GNETAZSourceSink *additional)
add TAZChild
Definition: GNETAZFrame.cpp:276
GNETAZFrame::processEdgeSelection
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
Definition: GNETAZFrame.cpp:1414
SUMOSAXAttributesImpl_Cached.h
GNETAZFrame::TAZChildDefaultParameters::myInformationLabel
FXLabel * myInformationLabel
information label
Definition: GNETAZFrame.h:299
joinToString
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition: ToString.h:246
GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics
TAZSelectionStatistics(GNETAZFrame *TAZFrameParent)
FOX-declaration.
Definition: GNETAZFrame.cpp:785
GNE_ATTR_TAZCOLOR
Color of TAZSources/TAZSinks.
Definition: SUMOXMLDefinitions.h:1003
GNENet::retrieveEdge
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
Definition: GNENet.cpp:1069
GNETAZFrame::TAZSaveChanges
Definition: GNETAZFrame.h:185
GNETAZFrame::TAZChildDefaultParameters::updateSelectEdgesButton
void updateSelectEdgesButton()
update "select edges button"
Definition: GNETAZFrame.cpp:539
GNEFrameModuls::DrawingShape::isDrawing
bool isDrawing() const
return true if currently a shape is drawed
Definition: GNEFrameModuls.cpp:1678
GNETAZFrame::TAZSelectionStatistics::updateStatistics
void updateStatistics()
update TAZSelectionStatistics
Definition: GNETAZFrame.cpp:985
MID_GNE_SELECT
select element
Definition: GUIAppEnum.h:660
GNETAZFrame::TAZSaveChanges::showTAZSaveChangesModul
void showTAZSaveChangesModul()
show TAZ Save Changes Modul
Definition: GNETAZFrame.cpp:410
config.h
GNEAttributeCarrier::getTagProperties
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
Definition: GNEAttributeCarrier.cpp:1298
GNETAZFrame::TAZSelectionStatistics::selectEdge
bool selectEdge(const TAZCurrent::TAZEdge &edge)
add an edge and their TAZ Children in the list of selected items
Definition: GNETAZFrame.cpp:823
GNETAZFrame::TAZParameters::onCmdSetAttribute
long onCmdSetAttribute(FXObject *, FXSelector, void *)
Called when user set a value.
Definition: GNETAZFrame.cpp:1149
GNETAZFrame::TAZCommonStatistics::hideTAZCommonStatisticsModul
void hideTAZCommonStatisticsModul()
hide TAZ Common Statistics Modul
Definition: GNETAZFrame.cpp:364
GNETAZFrame::TAZParameters::getAttributesAndValues
std::map< SumoXMLAttr, std::string > getAttributesAndValues() const
get a map with attributes and their values
Definition: GNETAZFrame.cpp:1120
GNE_ATTR_SELECTED
element is selected
Definition: SUMOXMLDefinitions.h:971
GNETAZSourceSink::getDepartWeight
double getDepartWeight() const
get depart weight
Definition: GNETAZSourceSink.cpp:50
MFXUtils::getFXColor
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:113
GNETAZFrame::TAZCurrent::getTAZEdges
const std::vector< TAZCurrent::TAZEdge > & getTAZEdges() const
get TAZEdges
Definition: GNETAZFrame.cpp:245
GNETAZFrame::TAZSaveChanges::mySaveChangesButton
FXButton * mySaveChangesButton
@field FXButton for save changes in TAZEdges
Definition: GNETAZFrame.h:225
GUIDesignButtonAttribute
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
Definition: GUIDesigns.h:53
GNETAZFrame::TAZCurrent::myMaxSourcePlusSinkWeight
double myMaxSourcePlusSinkWeight
maximum source plus sink value of current TAZ Edges
Definition: GNETAZFrame.h:138
GNETAZFrame::TAZEdgesGraphic
Definition: GNETAZFrame.h:448
GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic
TAZEdgesGraphic(GNETAZFrame *TAZFrameParent)
FOX-declaration.
Definition: GNETAZFrame.cpp:1180
GNETAZFrame::addOrRemoveTAZMember
bool addOrRemoveTAZMember(GNEEdge *edge)
add or remove a TAZSource and a TAZSink, or remove it if edge is in the list of TAZ Children
Definition: GNETAZFrame.cpp:1515
GNEFrame::show
virtual void show()
show Frame
Definition: GNEFrame.cpp:107
SUMO_ATTR_SHAPE
edge: the shape in xml-definition
Definition: SUMOXMLDefinitions.h:690
GNETAZFrame::TAZCurrent::getSelectedEdges
const std::vector< GNEEdge * > & getSelectedEdges() const
get current selected edges
Definition: GNETAZFrame.cpp:239
GNETAZFrame::TAZSelectionStatistics::unselectEdge
bool unselectEdge(GNEEdge *edge)
un select an edge (and their TAZ Children)
Definition: GNETAZFrame.cpp:843
GNETAZFrame::TAZChildDefaultParameters::getDefaultTAZSinkWeight
double getDefaultTAZSinkWeight() const
default TAZSink weight
Definition: GNETAZFrame.cpp:603
GNETAZFrame::TAZEdgesGraphic::myEdgeDefaultColor
RGBColor myEdgeDefaultColor
default RGBColor for all edges
Definition: GNETAZFrame.h:497
GNETAZFrame::TAZParameters::TAZParameters
TAZParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
Definition: GNETAZFrame.cpp:1074
GNEFrame::hide
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:116
GNENet.h
GNEFrameModuls::DrawingShape::getTemporalShape
const PositionVector & getTemporalShape() const
get Temporal shape
Definition: GNEFrameModuls.cpp:1672
RGBColor::WHITE
static const RGBColor WHITE
Definition: RGBColor.h:196
GNEUndoList.h
MID_CHOOSEN_OPERATION
set type of selection
Definition: GUIAppEnum.h:510
GNETAZSourceSink
Definition: GNETAZSourceSink.h:40
GNETAZFrame::dropTAZMembers
void dropTAZMembers()
drop all TAZSources and TAZ Sinks of current TAZ
Definition: GNETAZFrame.cpp:1553
GNETAZFrame::TAZCurrent::myMinSourceMinusSinkWeight
double myMinSourceMinusSinkWeight
minimum source minus sink value of current TAZ Edges
Definition: GNETAZFrame.h:147