90 sourcePlusSinkColor(0),
91 sourceMinusSinkColor(0),
92 myCurrentTAZParent(CurrentTAZParent) {
101 sourceColor = GNEAttributeCarrier::parse<int>(source->getAttribute(
GNE_ATTR_TAZCOLOR));
102 sinkColor = GNEAttributeCarrier::parse<int>(sink->getAttribute(
GNE_ATTR_TAZCOLOR));
104 double sourcePlusSinkWeight = source->getDepartWeight() + sink->getDepartWeight();
106 if ((myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) == 0) {
107 sourcePlusSinkColor = 0;
110 double percentage = (sourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight) /
111 (myCurrentTAZParent->myMaxSourcePlusSinkWeight - myCurrentTAZParent->myMinSourcePlusSinkWeight);
113 if (percentage >= 1) {
114 sourcePlusSinkColor = 9;
115 }
else if (percentage < 0) {
116 sourcePlusSinkColor = 0;
118 sourcePlusSinkColor = (int)(percentage * 10);
122 double sourceMinusSinkWeight = source->getDepartWeight() - sink->getDepartWeight();
124 if ((myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) == 0) {
125 sourceMinusSinkColor = 0;
128 double percentage = (sourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight) /
129 (myCurrentTAZParent->myMaxSourceMinusSinkWeight - myCurrentTAZParent->myMinSourceMinusSinkWeight);
131 if (percentage >= 1) {
132 sourceMinusSinkColor = 9;
133 }
else if (percentage < 0) {
134 sourceMinusSinkColor = 0;
136 sourceMinusSinkColor = (int)(percentage * 10);
148 sourcePlusSinkColor(0),
149 sourceMinusSinkColor(0),
150 myCurrentTAZParent(nullptr) {
173 myEditedTAZ = editedTAZ;
175 if (myEditedTAZ !=
nullptr) {
176 myCurrentTAZLabel->setText((
TL(
"Current TAZ: ") + myEditedTAZ->getID()).c_str());
182 myTAZFrameParent->myTAZParameters->hideTAZParametersModule();
184 myTAZFrameParent->myDrawingShape->hideDrawingShape();
186 myTAZFrameParent->myTAZCommonStatistics->showTAZCommonStatisticsModule();
188 myTAZFrameParent->myTAZSaveChanges->showTAZSaveChangesModule();
190 myTAZFrameParent->myTAZChildDefaultParameters->extendTAZChildDefaultParameters();
192 myTAZFrameParent->myTAZEdgesGraphic->showTAZEdgesGraphicModule();
195 myTAZFrameParent->myTAZParameters->showTAZParametersModule();
197 myTAZFrameParent->myDrawingShape->showDrawingShape();
199 myTAZFrameParent->myTAZCommonStatistics->hideTAZCommonStatisticsModule();
201 myTAZFrameParent->myTAZChildDefaultParameters->collapseTAZChildDefaultParameters();
203 myTAZFrameParent->myTAZEdgesGraphic->hideTAZEdgesGraphicModule();
205 myTAZFrameParent->myTAZSaveChanges->hideTAZSaveChangesModule();
207 myCurrentTAZLabel->setText(
TL(
"No TAZ selected"));
209 mySelectedEdges.clear();
211 myMaxSourcePlusSinkWeight = 0;
212 myMinSourcePlusSinkWeight = -1;
213 myMaxSourceMinusSinkWeight = 0;
214 myMinSourceMinusSinkWeight = -1;
238const std::vector<GNEEdge*>&
240 return mySelectedEdges;
244const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
246 return myTAZEdgeColors;
253 myTAZEdgeColors.clear();
255 myMaxSourcePlusSinkWeight = 0;
256 myMinSourcePlusSinkWeight = -1;
257 myMaxSourceMinusSinkWeight = 0;
258 myMinSourceMinusSinkWeight = -1;
263 myTAZFrameParent->myTAZCommonStatistics->updateStatistics();
265 for (
const auto& TAZElement : myEditedTAZ->getChildAdditionals()) {
273 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
284 bool createTAZEdge =
true;
287 createTAZEdge =
false;
299 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge, sourceSink,
nullptr));
301 myTAZEdgeColors.push_back(
TAZEdgeColor(
this, edge,
nullptr, sourceSink));
305 myMaxSourcePlusSinkWeight = 0;
306 myMinSourcePlusSinkWeight = -1;
307 myMaxSourceMinusSinkWeight = 0;
308 myMinSourceMinusSinkWeight = -1;
315 if (sourcePlusSink > myMaxSourcePlusSinkWeight) {
316 myMaxSourcePlusSinkWeight = sourcePlusSink;
319 if ((myMinSourcePlusSinkWeight == -1) || (sourcePlusSink < myMinSourcePlusSinkWeight)) {
320 myMinSourcePlusSinkWeight = sourcePlusSink;
325 if (sourceMinusSink < 0) {
326 sourceMinusSink *= -1;
329 if (sourceMinusSink > myMaxSourceMinusSinkWeight) {
330 myMaxSourceMinusSinkWeight = sourceMinusSink;
333 if ((myMinSourceMinusSinkWeight == -1) || (sourceMinusSink < myMinSourceMinusSinkWeight)) {
334 myMinSourceMinusSinkWeight = sourceMinusSink;
349 myTAZFrameParent(TAZFrameParent) {
374 if (myTAZFrameParent->myCurrentTAZ->getTAZ()) {
376 std::ostringstream information;
378 <<
TL(
"- Number of edges: ") <<
toString(myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals().size() / 2) <<
"\n"
379 <<
TL(
"- Min source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SOURCE) <<
"\n"
380 <<
TL(
"- Max source: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SOURCE) <<
"\n"
383 <<
TL(
"- Min sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MIN_SINK) <<
"\n"
384 <<
TL(
"- Max sink: ") << myTAZFrameParent->myCurrentTAZ->getTAZ()->getAttribute(
GNE_ATTR_MAX_SINK) <<
"\n"
387 myStatisticsLabel->setText(information.str().c_str());
389 myStatisticsLabel->setText(
TL(
"No TAZ Selected"));
399 myTAZFrameParent(TAZFrameParent) {
421 onCmdCancelChanges(0, 0, 0);
429 if (!mySaveChangesButton->isEnabled()) {
431 mySaveChangesButton->enable();
432 myCancelChangesButton->enable();
434 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
TL(
"TAZ changes"));
442 return myTAZFrameParent->shown() && mySaveChangesButton->isEnabled();
449 if (mySaveChangesButton->isEnabled()) {
451 mySaveChangesButton->disable();
452 myCancelChangesButton->disable();
454 myTAZFrameParent->myViewNet->getUndoList()->end();
456 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
458 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
468 if (mySaveChangesButton->isEnabled()) {
470 mySaveChangesButton->disable();
471 myCancelChangesButton->disable();
473 myTAZFrameParent->myViewNet->getUndoList()->abortAllChangeGroups();
475 myTAZFrameParent->myCurrentTAZ->refreshTAZEdges();
477 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
488 myTAZFrameParent(TAZFrameParent),
489 myDefaultTAZSourceWeight(1),
490 myDefaultTAZSinkWeight(1) {
512 std::ostringstream information;
514 << std::string(
"- ") <<
TL(
"Toggle Membership:") <<
"\n"
515 << std::string(
" ") <<
TL(
"Create new Sources/Sinks with given weights.");
528 if (myToggleMembership->getCheck() == FALSE) {
529 myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModule();
531 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
534 updateSelectEdgesButton();
536 myToggleMembershipFrame->show();
537 myDefaultTAZSourceFrame->show();
538 myDefaultTAZSinkFrame->show();
539 myUseSelectedEdges->show();
540 myInformationLabel->show();
547 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
549 myToggleMembershipFrame->hide();
550 myDefaultTAZSourceFrame->hide();
551 myDefaultTAZSinkFrame->hide();
552 myUseSelectedEdges->hide();
553 myInformationLabel->hide();
559 if (myToggleMembership->getCheck() == TRUE) {
561 if (myTAZFrameParent->myCurrentTAZ->getSelectedEdges().size() > 0) {
562 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
563 myUseSelectedEdges->enable();
564 }
else if (myTAZFrameParent->myCurrentTAZ->getTAZEdges().size() > 0) {
565 myUseSelectedEdges->setText(
TL(
"Remove all edges"));
566 myUseSelectedEdges->enable();
568 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
569 myUseSelectedEdges->disable();
571 }
else if (myTAZFrameParent->getCurrentTAZModule()->getTAZEdges().size() > 0) {
573 myUseSelectedEdges->enable();
575 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
577 bool allSelected =
true;
578 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
579 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
584 myUseSelectedEdges->setText(
TL(
"Remove all edges from selection"));
586 myUseSelectedEdges->setText(
TL(
"Add all edges to selection"));
588 }
else if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 1) {
589 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().front().edge->isAttributeCarrierSelected()) {
590 myUseSelectedEdges->setText(
TL(
"Remove edge from selection"));
592 myUseSelectedEdges->setText(
TL(
"Add edge to selection"));
596 bool allSelected =
true;
597 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
598 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
603 myUseSelectedEdges->setText((
TL(
"Remove ") +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
TL(
" edges from to selection")).c_str());
605 myUseSelectedEdges->setText((
TL(
"Add ") +
toString(myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size()) +
TL(
" edges to selection")).c_str());
610 myUseSelectedEdges->disable();
617 return myDefaultTAZSourceWeight;
623 return myDefaultTAZSinkWeight;
629 return (myToggleMembership->getCheck() == TRUE);
636 if (obj == myToggleMembership) {
638 myTAZFrameParent->myTAZSelectionStatistics->clearSelectedEdges();
640 if (myToggleMembership->getCheck() == TRUE) {
641 myToggleMembership->setText(
TL(
"toggle"));
643 myDefaultTAZSourceFrame->show();
644 myDefaultTAZSinkFrame->show();
646 std::ostringstream information;
648 << std::string(
"- ") <<
TL(
"Toggle Membership:") <<
"\n"
649 << std::string(
" ") <<
TL(
"Create new Sources/Sinks with given weights.");
650 myInformationLabel->setText(information.str().c_str());
652 myTAZFrameParent->myTAZSelectionStatistics->hideTAZSelectionStatisticsModule();
654 if (myTAZFrameParent->myCurrentTAZ->getSelectedEdges().size() > 0) {
655 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
656 }
else if (myTAZFrameParent->myCurrentTAZ->getTAZEdges().size() > 0) {
657 myUseSelectedEdges->setText(
TL(
"Remove all edges"));
659 myUseSelectedEdges->setText(
TL(
"Use selected edges"));
660 myUseSelectedEdges->disable();
663 myToggleMembership->setText(
TL(
"keep"));
665 myDefaultTAZSourceFrame->hide();
666 myDefaultTAZSinkFrame->hide();
668 std::ostringstream information;
670 << std::string(
"- ") <<
TL(
"Keep Membership:") <<
TL(
" Select Sources/Sinks.") <<
"\n"
671 << std::string(
"- ") <<
TL(
"Press ESC to clear the current selection.");
672 myInformationLabel->setText(information.str().c_str());
674 myTAZFrameParent->myTAZSelectionStatistics->showTAZSelectionStatisticsModule();
677 updateSelectEdgesButton();
678 }
else if (obj == myTextFieldDefaultValueTAZSources) {
680 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSources->getText().text())) {
681 myDefaultTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSources->getText().text());
683 if (myDefaultTAZSourceWeight >= 0) {
685 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(0, 0, 0));
688 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
689 myDefaultTAZSourceWeight = 1;
693 myTextFieldDefaultValueTAZSources->setTextColor(FXRGB(255, 0, 0));
694 myDefaultTAZSourceWeight = 1;
696 }
else if (obj == myTextFieldDefaultValueTAZSinks) {
698 if (GNEAttributeCarrier::canParse<double>(myTextFieldDefaultValueTAZSinks->getText().text())) {
699 myDefaultTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldDefaultValueTAZSinks->getText().text());
701 if (myDefaultTAZSinkWeight >= 0) {
703 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(0, 0, 0));
706 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
707 myDefaultTAZSinkWeight = 1;
711 myTextFieldDefaultValueTAZSinks->setTextColor(FXRGB(255, 0, 0));
712 myDefaultTAZSinkWeight = 1;
722 if (myToggleMembership->getCheck() == TRUE) {
724 myTAZFrameParent->dropTAZMembers();
726 for (
const auto& selectedEdge : myTAZFrameParent->myCurrentTAZ->getSelectedEdges()) {
727 myTAZFrameParent->addOrRemoveTAZMember(selectedEdge);
730 updateSelectEdgesButton();
732 if (myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected().size() == 0) {
734 bool allSelected =
true;
735 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
736 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
743 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
745 TAZEdgeColor.edge->unselectAttributeCarrier();
749 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
751 TAZEdgeColor.edge->selectAttributeCarrier();
756 bool allSelected =
true;
757 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
758 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
765 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
766 if (selectedEdge.edge->isAttributeCarrierSelected()) {
768 selectedEdge.edge->unselectAttributeCarrier();
773 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
774 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
776 selectedEdge.edge->selectAttributeCarrier();
783 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
785 myTAZFrameParent->myViewNet->updateViewNet();
794 myTAZFrameParent->getViewNet()->getNet()->computeAndUpdate(neteditOptions,
false);
795 myTAZFrameParent->getViewNet()->update();
797 std::vector<GNEAdditional*> sources;
798 std::vector<GNEAdditional*> sinks;
799 std::set<GNEAdditional*> TAZs;
801 if (myTAZFrameParent->myCurrentTAZ->getTAZ() !=
nullptr) {
803 for (
const auto& TAZSourceSink : myTAZFrameParent->myCurrentTAZ->getTAZ()->getChildAdditionals()) {
806 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
808 sources.push_back(TAZSourceSink);
809 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
813 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
815 sinks.push_back(TAZSourceSink);
816 TAZs.insert(myTAZFrameParent->myCurrentTAZ->getTAZ());
822 for (
const auto&
TAZ : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_TAZ)) {
824 for (
const auto& TAZSourceSink :
TAZ.second->getChildAdditionals()) {
827 if (!TAZSourceSink->getParentEdges().front()->hasSuccessors() &&
829 sources.push_back(TAZSourceSink);
830 TAZs.insert(
TAZ.second);
834 if (!TAZSourceSink->getParentEdges().front()->hasPredecessors() &&
836 sinks.push_back(TAZSourceSink);
837 TAZs.insert(
TAZ.second);
844 if ((sources.size() + sinks.size()) > 0) {
846 const std::string text = (TAZs.size() == 1) ?
848 TL(
"Set weight 0 in ") +
toString(sources.size()) +
TL(
" sources and ") +
849 toString(sinks.size()) +
TL(
" sinks from TAZ '") + (*TAZs.begin())->getID() +
"'?" :
851 TL(
"Set weight 0 in ") +
toString(sources.size()) +
TL(
" sources and ") +
854 const FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Set zero fringe probabilities"),
"%s", text.c_str());
856 myTAZFrameParent->myViewNet->getUndoList()->begin(
GUIIcon::TAZ,
TL(
"set zero fringe probabilities"));
857 for (
const auto& source : sources) {
858 source->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
860 for (
const auto& sink : sinks) {
861 sink->setAttribute(
SUMO_ATTR_WEIGHT,
"0", myTAZFrameParent->myViewNet->getUndoList());
863 myTAZFrameParent->myViewNet->getUndoList()->end();
867 FXMessageBox::information(
this, MBOX_OK,
TL(
"Set zero fringe probabilities"),
TL(
"No source/sinks to update."));
878 myTAZFrameParent(TAZFrameParent) {
908 clearSelectedEdges();
916 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
917 if (selectedEdge.edge == TAZEdgeColor.
edge) {
922 myEdgeAndTAZChildrenSelected.push_back(TAZEdgeColor);
926 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
928 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
937 for (
auto it = myEdgeAndTAZChildrenSelected.begin(); it != myEdgeAndTAZChildrenSelected.end(); it++) {
938 if (it->edge == edge) {
939 myEdgeAndTAZChildrenSelected.erase(it);
943 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
945 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
960 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
961 if (selectedEdge.edge == edge) {
973 myEdgeAndTAZChildrenSelected.clear();
977 myTAZFrameParent->myTAZEdgesGraphic->updateEdgeColors();
979 myTAZFrameParent->myTAZChildDefaultParameters->updateSelectEdgesButton();
983const std::vector<GNETAZFrame::CurrentTAZ::TAZEdgeColor>&
985 return myEdgeAndTAZChildrenSelected;
991 if (obj == myTextFieldTAZSourceWeight) {
993 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSourceWeight->getText().text())) {
994 double newTAZSourceWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSourceWeight->getText().text());
996 if (newTAZSourceWeight >= 0) {
998 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1000 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1002 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1003 selectedEdge.source->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSourceWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1006 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1009 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1013 myTextFieldTAZSourceWeight->setTextColor(FXRGB(255, 0, 0));
1015 }
else if (obj == myTextFieldTAZSinkWeight) {
1017 if (GNEAttributeCarrier::canParse<double>(myTextFieldTAZSinkWeight->getText().text())) {
1018 double newTAZSinkWeight = GNEAttributeCarrier::parse<double>(myTextFieldTAZSinkWeight->getText().text());
1020 if (newTAZSinkWeight >= 0) {
1022 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1024 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1026 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1027 selectedEdge.sink->setAttribute(
SUMO_ATTR_WEIGHT, myTextFieldTAZSinkWeight->getText().text(), myTAZFrameParent->myViewNet->getUndoList());
1030 myTAZFrameParent->getCurrentTAZModule()->refreshTAZEdges();
1033 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1037 myTextFieldTAZSinkWeight->setTextColor(FXRGB(255, 0, 0));
1046 if (myEdgeAndTAZChildrenSelected.size() == 0) {
1048 for (
const auto& TAZEdgeColor : myTAZFrameParent->getCurrentTAZModule()->getTAZEdges()) {
1050 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1052 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1054 TAZEdgeColor.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1059 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1061 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1063 myTAZFrameParent->myTAZSaveChanges->enableButtonsAndBeginUndoList();
1065 selectedEdge.edge->setAttribute(
GNE_ATTR_SELECTED,
"true", myTAZFrameParent->myViewNet->getUndoList());
1075 if (myEdgeAndTAZChildrenSelected.size() > 0) {
1077 myTAZSourceFrame->show();
1078 myTAZSinkFrame->show();
1080 std::set<std::string> weightSourceSet;
1081 std::set<std::string> weightSinkSet;
1084 double maxWeightSource = 0;
1085 double minWeightSource = -1;
1086 double averageWeightSource = 0;
1087 double maxWeightSink = 0;
1088 double minWeightSink = -1;
1089 double averageWeightSink = 0;
1091 for (
const auto& selectedEdge : myEdgeAndTAZChildrenSelected) {
1093 weight = selectedEdge.source->getDepartWeight();
1095 weightSourceSet.insert(
toString(weight));
1097 if (maxWeightSource < weight) {
1098 maxWeightSource = weight;
1101 if (minWeightSource == -1 || (maxWeightSource < weight)) {
1102 minWeightSource = weight;
1105 averageWeightSource += weight;
1107 weight = selectedEdge.sink->getDepartWeight();
1109 weightSinkSet.insert(
toString(weight));
1111 if (maxWeightSink < weight) {
1112 maxWeightSink = weight;
1115 if (minWeightSink == -1 || (maxWeightSink < weight)) {
1116 minWeightSink = weight;
1119 averageWeightSink += weight;
1122 averageWeightSource /= (double)myEdgeAndTAZChildrenSelected.size();
1123 averageWeightSink /= (double)myEdgeAndTAZChildrenSelected.size();
1125 std::ostringstream information;
1126 std::string edgeInformation;
1128 if (myEdgeAndTAZChildrenSelected.size() == 1) {
1129 edgeInformation =
TL(
"- Edge ID: ") + myEdgeAndTAZChildrenSelected.begin()->edge->getID();
1131 edgeInformation =
TL(
"- Number of edges: ") +
toString(myEdgeAndTAZChildrenSelected.size());
1135 << edgeInformation <<
"\n"
1136 <<
TL(
"- Min source: ") <<
toString(minWeightSource) <<
"\n"
1137 <<
TL(
"- Max source: ") <<
toString(maxWeightSource) <<
"\n"
1138 <<
TL(
"- Average source: ") <<
toString(averageWeightSource) <<
"\n"
1140 <<
TL(
"- Min sink: ") <<
toString(minWeightSink) <<
"\n"
1141 <<
TL(
"- Max sink: ") <<
toString(maxWeightSink) <<
"\n"
1142 <<
TL(
"- Average sink: ") <<
toString(averageWeightSink);
1144 myStatisticsLabel->setText(information.str().c_str());
1146 myTextFieldTAZSourceWeight->setText(
joinToString(weightSourceSet,
" ").c_str());
1147 myTextFieldTAZSourceWeight->setTextColor(FXRGB(0, 0, 0));
1148 myTextFieldTAZSinkWeight->setText(
joinToString(weightSinkSet,
" ").c_str());
1149 myTextFieldTAZSinkWeight->setTextColor(FXRGB(0, 0, 0));
1152 myTAZSourceFrame->hide();
1153 myTAZSinkFrame->hide();
1155 myStatisticsLabel->setText(
TL(
"No edges selected"));
1165 myTAZFrameParent(TAZFrameParent),
1166 myTAZTemplate(nullptr) {
1199 delete myTAZTemplate;
1205 MFXGroupBoxModule::show();
1211 MFXGroupBoxModule::hide();
1217 const bool validColor = GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text());
1218 const bool validCenter = myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<Position>(myTextFieldCenter->getText().text());
1220 return (validColor && validCenter && validName);
1226 return (myAddEdgesWithinCheckButton->getCheck() == TRUE);
1233 if (myTAZFrameParent->myBaseTAZ) {
1235 delete myTAZFrameParent->myBaseTAZ;
1242 myTAZFrameParent->myBaseTAZ->addPositionAttribute(
SUMO_ATTR_CENTER, myTextFieldCenter->getText().empty() ?
Position::INVALID : GNEAttributeCarrier::parse<Position>(myTextFieldCenter->getText().text()));
1243 myTAZFrameParent->myBaseTAZ->addBoolAttribute(
SUMO_ATTR_FILL, (myCheckButtonFill->getCheck() == TRUE));
1244 myTAZFrameParent->myBaseTAZ->addColorAttribute(
SUMO_ATTR_COLOR, GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text()));
1245 myTAZFrameParent->myBaseTAZ->addStringAttribute(
SUMO_ATTR_NAME, myTextFieldName->getText().text());
1252 FXColorDialog colordialog(getCollapsableFrame(),
TL(
"Color Dialog"));
1253 colordialog.setTarget(
this);
1256 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1257 colordialog.setRGBA(
MFXUtils::getFXColor(GNEAttributeCarrier::parse<RGBColor>(myTextFieldColor->getText().text())));
1262 if (colordialog.execute()) {
1264 onCmdSetAttribute(0, 0, 0);
1272 if (obj == myTextFieldColor) {
1274 if (GNEAttributeCarrier::canParse<RGBColor>(myTextFieldColor->getText().text())) {
1275 myTextFieldColor->setTextColor(FXRGB(0, 0, 0));
1276 myTextFieldColor->killFocus();
1278 myTextFieldColor->setTextColor(FXRGB(255, 0, 0));
1280 }
else if (obj == myTextFieldCenter) {
1282 if (myTextFieldCenter->getText().empty() || GNEAttributeCarrier::canParse<RGBColor>(myTextFieldCenter->getText().text())) {
1283 myTextFieldCenter->setTextColor(FXRGB(0, 0, 0));
1284 myTextFieldCenter->killFocus();
1286 myTextFieldCenter->setTextColor(FXRGB(255, 0, 0));
1288 }
else if (obj == myTextFieldName) {
1291 myTextFieldName->setTextColor(FXRGB(0, 0, 0));
1292 myTextFieldName->killFocus();
1294 myTextFieldName->setTextColor(FXRGB(255, 0, 0));
1296 }
else if (obj == myAddEdgesWithinCheckButton) {
1298 if (myAddEdgesWithinCheckButton->getCheck() == TRUE) {
1299 myAddEdgesWithinCheckButton->setText(
TL(
"use"));
1301 myAddEdgesWithinCheckButton->setText(
TL(
"not use"));
1303 }
else if (obj == myCheckButtonFill) {
1305 if (myCheckButtonFill->getCheck() == TRUE) {
1306 myCheckButtonFill->setText(
"true");
1308 myCheckButtonFill->setText(
"false");
1317 myTAZFrameParent->openHelpAttributesDialog(myTAZTemplate);
1327 myTAZFrameParent(TAZFrameParent),
1328 myEdgeDefaultColor(
RGBColor::GREY),
1329 myEdgeSelectedColor(
RGBColor::MAGENTA) {
1366 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1367 for (
const auto& lane : edge.second->getLanes()) {
1368 lane->setSpecialColor(
nullptr);
1379 for (
const auto& edge : myTAZFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
1380 if (!edge.second->isAttributeCarrierSelected()) {
1382 for (
const auto lane : edge.second->getLanes()) {
1383 lane->setSpecialColor(&myEdgeDefaultColor);
1388 for (
const auto& TAZEdgeColor : myTAZFrameParent->myCurrentTAZ->getTAZEdges()) {
1389 if (!TAZEdgeColor.edge->isAttributeCarrierSelected()) {
1391 for (
const auto& lane : TAZEdgeColor.edge->getLanes()) {
1393 if (myColorBySourceWeight->getCheck() == TRUE) {
1394 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceColor), TAZEdgeColor.source->getDepartWeight());
1395 }
else if (myColorBySinkWeight->getCheck() == TRUE) {
1396 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sinkColor), TAZEdgeColor.sink->getDepartWeight());
1397 }
else if (myColorBySourcePlusSinkWeight->getCheck() == TRUE) {
1398 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourcePlusSinkColor), TAZEdgeColor.source->getDepartWeight() + TAZEdgeColor.sink->getDepartWeight());
1400 lane->setSpecialColor(&scaledColors.at(TAZEdgeColor.sourceMinusSinkColor), TAZEdgeColor.source->getDepartWeight() - TAZEdgeColor.sink->getDepartWeight());
1406 for (
const auto& selectedEdge : myTAZFrameParent->myTAZSelectionStatistics->getEdgeAndTAZChildrenSelected()) {
1407 if (!selectedEdge.edge->isAttributeCarrierSelected()) {
1409 for (
const auto& lane : selectedEdge.edge->getLanes()) {
1410 lane->setSpecialColor(&myEdgeSelectedColor);
1415 myTAZFrameParent->myViewNet->updateViewNet();
1422 if (obj == myColorBySourceWeight) {
1423 myColorBySinkWeight->setCheck(FALSE);
1424 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1425 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1426 }
else if (obj == myColorBySinkWeight) {
1427 myColorBySourceWeight->setCheck(FALSE);
1428 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1429 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1430 }
else if (obj == myColorBySourcePlusSinkWeight) {
1431 myColorBySourceWeight->setCheck(FALSE);
1432 myColorBySinkWeight->setCheck(FALSE);
1433 myColorBySourceMinusSinkWeight->setCheck(FALSE);
1434 }
else if (obj == myColorBySourceMinusSinkWeight) {
1435 myColorBySourceWeight->setCheck(FALSE);
1436 myColorBySinkWeight->setCheck(FALSE);
1437 myColorBySourcePlusSinkWeight->setCheck(FALSE);
1499 std::map<SumoXMLAttr, std::string> valuesOfElement;
1560 for (
const auto& edge : edges) {
1569 for (
const auto& edge : edges) {
1574 if (TAZEdgeColor.edge == edge) {
1635 std::vector<std::string> edgeIDs;
1639 edgeIDs.push_back(edge->getID());
1663 if (TAZEdgeColor.edge == edge) {
FXDEFMAP(GNETAZFrame::TAZParameters) TAZParametersMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_CANCEL
Cancel-button pressed.
@ MID_GNE_SET_ATTRIBUTE_DIALOG
attribute edited trough dialog
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_OK
Ok-button pressed.
@ MID_GNE_SELECT
select element
@ MID_GNE_SET_ZEROFRINGEPROB
set zero fringe probabilities (used in TAZ Frame)
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonRectangular
little rectangular button used in frames (For example, in "help" buttons)
#define GUIDesignLabel(justify)
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNING(msg)
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ GNE_ATTR_MAX_SOURCE
max source (used only by TAZs)
@ GNE_ATTR_TAZCOLOR
Color of TAZSources/TAZSinks.
@ GNE_ATTR_MAX_SINK
max sink (used only by TAZs)
@ GNE_ATTR_AVERAGE_SINK
average sink (used only by TAZs)
@ GNE_ATTR_SELECTED
element is selected
@ GNE_ATTR_MIN_SINK
min sink (used only by TAZs)
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
@ SUMO_ATTR_FILL
Fill the polygon.
@ GNE_ATTR_AVERAGE_SOURCE
average source (used only by TAZs)
@ SUMO_ATTR_COLOR
A color information.
@ GNE_ATTR_MIN_SOURCE
min source (used only by TAZs)
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
const Position & getPositionAttribute(const SumoXMLAttr attr) const
get Position attribute
void addPositionVectorAttribute(const SumoXMLAttr attr, const PositionVector &value)
add PositionVector attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belong to GNENet but has influence in the simulation.
bool isUndoRedoAllowed() const
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * getNet() const
get pointer to net
bool isDrawing() const
return true if currently a shape is drawed
void addNewPoint(const Position &P)
add new point to temporal shape
bool getDeleteLastCreatedPoint()
get flag delete last created point
void removeLastPoint()
remove last added point
const PositionVector & getTemporalShape() const
get Temporal shape
A road/street connecting two junctions (netedit-version)
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
GNEViewNet * getViewNet() const
get view net
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
bool isNetworkElementAroundShape(GNEAttributeCarrier *AC, const PositionVector &shape) const
check if shape of given AC (network element) is around the given shape
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
std::vector< GNEEdge * > getSelectedEdges() const
return all edges
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
struct for edges and the source/sink colors
GNETAZSourceSink * sink
@brif sink TAZ
void updateColors()
update colors
GNETAZSourceSink * source
source TAZ
TAZEdgeColor()
default color
~TAZEdgeColor()
destructor (needed because RGBColors has to be deleted)
void refreshTAZEdges()
refresh TAZEdges
double myMinSourceMinusSinkWeight
minimum source minus sink value of current TAZ Edges
bool isTAZEdge(GNEEdge *edge) const
check if given edge belongs to current TAZ
GNETAZFrame * myTAZFrameParent
pointer to TAZ Frame
GNETAZ * myEditedTAZ
current edited TAZ
const std::vector< CurrentTAZ::TAZEdgeColor > & getTAZEdges() const
get TAZEdges
void setTAZ(GNETAZ *editedTAZ)
set current TAZ
void addTAZChild(GNETAZSourceSink *additional)
add TAZChild
const std::vector< GNEEdge * > & getSelectedEdges() const
get current selected edges
double myMaxSourceMinusSinkWeight
maximum source minus sink value of current TAZ Edges
FXLabel * myCurrentTAZLabel
Label for current TAZ.
CurrentTAZ(GNETAZFrame *TAZFrameParent)
constructor
double myMaxSourcePlusSinkWeight
maximum source plus sink value of current TAZ Edges
double myMinSourcePlusSinkWeight
minimum source plus sink value of current TAZ Edges
GNETAZ * getTAZ() const
get current TAZ
bool getToggleMembership() const
check if toggle membership is enabled
FXButton * myUseSelectedEdges
button for use selected edges
TAZChildDefaultParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXCheckButton * myToggleMembership
CheckButton to enable or disable Toggle edge Membership.
void collapseTAZChildDefaultParameters()
collapse TAZ child default parameters Module (if we have selected a TAZ)
FXTextField * myTextFieldDefaultValueTAZSources
textField to set a default value for TAZ Sources
long onCmdUseSelectedEdges(FXObject *obj, FXSelector, void *)
Called when the user press "use selected edges" button.
void updateSelectEdgesButton()
update "select edges button"
double getDefaultTAZSourceWeight() const
get default source weight
void extendTAZChildDefaultParameters()
extend TAZ child default parameters Module (if we have selected a TAZ)
FXLabel * myInformationLabel
information label
FXHorizontalFrame * myDefaultTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
FXHorizontalFrame * myDefaultTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
FXHorizontalFrame * myToggleMembershipFrame
Horizontal Frame toggle membership.
~TAZChildDefaultParameters()
destructor
long onCmdSetZeroFringeProbabilities(FXObject *obj, FXSelector, void *)
Called when the user press "zero fringe probabilities" button.
FXTextField * myTextFieldDefaultValueTAZSinks
textField to set a default value for TAZ Sinks
long onCmdSetDefaultValues(FXObject *obj, FXSelector, void *)
double getDefaultTAZSinkWeight() const
default sink weight
FXButton * myZeroFringeProbabilities
button for setting zero fringe probabilities
void showTAZCommonStatisticsModule()
show TAZ Common Statistics Module
TAZCommonStatistics(GNETAZFrame *TAZFrameParent)
constructor
~TAZCommonStatistics()
destructor
FXLabel * myStatisticsLabel
Statistics labels.
void hideTAZCommonStatisticsModule()
hide TAZ Common Statistics Module
void updateStatistics()
update Statistics label
FXRadioButton * myColorBySourcePlusSinkWeight
add radio button "color source + sink"
RGBColor myEdgeSelectedColor
RGBColor color for selected egdes.
FXRadioButton * myColorBySinkWeight
add radio button "color by sink"
void showTAZEdgesGraphicModule()
show TAZ Edges Graphic Module
void updateEdgeColors()
update edge colors;
FXRadioButton * myColorBySourceWeight
add radio button "color by source"
FXRadioButton * myColorBySourceMinusSinkWeight
add radio button "color source - Sink"
RGBColor myEdgeDefaultColor
default RGBColor for all edges
~TAZEdgesGraphic()
destructor
long onCmdChoosenBy(FXObject *obj, FXSelector, void *)
void hideTAZEdgesGraphicModule()
hide TAZ Edges Graphic Module
TAZEdgesGraphic(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXTextField * myTextFieldName
textField to modify the default value of name parameter
void getAttributesAndValues() const
get a map with attributes and their values
bool isAddEdgesWithinEnabled() const
check if edges within has to be used after TAZ Creation
void showTAZParametersModule()
show TAZ parameters and set the default value of parameters
TAZParameters(GNETAZFrame *TAZFrameParent)
FOX-declaration.
~TAZParameters()
destructor
FXButton * myHelpTAZAttribute
button for help
FXCheckButton * myAddEdgesWithinCheckButton
CheckButton to enable or disable use edges within TAZ after creation.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
Called when user set a value.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
void hideTAZParametersModule()
hide TAZ parameters
long onCmdSetColorAttribute(FXObject *, FXSelector, void *)
GNETAZ * myTAZTemplate
TAZ.
FXButton * myColorEditor
Button for open color editor.
FXTextField * myTextFieldCenter
text field center
FXTextField * myTextFieldColor
textField to modify the default value of color parameter
FXCheckButton * myCheckButtonFill
CheckButton to enable or disable fill.
bool isCurrentParametersValid() const
check if current parameters are valid
bool isChangesPending() const
return true if there is changes to save
FXButton * mySaveChangesButton
@field FXButton for save changes in TAZEdges
void showTAZSaveChangesModule()
show TAZ Save Changes Module
FXButton * myCancelChangesButton
@field FXButton for cancel changes in TAZEdges
long onCmdCancelChanges(FXObject *, FXSelector, void *)
Called when the user press the button cancel changes.
TAZSaveChanges(GNETAZFrame *TAZFrameParent)
FOX-declaration.
void hideTAZSaveChangesModule()
hide TAZ Save Changes Module
~TAZSaveChanges()
destructor
long onCmdSaveChanges(FXObject *, FXSelector, void *)
void enableButtonsAndBeginUndoList()
enable buttons save and cancel changes (And begin Undo List)
long onCmdSelectEdges(FXObject *obj, FXSelector, void *)
Called when the user press select edges.
TAZSelectionStatistics(GNETAZFrame *TAZFrameParent)
FOX-declaration.
FXHorizontalFrame * myTAZSourceFrame
Horizontal Frame for default TAZ Source Weight.
~TAZSelectionStatistics()
destructor
void hideTAZSelectionStatisticsModule()
hide TAZ Selection Statistics Module
bool isEdgeSelected(GNEEdge *edge)
check if an edge is selected
FXHorizontalFrame * myTAZSinkFrame
Horizontal Frame for default TAZ Sink Weight.
const std::vector< CurrentTAZ::TAZEdgeColor > & getEdgeAndTAZChildrenSelected() const
get map with edge and TAZChildren
void showTAZSelectionStatisticsModule()
show TAZ Selection Statistics Module
long onCmdSetNewValues(FXObject *obj, FXSelector, void *)
void clearSelectedEdges()
clear current TAZ children
FXTextField * myTextFieldTAZSourceWeight
textField for TAZ Source weight
void updateStatistics()
update TAZSelectionStatistics
FXTextField * myTextFieldTAZSinkWeight
textField for TAZ Sink weight
bool selectEdge(const CurrentTAZ::TAZEdgeColor &edge)
add an edge and their TAZ Children in the list of selected items
bool unselectEdge(GNEEdge *edge)
un select an edge (and their TAZ Children)
FXLabel * myStatisticsLabel
Statistics labels.
TAZSelectionStatistics * myTAZSelectionStatistics
TAZ Edges selection parameters.
TAZSelectionStatistics * getTAZSelectionStatisticsModule() const
get TAZ Selection Statistics modul
TAZSaveChanges * getTAZSaveChangesModule() const
get TAZ Save Changes modul
CurrentTAZ * myCurrentTAZ
current TAZ
TAZEdgesGraphic * myTAZEdgesGraphic
TAZ Edges Graphic.
TAZParameters * myTAZParameters
TAZ parameters.
bool addOrRemoveTAZMember(GNEEdge *edge)
add or remove a source and a sink, or remove it if edge is in the list of TAZ Children
void dropTAZMembers()
drop all TAZSources and TAZ Sinks of current TAZ
GNEDrawingShape * getDrawingShapeModule() const
get drawing mode modul
CurrentTAZ * getCurrentTAZModule() const
get Current TAZ modul
TAZCommonStatistics * myTAZCommonStatistics
TAZ Edges common parameters.
GNEDrawingShape * myDrawingShape
Drawing shape.
bool shapeDrawed()
build a shaped element using the drawed shape return true if was successfully created
~GNETAZFrame()
Destructor.
TAZSaveChanges * myTAZSaveChanges
save TAZ Edges
CommonXMLStructure::SumoBaseObject * myBaseTAZ
SumoBaseObject used for creating TAZ.
void hide()
hide TAZ frame
void processEdgeSelection(const std::vector< GNEEdge * > &edges)
process selection of edges in view net
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click over Viewnet
TAZChildDefaultParameters * myTAZChildDefaultParameters
TAZ child defaults parameters.
GNETAZFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void updateTAZStatistic()
update TAZ Statistic
std::string getAttribute(SumoXMLAttr key) const
inherited from GNEAttributeCarrier
double getDepartWeight() const
get depart weight
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
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...
class used to group all variables related with objects under cursor after a click over view
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
const std::vector< GNEEdge * > & getEdges() const
get vector with edges
GNENet * getNet() const
get the net object
void updateObjectsInBoundary(const Boundary &boundary)
get objects in the given boundary
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
A single child window which contains a view of the simulation area.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
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
A list item which allows for custom coloring.
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
void closePolygon()
ensures that the last position equals the first
Boundary getBoxBoundary() const
Returns a boundary enclosing this list of lines.
Position getCentroid() const
Returns the centroid (closes the polygon if unclosed)
static const RGBColor WHITE
static const RGBColor BLUE
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name)
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors