143 myFrameParent(frameParent),
145 myCurrentTemplateAC(
nullptr) {
149 setCurrentTagType(myTagType, onlyDrawables,
false);
151 setCurrentTag(tag,
false);
181 for (
const auto&
ACTemplate : myACTemplates) {
192 return myCurrentTemplateAC;
204 case GNETagProperties::TagType::NETWORKELEMENT:
205 setText(
"network elements");
207 case GNETagProperties::TagType::ADDITIONALELEMENT:
208 setText(
"Additional elements");
210 case GNETagProperties::TagType::SHAPE:
211 setText(
"Shape elements");
213 case GNETagProperties::TagType::TAZELEMENT:
214 setText(
"TAZ elements");
216 case GNETagProperties::TagType::VEHICLE:
219 case GNETagProperties::TagType::STOP:
222 case GNETagProperties::TagType::PERSON:
225 case GNETagProperties::TagType::PERSONPLAN:
226 setText(
"Person plans");
228 case GNETagProperties::TagType::CONTAINER:
229 setText(
"Container");
231 case GNETagProperties::TagType::CONTAINERPLAN:
232 setText(
"Container plans");
234 case GNETagProperties::TagType::PERSONTRIP:
235 setText(
"Person trips");
237 case GNETagProperties::TagType::WALK:
240 case GNETagProperties::TagType::RIDE:
243 case GNETagProperties::TagType::STOPPERSON:
244 setText(
"Person stops");
250 for (
const auto&
ACTemplate : myACTemplates) {
253 myACTemplates.clear();
254 myTagsMatchBox->clearItems();
258 for (
const auto& tagProperty : tagProperties) {
259 if ((!onlyDrawables || tagProperty.isDrawable()) && (!tagProperty.requireProj() || proj)) {
260 myACTemplates.push_back(
new ACTemplate(myFrameParent->getViewNet()->getNet(), tagProperty));
261 myTagsMatchBox->appendIconItem(tagProperty.getFieldString().c_str(),
GUIIconSubSys::getIcon(tagProperty.getGUIIcon()), tagProperty.getBackGroundColor());
265 myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
267 myTagsMatchBox->setNumVisible((
int)myTagsMatchBox->getNumItems());
269 myCurrentTemplateAC = myACTemplates.front()->
getAC();
271 if (notifyFrameParent) {
272 myFrameParent->tagSelected();
280 myCurrentTemplateAC =
nullptr;
282 for (
int i = 0; i < (int)myACTemplates.size(); i++) {
283 if (myACTemplates.at(i)->getAC() && (myACTemplates.at(i)->getAC()->getTagProperty().getTag() == newTag)) {
285 myCurrentTemplateAC = myACTemplates.at(i)->getAC();
286 myTagsMatchBox->setCurrentItem(i);
288 myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
292 if (notifyFrameParent) {
293 myFrameParent->tagSelected();
301 myFrameParent->tagSelected();
308 for (
int i = 0; i < (int)myACTemplates.size(); i++) {
309 if (myACTemplates.at(i)->getAC() && myACTemplates.at(i)->getAC()->getTagProperty().getFieldString() == myTagsMatchBox->getText().text()) {
311 myCurrentTemplateAC = myACTemplates.at(i)->getAC();
312 myTagsMatchBox->setCurrentItem(i);
314 myTagsMatchBox->setTextColor(FXRGB(0, 0, 0));
316 myFrameParent->tagSelected();
318 WRITE_DEBUG((
"Selected item '" + myTagsMatchBox->getText() +
"' in TagSelector").text());
323 myCurrentTemplateAC =
nullptr;
325 myTagsMatchBox->setTextColor(FXRGB(255, 0, 0));
327 WRITE_DEBUG(
"Selected invalid item in TagSelector");
329 myFrameParent->tagSelected();
343 switch (tagProperty.
getTag()) {
504 throw ProcessError(
"Non-supported tagProperty in ACTemplate");
521 myCurrentDemandElement(defaultElement),
522 myDemandElementTags({demandElementTag}) {
526 refreshDemandElementSelector();
534 myFrameParent(frameParent),
535 myCurrentDemandElement(nullptr) {
537 for (
const auto& tagType : tagTypes) {
539 for (
const auto& tagProperty : tagProperties) {
557 return myCurrentDemandElement;
561 const std::vector<SumoXMLTag>&
563 return myDemandElementTags;
570 if (std::find(myDemandElementTags.begin(), myDemandElementTags.end(), demandElement->
getTagProperty().
getTag()) != myDemandElementTags.end()) {
572 myDemandElementsMatchBox->setItem(demandElement->
getID().c_str(), demandElement->
getIcon());
574 myCurrentDemandElement = demandElement;
576 myFrameParent->demandElementSelected();
584 refreshDemandElementSelector();
586 if (myCurrentDemandElement) {
587 myDemandElementsMatchBox->setItem(myCurrentDemandElement->getID().c_str(), myCurrentDemandElement->getIcon());
588 }
else if (myDemandElementTags.size() == 1) {
591 myDemandElementsMatchBox->setItem(defaultVType->getID().c_str(), defaultVType->getIcon());
594 onCmdSelectDemandElement(
nullptr, 0,
nullptr);
614 const auto& demandElements = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements();
616 myDemandElementsMatchBox->clearItems();
618 for (
const auto& demandElementTag : myDemandElementTags) {
628 for (
const auto& vType : demandElements.at(demandElementTag)) {
631 myDemandElementsMatchBox->appendIconItem(vType->getID().c_str(), vType->getIcon());
636 for (
const auto& demandElement : demandElements.at(demandElementTag)) {
637 myDemandElementsMatchBox->appendIconItem(demandElement->getID().c_str(), demandElement->getIcon());
642 if (myDemandElementsMatchBox->getNumItems() < 10) {
643 myDemandElementsMatchBox->setNumVisible((
int)myDemandElementsMatchBox->getNumItems());
645 myDemandElementsMatchBox->setNumVisible(10);
648 if (myDemandElementsMatchBox->getNumItems() == 0) {
649 myCurrentDemandElement =
nullptr;
650 }
else if (myCurrentDemandElement) {
651 for (
int i = 0; i < myDemandElementsMatchBox->getNumItems(); i++) {
652 if (myDemandElementsMatchBox->getItem(i).text() == myCurrentDemandElement->getID()) {
653 myDemandElementsMatchBox->setCurrentItem(i, FALSE);
659 myCurrentDemandElement = myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDefaultType();
662 myCurrentDemandElement =
nullptr;
664 for (
auto i = myDemandElementTags.begin(); (i != myDemandElementTags.end()) && (myCurrentDemandElement ==
nullptr); i++) {
665 if (demandElements.at(*i).size() > 0) {
666 myCurrentDemandElement = *demandElements.at(*i).begin();
676 if (myCurrentDemandElement ==
nullptr) {
679 if (!myCurrentDemandElement->getTagProperty().isPerson()) {
682 if (myCurrentDemandElement->getChildDemandElements().empty()) {
707 return lastPersonPlan->
getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
719 if (myCurrentDemandElement ==
nullptr) {
722 if (!myCurrentDemandElement->getTagProperty().isContainer()) {
725 if (myCurrentDemandElement->getChildDemandElements().empty()) {
746 return lastContainerPlan->
getParentAdditionals().back()->getParentLanes().front()->getParentEdge();
756 for (
const auto& demandElementTag : myDemandElementTags) {
757 for (
const auto& demandElement : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getDemandElements().at(demandElementTag)) {
758 if (demandElement->getID() == myDemandElementsMatchBox->getText().text()) {
760 myDemandElementsMatchBox->setTextColor(FXRGB(0, 0, 0));
762 myCurrentDemandElement = demandElement;
764 myFrameParent->demandElementSelected();
766 WRITE_DEBUG((
"Selected item '" + myDemandElementsMatchBox->getText() +
"' in DemandElementSelector").text());
772 myCurrentDemandElement =
nullptr;
774 myFrameParent->demandElementSelected();
776 myDemandElementsMatchBox->setTextColor(FXRGB(255, 0, 0));
778 WRITE_DEBUG(
"Selected invalid item in DemandElementSelector");
788 myFrameParent(frameParent),
790 myClickedAC(nullptr),
791 myClickedJunction(nullptr),
792 myClickedEdge(nullptr),
793 myClickedLane(nullptr),
794 myClickedCrossing(nullptr),
795 myClickedConnection(nullptr),
796 myClickedShape(nullptr),
797 myClickedTAZElement(nullptr),
798 myClickedAdditional(nullptr),
799 myClickedDemandElement(nullptr),
800 myClickedDataSet(nullptr),
801 myClickedDataInterval(nullptr),
802 myClickedGenericData(nullptr) {
818 refreshHierarchicalElementTree();
820 myTreeListDinamic->show();
831 myClickedAC =
nullptr;
832 myClickedJunction =
nullptr;
833 myClickedEdge =
nullptr;
834 myClickedLane =
nullptr;
835 myClickedCrossing =
nullptr;
836 myClickedConnection =
nullptr;
837 myClickedShape =
nullptr;
838 myClickedTAZElement =
nullptr;
839 myClickedAdditional =
nullptr;
840 myClickedDemandElement =
nullptr;
841 myClickedDataSet =
nullptr;
842 myClickedDataInterval =
nullptr;
843 myClickedGenericData =
nullptr;
845 myTreeListDinamic->hide();
854 myTreeListDinamic->clearItems();
855 myTreeItemToACMap.clear();
856 myTreeItemsConnections.clear();
859 showHierarchicalElementChildren(myHE, showAttributeCarrierParents());
876 FXEvent* e = (FXEvent*)eventData;
878 FXTreeItem* item = myTreeListDinamic->getItemAt(e->win_x, e->win_y);
880 if (item && (myTreeItemsConnections.find(item) == myTreeItemsConnections.end())) {
881 createPopUpMenu(e->root_x, e->root_y, myTreeItemToACMap[item]);
890 if (myClickedJunction) {
891 myFrameParent->myViewNet->centerTo(myClickedJunction->getGlID(),
true, -1);
892 }
else if (myClickedEdge) {
893 myFrameParent->myViewNet->centerTo(myClickedEdge->getGlID(),
true, -1);
894 }
else if (myClickedLane) {
895 myFrameParent->myViewNet->centerTo(myClickedLane->getGlID(),
true, -1);
896 }
else if (myClickedCrossing) {
897 myFrameParent->myViewNet->centerTo(myClickedCrossing->getGlID(),
true, -1);
898 }
else if (myClickedConnection) {
899 myFrameParent->myViewNet->centerTo(myClickedConnection->getGlID(),
true, -1);
900 }
else if (myClickedAdditional) {
901 myFrameParent->myViewNet->centerTo(myClickedAdditional->getGlID(),
true, -1);
902 }
else if (myClickedShape) {
903 myFrameParent->myViewNet->centerTo(myClickedShape->getGlID(),
true, -1);
904 }
else if (myClickedTAZElement) {
905 myFrameParent->myViewNet->centerTo(myClickedTAZElement->getGlID(),
true, -1);
906 }
else if (myClickedDemandElement) {
907 myFrameParent->myViewNet->centerTo(myClickedDemandElement->getGlID(),
true, -1);
908 }
else if (myClickedGenericData) {
909 myFrameParent->myViewNet->centerTo(myClickedGenericData->getGlID(),
true, -1);
912 myFrameParent->myViewNet->updateViewNet();
919 if ((myHE !=
nullptr) && (myClickedAC !=
nullptr)) {
920 myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectChild(myClickedAC, myHE);
929 if (myClickedJunction) {
930 myFrameParent->myViewNet->getNet()->deleteJunction(myClickedJunction, myFrameParent->myViewNet->getUndoList());
931 }
else if (myClickedEdge) {
932 myFrameParent->myViewNet->getNet()->deleteEdge(myClickedEdge, myFrameParent->myViewNet->getUndoList(),
false);
933 }
else if (myClickedLane) {
934 myFrameParent->myViewNet->getNet()->deleteLane(myClickedLane, myFrameParent->myViewNet->getUndoList(),
false);
935 }
else if (myClickedCrossing) {
936 myFrameParent->myViewNet->getNet()->deleteCrossing(myClickedCrossing, myFrameParent->myViewNet->getUndoList());
937 }
else if (myClickedConnection) {
938 myFrameParent->myViewNet->getNet()->deleteConnection(myClickedConnection, myFrameParent->myViewNet->getUndoList());
939 }
else if (myClickedAdditional) {
940 myFrameParent->myViewNet->getNet()->deleteAdditional(myClickedAdditional, myFrameParent->myViewNet->getUndoList());
941 }
else if (myClickedShape) {
942 myFrameParent->myViewNet->getNet()->deleteShape(myClickedShape, myFrameParent->myViewNet->getUndoList());
943 }
else if (myClickedTAZElement) {
944 myFrameParent->myViewNet->getNet()->deleteTAZElement(myClickedTAZElement, myFrameParent->myViewNet->getUndoList());
945 }
else if (myClickedDemandElement) {
947 if ((myClickedDemandElement->getTagProperty().getTag() ==
SUMO_TAG_VTYPE) && (GNEAttributeCarrier::parse<bool>(myClickedDemandElement->getAttribute(
GNE_ATTR_DEFAULT_VTYPE)))) {
950 }
else if (myClickedDemandElement->getTagProperty().isPersonPlan() && (myClickedDemandElement->getParentDemandElements().front()->getChildDemandElements().size() == 1)) {
952 myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement->getParentDemandElements().front(), myFrameParent->myViewNet->getUndoList());
954 myFrameParent->myViewNet->getNet()->deleteDemandElement(myClickedDemandElement, myFrameParent->myViewNet->getUndoList());
956 }
else if (myClickedDataSet) {
957 myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedDataSet, myFrameParent->myViewNet->getUndoList());
958 }
else if (myClickedDataInterval) {
960 if (myClickedDataInterval->getDataSetParent()->getDataIntervalChildren().size() == 1) {
961 myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedDataInterval->getDataSetParent(), myFrameParent->myViewNet->getUndoList());
963 myFrameParent->myViewNet->getNet()->deleteDataInterval(myClickedDataInterval, myFrameParent->myViewNet->getUndoList());
965 }
else if (myClickedGenericData) {
967 if (myClickedGenericData->getDataIntervalParent()->getGenericDataChildren().size() == 1) {
969 if (myClickedGenericData->getDataIntervalParent()->getDataSetParent()->getDataIntervalChildren().size() == 1) {
970 myFrameParent->myViewNet->getNet()->deleteDataSet(myClickedGenericData->getDataIntervalParent()->getDataSetParent(), myFrameParent->myViewNet->getUndoList());
972 myFrameParent->myViewNet->getNet()->deleteDataInterval(myClickedGenericData->getDataIntervalParent(), myFrameParent->myViewNet->getUndoList());
975 myFrameParent->myViewNet->getNet()->deleteGenericData(myClickedGenericData, myFrameParent->myViewNet->getUndoList());
979 myFrameParent->myViewNet->updateViewNet();
981 refreshHierarchicalElementTree();
983 if (myFrameParent->myViewNet->getInspectedAttributeCarriers().size() == 1) {
984 if (myFrameParent->myViewNet->getInspectedAttributeCarriers().front() != myClickedAC) {
985 myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(myFrameParent->myViewNet->getInspectedAttributeCarriers().front());
988 myFrameParent->myViewNet->getViewParent()->getInspectorFrame()->inspectSingleElement(
nullptr);
998 if (myClickedDemandElement) {
999 myFrameParent->myViewNet->getUndoList()->begin(myClickedDemandElement->getTagProperty().getGUIIcon(), (
"moving up " + myClickedDemandElement->getTagStr()).c_str());
1001 myFrameParent->myViewNet->getUndoList()->add(
new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
1002 GNEChange_Children::Operation::MOVE_BACK),
true);
1003 myFrameParent->myViewNet->getUndoList()->end();
1006 refreshHierarchicalElementTree();
1014 if (myClickedDemandElement) {
1015 myFrameParent->myViewNet->getUndoList()->begin(myClickedDemandElement->getTagProperty().getGUIIcon(), (
"moving down " + myClickedDemandElement->getTagStr()).c_str());
1017 myFrameParent->myViewNet->getUndoList()->add(
new GNEChange_Children(myClickedDemandElement->getParentDemandElements().at(0), myClickedDemandElement,
1018 GNEChange_Children::Operation::MOVE_FRONT),
true);
1019 myFrameParent->myViewNet->getUndoList()->end();
1022 refreshHierarchicalElementTree();
1030 const auto& attributeCarriers = myFrameParent->myViewNet->getNet()->getAttributeCarriers();
1034 myClickedAC = clickedAC;
1036 myClickedJunction = attributeCarriers->retrieveJunction(clickedAC->
getID(),
false);
1037 myClickedEdge = attributeCarriers->retrieveEdge(clickedAC->
getID(),
false);
1038 myClickedLane = attributeCarriers->retrieveLane(clickedAC,
false);
1039 myClickedCrossing = attributeCarriers->retrieveCrossing(clickedAC,
false);
1040 myClickedConnection = attributeCarriers->retrieveConnection(clickedAC,
false);
1041 myClickedShape = attributeCarriers->retrieveShape(clickedAC,
false);
1042 myClickedTAZElement = attributeCarriers->retrieveTAZElement(clickedAC,
false);
1043 myClickedAdditional = attributeCarriers->retrieveAdditional(clickedAC,
false);
1044 myClickedDemandElement = attributeCarriers->retrieveDemandElement(clickedAC,
false);
1045 myClickedDataSet = attributeCarriers->retrieveDataSet(clickedAC,
false);
1046 myClickedDataInterval = attributeCarriers->retrieveDataInterval(clickedAC,
false);
1047 myClickedGenericData = attributeCarriers->retrieveGenericData(clickedAC,
false);
1049 FXMenuPane* pane =
new FXMenuPane(myTreeListDinamic);
1051 new MFXMenuHeader(pane, myFrameParent->myViewNet->getViewParent()->getGUIMainWindow()->getBoldFont(), myClickedAC->getPopUpID().c_str(), myClickedAC->getIcon());
1053 new FXMenuSeparator(pane);
1057 if (myClickedAC->getTagProperty().isVehicleType() || (myClickedAC->getTagProperty().getTag() ==
SUMO_TAG_DATASET) ||
1059 centerMenuCommand->disable();
1066 inspectMenuCommand->disable();
1067 deleteMenuCommand->disable();
1108 myClickedAC =
nullptr;
1109 myClickedJunction =
nullptr;
1110 myClickedEdge =
nullptr;
1111 myClickedLane =
nullptr;
1112 myClickedCrossing =
nullptr;
1113 myClickedConnection =
nullptr;
1114 myClickedShape =
nullptr;
1115 myClickedTAZElement =
nullptr;
1116 myClickedAdditional =
nullptr;
1117 myClickedDemandElement =
nullptr;
1118 myClickedDataSet =
nullptr;
1119 myClickedDataInterval =
nullptr;
1120 myClickedGenericData =
nullptr;
1128 const auto& attributeCarriers = myFrameParent->myViewNet->getNet()->getAttributeCarriers();
1130 if (myHE->getTagProperty().isNetworkElement()) {
1132 switch (myHE->getTagProperty().getTag()) {
1135 GNEEdge* edge = attributeCarriers->retrieveEdge(myHE->getID(),
false);
1140 junctionDestinyItem->setExpanded(
true);
1143 myTreeItemToACMap[junctionDestinyItem] = edge->
getToJunction();
1145 return junctionDestinyItem;
1152 GNELane* lane = attributeCarriers->retrieveLane(myHE->getID(),
false);
1159 junctionDestinyItem->setExpanded(
true);
1161 FXTreeItem* edgeItem = myTreeListDinamic->insertItem(
nullptr, junctionDestinyItem, edge->
getHierarchyName().c_str(), edge->
getIcon(), edge->
getIcon());
1162 edgeItem->setExpanded(
true);
1165 myTreeItemToACMap[junctionDestinyItem] = edge->
getToJunction();
1166 myTreeItemToACMap[edgeItem] = edge;
1175 GNEJunction* junction = attributeCarriers->retrieveCrossing(myHE)->getParentJunction();
1177 FXTreeItem* junctionItem = myTreeListDinamic->insertItem(
nullptr,
nullptr, junction->
getHierarchyName().c_str(), junction->
getIcon(), junction->
getIcon());
1178 junctionItem->setExpanded(
true);
1180 myTreeItemToACMap[junctionItem] = junction;
1182 return junctionItem;
1186 GNEConnection* connection = attributeCarriers->retrieveConnection(myHE->getID(),
false);
1190 edgeFromItem->setExpanded(
true);
1193 edgeToItem->setExpanded(
true);
1195 FXTreeItem* connectionItem = myTreeListDinamic->insertItem(
nullptr, edgeToItem, connection->
getHierarchyName().c_str(), connection->
getIcon(), connection->
getIcon());
1196 connectionItem->setExpanded(
true);
1198 myTreeItemToACMap[edgeFromItem] = connection->
getEdgeFrom();
1199 myTreeItemToACMap[edgeToItem] = connection->
getEdgeTo();
1200 myTreeItemToACMap[connectionItem] = connection;
1202 return connectionItem;
1220 junctionDestinyItem->setExpanded(
true);
1222 FXTreeItem* edgeItem = myTreeListDinamic->insertItem(
nullptr, junctionDestinyItem, edge->
getHierarchyName().c_str(), edge->
getIcon(), edge->
getIcon());
1223 edgeItem->setExpanded(
true);
1226 laneItem->setExpanded(
true);
1229 myTreeItemToACMap[junctionDestinyItem] = edge->
getToJunction();
1230 myTreeItemToACMap[edgeItem] = edge;
1231 myTreeItemToACMap[laneItem] = lane;
1234 }
else if (myHE->getTagProperty().isAdditionalElement()) {
1236 const GNEAdditional* additional = attributeCarriers->retrieveAdditional(myHE);
1238 FXTreeItem* root =
nullptr;
1275 addListItem(
nullptr, (
"..." +
toString((
int)additional->
getParentEdges().size() - 2) +
" edges...").c_str(), 0,
false);
1289 addListItem(
nullptr, (
"..." +
toString((
int)additional->
getParentLanes().size() - 2) +
" lanes...").c_str(), 0,
false);
1297 }
else if (myHE->getTagProperty().isTAZElement()) {
1301 FXTreeItem* root =
nullptr;
1338 addListItem(
nullptr, (
"..." +
toString((
int)TAZElement->
getParentEdges().size() - 2) +
" edges...").c_str(), 0,
false);
1352 addListItem(
nullptr, (
"..." +
toString((
int)TAZElement->
getParentLanes().size() - 2) +
" lanes...").c_str(), 0,
false);
1360 }
else if (myHE->getTagProperty().isDemandElement()) {
1364 FXTreeItem* root =
nullptr;
1401 addListItem(
nullptr, (
"..." +
toString((
int)demandElement->
getParentEdges().size() - 2) +
" edges...").c_str(), 0,
false);
1415 addListItem(
nullptr, (
"..." +
toString((
int)demandElement->
getParentLanes().size() - 2) +
" lanes...").c_str(), 0,
false);
1423 }
else if (myHE->getTagProperty().isDataElement()) {
1428 return addListItem(myFrameParent->myViewNet->getNet()->getAttributeCarriers()->retrieveDataSet(myHE->getID()));
1434 FXTreeItem* root =
nullptr;
1473 addListItem(dataElement->
getParentEdges().front(),
nullptr,
"from ");
1479 addListItem(
nullptr, (
"..." +
toString((
int)dataElement->
getParentEdges().size() - 2) +
" edges...").c_str(), 0,
false);
1484 addListItem(dataElement->
getParentEdges().back(),
nullptr,
"to ");
1497 addListItem(
nullptr, (
"..." +
toString((
int)dataElement->
getParentLanes().size() - 2) +
" lanes...").c_str(), 0,
false);
1523 FXTreeItem* junctionItem = addListItem(HE, itemParent);
1526 showHierarchicalElementChildren(edge, junctionItem);
1530 showHierarchicalElementChildren(crossing, junctionItem);
1540 FXTreeItem* edgeItem = addListItem(HE, itemParent);
1542 for (
const auto& lane : edge->
getLanes()) {
1543 showHierarchicalElementChildren(lane, edgeItem);
1547 showHierarchicalElementChildren(additional, edgeItem);
1551 showHierarchicalElementChildren(shape, edgeItem);
1556 addListItem(TAZElement, edgeItem);
1560 showHierarchicalElementChildren(demandElement, edgeItem);
1578 showHierarchicalElementChildren(genericDatas, edgeItem);
1588 FXTreeItem* laneItem = addListItem(HE, itemParent);
1591 showHierarchicalElementChildren(additional, laneItem);
1595 showHierarchicalElementChildren(shape, laneItem);
1600 addListItem(TAZElement, laneItem);
1604 showHierarchicalElementChildren(demandElement, laneItem);
1610 FXTreeItem* incomingConnections = addListItem(laneItem,
"Incomings", incomingLaneConnections.front()->getIcon(),
false);
1612 for (
const auto& connection : incomingLaneConnections) {
1613 showHierarchicalElementChildren(connection, incomingConnections);
1620 FXTreeItem* outgoingConnections = addListItem(laneItem,
"Outgoing", outcomingLaneConnections.front()->getIcon(),
false);
1622 for (
const auto& connection : outcomingLaneConnections) {
1623 showHierarchicalElementChildren(connection, outgoingConnections);
1632 addListItem(HE, itemParent);
1640 FXTreeItem* treeItem = addListItem(HE, itemParent);
1643 showHierarchicalElementChildren(edge, treeItem);
1647 showHierarchicalElementChildren(lane, treeItem);
1650 std::vector<GNEAdditional*> symbols;
1652 if (additional->getTagProperty().isSymbol()) {
1653 symbols.push_back(additional);
1656 if (symbols.size() > 0) {
1658 const auto additionalParent = symbols.front()->getParentAdditionals().front();
1659 const std::string symbolType = additionalParent->getTagProperty().hasAttribute(
SUMO_ATTR_EDGES) ?
"Edges" :
"Lanes";
1661 FXTreeItem* symbolListItem = addListItem(treeItem, symbolType,
GUIIconSubSys::getIcon(symbolIcon),
false);
1663 for (
const auto& symbol : symbols) {
1664 showHierarchicalElementChildren(symbol, symbolListItem);
1669 if (!additional->getTagProperty().isSymbol()) {
1670 showHierarchicalElementChildren(additional, treeItem);
1675 showHierarchicalElementChildren(shape, treeItem);
1680 addListItem(TAZElement, treeItem);
1684 showHierarchicalElementChildren(demandElement, treeItem);
1688 FXTreeItem* dataElementItem = addListItem(HE, itemParent);
1694 showHierarchicalElementChildren(interval.second, dataElementItem);
1700 showHierarchicalElementChildren(genericData, dataElementItem);
1710 FXTreeItem* item = myTreeListDinamic->insertItem(
nullptr, itemParent, (prefix + AC->
getHierarchyName() + sufix).c_str(), AC->
getIcon(), AC->
getIcon());
1712 myTreeItemToACMap[item] = AC;
1714 item->setExpanded(
true);
1723 FXTreeItem* item = myTreeListDinamic->insertItem(
nullptr, itemParent, text.c_str(), icon, icon);
1725 item->setExpanded(expanded);
1736 myFrameParent(frameParent),
1737 myDeleteLastCreatedPoint(false) {
1743 std::ostringstream information;
1745 <<
"- 'Start drawing' or ENTER\n"
1746 <<
" to create shape.\n"
1747 <<
"- 'Stop drawing' or ENTER to\n"
1748 <<
" finish shape creation.\n"
1749 <<
"- 'Abort drawing' or ESC to\n"
1750 <<
" abort shape creation.\n"
1751 <<
"- 'Shift + Click' to remove\n"
1752 <<
" last inserted point.";
1767 FXGroupBoxModule::show();
1775 FXGroupBoxModule::hide();
1784 myStartDrawingButton->disable();
1785 myStopDrawingButton->enable();
1786 myAbortDrawingButton->enable();
1794 if (myFrameParent->shapeDrawed()) {
1796 myTemporalShape.clear();
1798 myStartDrawingButton->enable();
1799 myStopDrawingButton->disable();
1800 myAbortDrawingButton->disable();
1811 myTemporalShape.clear();
1813 myStartDrawingButton->enable();
1814 myStopDrawingButton->disable();
1815 myAbortDrawingButton->disable();
1821 if (myStopDrawingButton->isEnabled()) {
1822 myTemporalShape.push_back(P);
1824 throw ProcessError(
"A new point cannot be added if drawing wasn't started");
1831 if (myTemporalShape.size() > 1) {
1832 myTemporalShape.pop_back();
1839 return myTemporalShape;
1845 return myStopDrawingButton->isEnabled();
1851 myDeleteLastCreatedPoint = value;
1857 return myDeleteLastCreatedPoint;
1887 myFrameParent(frameParent) {
1902 for (
int i = 0; i < myParentsList->getNumItems(); i++) {
1903 if (myParentsList->isItemSelected(i)) {
1904 return myParentsList->getItem(i)->getText().text();
1914 for (
int i = 0; i < myParentsList->getNumItems(); i++) {
1915 myParentsList->getItem(i)->setSelected(
false);
1918 for (
int i = 0; i < myParentsList->getNumItems(); i++) {
1919 if (myParentsList->getItem(i)->getText().text() ==
id) {
1920 myParentsList->getItem(i)->setSelected(
true);
1924 myParentsList->recalc();
1932 for (
const auto& tagIt : listOfTags) {
1933 if (std::find(additionalTypeParents.begin(), additionalTypeParents.end(), tagIt.getTag()) != additionalTypeParents.end()) {
1934 myParentTags = additionalTypeParents;
1935 myParentsLabel->setText((
"Parent type: " + tagIt.getFieldString()).c_str());
1936 refreshSelectorParentModule();
1947 myParentTags.clear();
1955 std::set<std::string> selectedItems;
1956 for (
int i = 0; i < myParentsList->getNumItems(); i++) {
1957 if (myParentsList->isItemSelected(i)) {
1958 selectedItems.insert(myParentsList->getItem(i)->getText().text());
1961 myParentsList->clearItems();
1962 if (myParentTags.size() > 0) {
1964 std::set<std::string> IDs;
1966 for (
const auto& parentTag : myParentTags) {
1967 for (
const auto& additional : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getAdditionals().at(parentTag)) {
1968 IDs.insert(additional->getID().c_str());
1972 for (
const auto& ID : IDs) {
1973 const int item = myParentsList->appendItem(ID.c_str());
1974 if (selectedItems.find(ID) != selectedItems.end()) {
1975 myParentsList->selectItem(item);
1987 myFrameParent(frameParent),
1997 myFrameParent(frameParent),
1998 myFilteredTag(filteredTag),
2011 myOverlappedACs.clear();
2018 if (myFrameParent->getViewNet()->getEditModes().isCurrentSupermodeDemand() &&
2019 !AC->getTagProperty().isDemandElement()) {
2023 if (myFrameParent->getViewNet()->getEditModes().isCurrentSupermodeData() &&
2024 !AC->getTagProperty().isGenericData()) {
2028 if ((myFilteredTag !=
SUMO_TAG_NOTHING) && (AC->getTagProperty().getTag() != myFilteredTag)) {
2032 myOverlappedACs.push_back(AC);
2036 if (myOverlappedACs.size() > 1) {
2037 mySavedClickedPosition = clickedPosition;
2041 myCurrentIndexButton->setText((
"1 / " +
toString(myOverlappedACs.size())).c_str());
2043 myOverlappedElementList->clearItems();
2044 for (
int i = 0; i < (int)myOverlappedACs.size(); i++) {
2045 myOverlappedElementList->insertItem(i, myOverlappedACs.at(i)->getID().c_str(), myOverlappedACs.at(i)->getIcon());
2048 myOverlappedElementList->getItem(0)->setSelected(TRUE);
2050 myOverlappedElementList->hide();
2076 return (
int)myOverlappedACs.size();
2082 return (mySavedClickedPosition.distanceSquaredTo2D(clickedPosition) < 0.25);
2091 if (checkSavedPosition(clickedPosition)) {
2093 onCmdNextElement(0, 0, 0);
2109 if (checkSavedPosition(clickedPosition)) {
2111 onCmdPreviousElement(0, 0, 0);
2125 if (myOverlappedElementList->getNumItems() > 0) {
2127 myOverlappedElementList->getItem((
int)myItemIndex)->setSelected(FALSE);
2129 if (myItemIndex > 0) {
2132 myItemIndex = (myOverlappedACs.size() - 1);
2135 myOverlappedElementList->getItem((
int)myItemIndex)->setSelected(TRUE);
2136 myOverlappedElementList->update();
2138 myCurrentIndexButton->setText((
toString(myItemIndex + 1) +
" / " +
toString(myOverlappedACs.size())).c_str());
2140 myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2151 if (myOverlappedElementList->getNumItems() > 0) {
2153 myOverlappedElementList->getItem((
int)myItemIndex)->setSelected(FALSE);
2155 myItemIndex = (myItemIndex + 1) % myOverlappedACs.size();
2157 myOverlappedElementList->getItem((
int)myItemIndex)->setSelected(TRUE);
2158 myOverlappedElementList->update();
2160 myCurrentIndexButton->setText((
toString(myItemIndex + 1) +
" / " +
toString(myOverlappedACs.size())).c_str());
2162 myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2173 if (myOverlappedElementList->shown()) {
2174 myOverlappedElementList->hide();
2176 myOverlappedElementList->show();
2178 if (myOverlappedElementList->getNumItems() <= 10) {
2179 myOverlappedElementList->setHeight(23 * myOverlappedElementList->getNumItems());
2181 myOverlappedElementList->setHeight(230);
2183 myOverlappedElementList->recalc();
2191 for (
int i = 0; i < myOverlappedElementList->getNumItems(); i++) {
2192 if (myOverlappedElementList->getItem(i)->isSelected()) {
2195 myCurrentIndexButton->setText((
toString(myItemIndex + 1) +
" / " +
toString(myOverlappedACs.size())).c_str());
2197 myFrameParent->selectedOverlappedElement(myOverlappedACs.at(myItemIndex));
2209 FXDialogBox* helpDialog =
new FXDialogBox(getCollapsableFrame(),
"GEO attributes Help",
GUIDesignDialogBox);
2210 std::ostringstream help;
2212 <<
" - Click in the same position\n"
2213 <<
" for inspect next element\n"
2214 <<
" - Shift + Click in the same\n"
2215 <<
" position for inspect\n"
2216 <<
" previous element";
2220 helpDialog->create();
2227 myFrameParent(nullptr),
2228 myPreviousElement(nullptr),
2229 myCurrentIndexButton(nullptr),
2230 myNextElement(nullptr),
2231 myOverlappedElementList(nullptr),
2232 myHelpButton(nullptr),
2250 myOverlappedElementList->hide();
2261 myFromBusStop(
nullptr),
2262 myToBusStop(
nullptr),
2263 myConflictVClass(
false),
2264 myConflictDisconnected(
false) {
2266 if (edge->getNBEdge()->getNumLanesThatAllow(vClass) == 0) {
2267 myConflictVClass =
true;
2273 myFromBusStop(nullptr),
2274 myToBusStop(nullptr),
2275 myConflictVClass(false),
2276 myConflictDisconnected(false) {
2292 const std::vector<GNEEdge*>&
2299 return myFromBusStop;
2310 return myConflictVClass;
2316 return myConflictDisconnected;
2321 myFromBusStop(nullptr),
2322 myToBusStop(nullptr),
2323 myConflictVClass(false),
2324 myConflictDisconnected(false) {
2351 "SHIFT-click: ignore vClass",
2355 "CTRL-click: add disconnected",
2359 "BACKSPACE: undo click",
2370 bool showPathCreator =
true;
2372 abortPathCreation();
2374 myFinishCreationButton->disable();
2375 myAbortCreationButton->disable();
2376 myRemoveLastInsertedElement->disable();
2381 myCreationMode |= REQUIRE_FIRSTELEMENT;
2385 myCreationMode |= CONSECUTIVE_EDGES;
2387 myCreationMode |= NONCONSECUTIVE_EDGES;
2394 myCreationMode |= SHOW_CANDIDATE_EDGES;
2395 myCreationMode |= START_EDGE;
2396 myCreationMode |= END_EDGE;
2402 myCreationMode |= SINGLE_ELEMENT;
2403 myCreationMode |=
ROUTE;
2409 myCreationMode |= SHOW_CANDIDATE_EDGES;
2410 myCreationMode |= START_EDGE;
2411 myCreationMode |= END_EDGE;
2415 myCreationMode |= START_JUNCTION;
2416 myCreationMode |= END_JUNCTION;
2417 myCreationMode |= ONLY_FROMTO;
2421 myCreationMode |= SHOW_CANDIDATE_EDGES;
2422 myCreationMode |= START_EDGE;
2423 myCreationMode |= END_EDGE;
2429 myCreationMode |= SHOW_CANDIDATE_EDGES;
2430 myCreationMode |= ONLY_FROMTO;
2431 myCreationMode |= START_EDGE;
2432 myCreationMode |= END_EDGE;
2438 myCreationMode |= SHOW_CANDIDATE_EDGES;
2439 myCreationMode |= ONLY_FROMTO;
2440 myCreationMode |= END_BUSSTOP;
2445 myCreationMode |= START_JUNCTION;
2446 myCreationMode |= END_JUNCTION;
2447 myCreationMode |= ONLY_FROMTO;
2451 myCreationMode |= SINGLE_ELEMENT;
2452 myCreationMode |= END_BUSSTOP;
2455 myCreationMode |= SINGLE_ELEMENT;
2456 myCreationMode |= START_EDGE;
2460 myCreationMode |= ONLY_FROMTO;
2461 myCreationMode |= START_EDGE;
2462 myCreationMode |= END_EDGE;
2465 showPathCreator =
false;
2469 if (showPathCreator) {
2471 if (myCreationMode & SHOW_CANDIDATE_EDGES) {
2474 if (myCreationMode & START_JUNCTION) {
2514 if (((myCreationMode & START_JUNCTION) + (myCreationMode & END_JUNCTION)) == 0) {
2518 if ((myCreationMode & SINGLE_ELEMENT) && (mySelectedJunctions.size() == 1)) {
2522 if (mySelectedJunctions.size() > 0) {
2524 if (mySelectedJunctions.back() == junction) {
2532 if (mySelectedJunctions.size() == 2 && (myCreationMode & Mode::ONLY_FROMTO)) {
2539 mySelectedJunctions.push_back(junction);
2541 myAbortCreationButton->enable();
2543 myFinishCreationButton->enable();
2545 myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo(
"route creation");
2547 if (mySelectedJunctions.size() > 1) {
2548 myRemoveLastInsertedElement->enable();
2550 myRemoveLastInsertedElement->disable();
2555 updateInfoRouteLabel();
2557 updateJunctionColors();
2565 if (((myCreationMode & CONSECUTIVE_EDGES) + (myCreationMode & NONCONSECUTIVE_EDGES) +
2566 (myCreationMode & START_EDGE) + (myCreationMode & END_EDGE)) == 0) {
2570 if ((myCreationMode & SINGLE_ELEMENT) && (mySelectedEdges.size() == 1)) {
2574 if (mySelectedEdges.size() > 0) {
2576 if (mySelectedEdges.back() == edge) {
2583 if (myCreationMode & Mode::CONSECUTIVE_EDGES) {
2585 const auto& outgoingEdges = mySelectedEdges.back()->getToJunction()->getGNEOutgoingEdges();
2586 if (std::find(outgoingEdges.begin(), outgoingEdges.end(), edge) == outgoingEdges.end()) {
2595 if (mySelectedEdges.size() == 2 && (myCreationMode & Mode::ONLY_FROMTO)) {
2604 if (!shiftKeyPressed) {
2606 WRITE_WARNING(
"Invalid edge (SHIFT + click to add an invalid vClass edge)");
2611 if (!controlKeyPressed) {
2613 WRITE_WARNING(
"Invalid edge (CONTROL + click to add a disconnected edge)");
2620 mySelectedEdges.push_back(edge);
2622 myAbortCreationButton->enable();
2624 myFinishCreationButton->enable();
2626 myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo(
"route creation");
2628 if (mySelectedEdges.size() > 1) {
2629 myRemoveLastInsertedElement->enable();
2631 myRemoveLastInsertedElement->disable();
2636 updateInfoRouteLabel();
2643 const std::vector<GNEEdge*>&
2645 return mySelectedEdges;
2649 const std::vector<GNEJunction*>&
2651 return mySelectedJunctions;
2658 if ((myCreationMode & END_BUSSTOP) == 0) {
2662 if (myToStoppingPlace) {
2665 myToStoppingPlace = stoppingPlace;
2668 myAbortCreationButton->enable();
2670 myFinishCreationButton->enable();
2672 myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->disableUndoRedo(
"route creation");
2674 if (myToStoppingPlace) {
2675 myRemoveLastInsertedElement->enable();
2677 myRemoveLastInsertedElement->disable();
2682 updateInfoRouteLabel();
2691 if (myToStoppingPlace && (myToStoppingPlace->getTagProperty().getTag() == expectedTag)) {
2692 return myToStoppingPlace;
2702 if ((myCreationMode &
ROUTE) == 0) {
2713 updateInfoRouteLabel();
2725 updateInfoRouteLabel();
2736 const std::vector<GNEFrameModules::PathCreator::Path>&
2744 return (myShowCandidateEdges->getCheck() == TRUE);
2751 for (
const auto& junction : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getJunctions()) {
2752 junction.second->resetCandidateFlags();
2753 junction.second->setPossibleCandidate(
true);
2756 if (mySelectedJunctions.size() > 0) {
2758 for (
const auto& junction : mySelectedJunctions) {
2759 junction->resetCandidateFlags();
2760 junction->setSourceCandidate(
true);
2763 mySelectedJunctions.back()->resetCandidateFlags();
2764 mySelectedJunctions.back()->setTargetCandidate(
true);
2767 myFrameParent->myViewNet->updateViewNet();
2776 if (mySelectedEdges.size() > 0) {
2778 if ((myShowCandidateEdges->getCheck() == TRUE) && (myCreationMode & SHOW_CANDIDATE_EDGES)) {
2780 for (
const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2781 edge.second->setConflictedCandidate(
true);
2784 setSpecialCandidates(mySelectedEdges.back());
2786 for (
const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2787 edge.second->setConflictedCandidate(
true);
2790 setPossibleCandidates(mySelectedEdges.back(), myVClass);
2793 for (
const auto& edge : mySelectedEdges) {
2794 edge->resetCandidateFlags();
2795 edge->setSourceCandidate(
true);
2798 mySelectedEdges.back()->resetCandidateFlags();
2799 mySelectedEdges.back()->setTargetCandidate(
true);
2800 }
else if (myShowCandidateEdges->getCheck() == TRUE && (myCreationMode & SHOW_CANDIDATE_EDGES)) {
2802 for (
const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2803 if (edge.second->getNBEdge()->getNumLanesThatAllow(myVClass) > 0) {
2804 edge.second->setPossibleCandidate(
true);
2806 edge.second->setSpecialCandidate(
true);
2811 myFrameParent->myViewNet->updateViewNet();
2818 for (
const auto& junction : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getJunctions()) {
2819 junction.second->resetCandidateFlags();
2827 for (
const auto& edge : myFrameParent->myViewNet->getNet()->getAttributeCarriers()->getEdges()) {
2828 edge.second->resetCandidateFlags();
2835 const double lineWidth = 0.35;
2836 const double lineWidthin = 0.25;
2840 glTranslated(0, 0,
GLO_MAX - 0.1);
2842 if (myPath.size() > 0) {
2846 for (
int i = 0; i < (int)myPath.size(); i++) {
2850 for (
int j = 0; j < (int)path.
getSubPath().size(); j++) {
2852 if (((i == 0) && (j == 0)) || (j > 0)) {
2856 if ((j + 1) < (
int)path.
getSubPath().size()) {
2866 glTranslated(0, 0, 0.1);
2868 for (
int i = 0; i < (int)myPath.size(); i++) {
2872 if ((myCreationMode & SHOW_CANDIDATE_EDGES) == 0) {
2882 for (
int j = 0; j < (int)path.
getSubPath().size(); j++) {
2884 if (((i == 0) && (j == 0)) || (j > 0)) {
2888 if ((j + 1) < (
int)path.
getSubPath().size()) {
2898 }
else if (mySelectedJunctions.size() > 0) {
2902 for (
int i = 0; i < (int)mySelectedJunctions.size() - 1; i++) {
2904 const Position posA = mySelectedJunctions.at(i)->getPositionInView();
2905 const Position posB = mySelectedJunctions.at(i + 1)->getPositionInView();
2906 const double rot = ((double)atan2((posB.
x() - posA.
x()), (posA.
y() - posB.
y())) * (double) 180.0 / (
double)
M_PI);
2920 myFrameParent->createPath();
2927 if ((mySelectedJunctions.size() > 0) || (mySelectedEdges.size() > 0) || myToStoppingPlace || myRoute) {
2929 myFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->enableUndoRedo();
2933 myFinishCreationButton->disable();
2934 myAbortCreationButton->disable();
2935 myRemoveLastInsertedElement->disable();
2937 updateInfoRouteLabel();
2939 updateJunctionColors();
2943 myFrameParent->getViewNet()->updateViewNet();
2950 if (mySelectedEdges.size() > 1) {
2952 mySelectedEdges.back()->resetCandidateFlags();
2954 mySelectedEdges.pop_back();
2956 if ((mySelectedEdges.size() > 0) && mySelectedEdges.back()->isSourceCandidate()) {
2957 mySelectedEdges.back()->setSourceCandidate(
false);
2958 mySelectedEdges.back()->setTargetCandidate(
true);
2961 if (mySelectedEdges.size() > 1) {
2962 myRemoveLastInsertedElement->enable();
2964 myRemoveLastInsertedElement->disable();
2969 updateInfoRouteLabel();
2971 updateJunctionColors();
2975 myFrameParent->myViewNet->updateViewNet();
2991 abortPathCreation();
2999 removeLastElement();
3007 if (myShowCandidateEdges->getCheck() == TRUE) {
3008 myShiftLabel->show();
3009 myControlLabel->show();
3011 myShiftLabel->hide();
3012 myControlLabel->hide();
3024 if (myPath.size() > 0) {
3029 for (
const auto& path : myPath) {
3030 for (
const auto& edge : path.getSubPath()) {
3031 length += edge->getNBEdge()->getLength();
3032 speed += edge->getNBEdge()->getSpeed();
3034 pathSize += (int)path.getSubPath().size();
3037 std::ostringstream information;
3039 <<
"- Selected edges: " <<
toString(mySelectedEdges.size()) <<
"\n"
3040 <<
"- Path edges: " <<
toString(pathSize) <<
"\n"
3041 <<
"- Length: " <<
toString(length) <<
"\n"
3042 <<
"- Average speed: " <<
toString(speed / pathSize);
3044 myInfoRouteLabel->setText(information.str().c_str());
3046 myInfoRouteLabel->setText(
"No edges selected");
3054 clearJunctionColors();
3057 mySelectedJunctions.clear();
3058 mySelectedEdges.clear();
3059 myToStoppingPlace =
nullptr;
3064 updateInfoRouteLabel();
3073 std::vector<GNEEdge*> edges;
3076 edges = myRoute->getParentEdges();
3079 for (
const auto& edge : mySelectedEdges) {
3080 edges.push_back(edge);
3083 if (myToStoppingPlace) {
3084 edges.push_back(myToStoppingPlace->getParentLanes().front()->getParentEdge());
3088 if (edges.size() == 1) {
3089 myPath.push_back(
Path(myVClass, edges.front()));
3092 for (
int i = 1; i < (int)edges.size(); i++) {
3093 myPath.push_back(
Path(myFrameParent->getViewNet(), myVClass, edges.at(i - 1), edges.at(i)));
3102 myFrameParent->getViewNet()->getNet()->getPathManager()->getPathCalculator()->calculateReachability(
SVC_PEDESTRIAN, originEdge);
3104 for (
const auto& edge : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
3105 for (
const auto& lane : edge.second->getLanes()) {
3106 if (lane->getReachability() > 0) {
3107 lane->getParentEdge()->resetCandidateFlags();
3108 lane->getParentEdge()->setSpecialCandidate(
true);
3117 myFrameParent->getViewNet()->getNet()->getPathManager()->getPathCalculator()->calculateReachability(vClass, originEdge);
3119 for (
const auto& edge : myFrameParent->getViewNet()->getNet()->getAttributeCarriers()->getEdges()) {
3120 for (
const auto& lane : edge.second->getLanes()) {
3121 if (lane->getReachability() > 0) {
3122 lane->getParentEdge()->resetCandidateFlags();
3123 lane->getParentEdge()->setPossibleCandidate(
true);
3136 FXLabel* legendLabel =
nullptr;
3180 FXLabel* colorLabel =
new FXLabel(horizontalFrameColors,
"",
nullptr,
GUIDesignLabelLeft);
FXDEFMAP(GNEFrameModules::TagSelector) TagSelectorMap[]
@ MID_GNE_DELETE
delete element
@ MID_GNE_OVERLAPPED_PREVIOUS
inspect previous element in overlapped modul
@ MID_GNE_TAG_SELECTED
tag selected in ComboBox
@ MID_GNE_OVERLAPPED_ITEMSELECTED
list item selected in overlapped modul
@ MID_GNE_CENTER
center element
@ MID_GNE_EDGEPATH_FINISH
finish edge path creation
@ MID_GNE_ACHIERARCHY_SHOWCHILDMENU
In HierarchicalElementTree list, show child menu.
@ MID_GNE_STARTDRAWING
start drawing polygon
@ MID_GNE_ACHIERARCHY_MOVEUP
In HierarchicalElementTree list, move element to up.
@ MID_GNE_OVERLAPPED_SHOWLIST
show list of overlapped elements
@ MID_GNE_EDGEPATH_REMOVELAST
remove last inserted element in path
@ MID_GNE_INSPECT
inspect element
@ MID_GNE_OVERLAPPED_NEXT
inspect next element in overlapped modul
@ MID_GNE_ABORTDRAWING
abort drawing polygon
@ MID_GNE_ACHIERARCHY_MOVEDOWN
In HierarchicalElementTree list, move element to down.
@ MID_GNE_EDGEPATH_SHOWCANDIDATES
enable or disable show path candidates
@ MID_GNE_STOPDRAWING
stop drawing polygon
@ MID_GNE_EDGEPATH_ABORT
abort edge path creation
@ MID_GNE_SET_TYPE
used to select a type of element in a combo box
#define GUIDesignLabelLeft
#define GUIDesignComboBox
#define GUIDesignListFixedHeight
design for FXLists with height fixed
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignDialogBox
#define GUIDesignButtonRectangular
little button rectangula used in frames (For example, in "help" buttons)
#define GUIDesignLabelLeftThick
label extended over frame with thick and with text justify to left
#define GUIDesignButtonIconRectangular
button only with icon
#define GUIDesignLabelFrameThicked
label extended over frame without thick and with text justify to left, used to show information in fr...
#define GUIDesignListSingleElementFixedHeight
design for FXLists that only allow a single selected elements selected and height fixed
#define GUIDesignButtonOK
#define GUIDesignLabelCenterThick
label extended over frame with thick and with text justify to center
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignTreeListDinamic
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
GUIIcon
An enumeration of icons used by the gui applications.
#define WRITE_WARNING(msg)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_PASSENGER
vehicle is a passenger car (a "normal" car)
@ SVC_PEDESTRIAN
pedestrian
const std::string DEFAULT_TAXITYPE_ID
const std::string DEFAULT_PEDTYPE_ID
const std::set< std::string > DEFAULT_VTYPES
const std::string DEFAULT_VTYPE_ID
const std::string DEFAULT_CONTAINERTYPE_ID
const std::string DEFAULT_BIKETYPE_ID
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_TRIP_JUNCTIONS
a trip between junctions (used in NETEDIT)
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
@ GNE_TAG_PERSONTRIP_JUNCTIONS
@ SUMO_TAG_REROUTER
A rerouter.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_ROUTEPROBE
a routeprobe detector
@ GNE_TAG_TRANSPORT_CONTAINERSTOP
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_E2DETECTOR
an e2 detector
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ GNE_TAG_PERSONTRIP_BUSSTOP
@ SUMO_TAG_NOTHING
invalid tag
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
@ GNE_TAG_STOPCONTAINER_EDGE
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ GNE_TAG_FLOW_CALIBRATOR
a flow definition within in Calibrator
@ SUMO_TAG_LANECALIBRATOR
A calibrator placed over lane (used in netedit)
@ GNE_TAG_STOPPERSON_BUSSTOP
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_VEHICLE
description of a vehicle
@ GNE_TAG_FLOW_ROUTE
a flow definition using a route instead of a from-to edges route (used in NETEDIT)
@ GNE_TAG_FLOW_JUNCTIONS
a flow between junctions (used in NETEDIT)
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ GNE_TAG_STOPCONTAINER_CONTAINERSTOP
@ GNE_TAG_FLOW_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_FLOW
a flow definitio nusing a from-to edges instead of a route (used by router)
@ SUMO_TAG_CONNECTION
connectio between two lanes
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ GNE_TAG_E2DETECTOR_MULTILANE
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_PARKING_SPACE
A parking space for a single vehicle within a parking area.
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
@ SUMO_TAG_VTYPE_DISTRIBUTION
distribution of a vehicle type
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_VEHICLE_WITHROUTE
description of a vehicle with an embedded route (used in NETEDIT)
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destiny of a reroute
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_E1DETECTOR
an e1 detector
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
@ SUMO_TAG_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ GNE_TAG_PERSONTRIP_EDGE
@ GNE_TAG_ROUTE_EMBEDDED
embedded route (used in NETEDIT)
@ SUMO_TAG_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_E3DETECTOR
an e3 detector
@ SUMO_TAG_VSS
A variable speed sign.
@ GNE_TAG_STOPPERSON_EDGE
@ SUMO_TAG_TRIP
a single trip definition (used by router)
@ GNE_TAG_TRANSHIP_CONTAINERSTOP
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void drawBoxLines(const PositionVector &geom, const std::vector< double > &rots, const std::vector< double > &lengths, double width, int cornerDetail=0, double offset=0)
Draws thick lines.
static void drawBoxLine(const Position &beg, double rot, double visLength, double width, double offset=0)
Draws a thick line.
static void pushMatrix()
push matrix
An Element which don't belongs to GNENet but has influency in the simulation.
static const std::vector< GNETagProperties > getTagPropertiesByType(const int tagPropertyCategory)
get tagProperties associated to the given GNETagProperties::TagType (NETWORKELEMENT,...
virtual const std::string & getID() const =0
return ID of object
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
FXIcon * getIcon() const
get FXIcon associated to this AC
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
GNENet * getNet() const
get pointer to net
A lane area vehicles can halt at (netedit-version)
bool isSpecialCandidate() const
check if this element is a special candidate
bool isPossibleCandidate() const
check if this element is a possible candidate
bool isConflictedCandidate() const
check if this element is a conflicted candidate
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
A lane area vehicles can halt at (netedit-version)
An Element which don't belongs to GNENet but has influency in the simulation.
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
const std::vector< GNEGenericData * > & getGenericDataChildren() const
get generic data children
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
A road/street connecting two junctions (netedit-version)
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
GNEViewNet * getViewNet() const
get view net
long onCmdSelectDemandElement(FXObject *, FXSelector, void *)
DemandElementSelector(GNEFrame *frameParent, SumoXMLTag demandElementTag, GNEDemandElement *defaultElement=nullptr)
FOX-declaration.
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
const std::vector< SumoXMLTag > & getAllowedTags() const
MFXIconComboBox * myDemandElementsMatchBox
comboBox with the list of elements type
void showDemandElementSelector()
show demand element selector
~DemandElementSelector()
destructor
GNEDemandElement * getCurrentDemandElement() const
get current demand element
GNEEdge * getContainerPlanPreviousEdge() const
get previous edge for the current container plan
void refreshDemandElementSelector()
refresh demand element selector
GNEEdge * getPersonPlanPreviousEdge() const
get previous edge for the current person plan
bool isDemandElementSelectorShown() const
check if demand element selector is shown
std::vector< SumoXMLTag > myDemandElementTags
demand element tags
void hideDemandElementSelector()
hide demand element selector
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
long onCmdStartDrawing(FXObject *, FXSelector, void *)
void stopDrawing()
stop drawing and check if shape can be created
bool getDeleteLastCreatedPoint()
get flag delete last created point
FXButton * myAbortDrawingButton
button for abort drawing
FXLabel * myInformationLabel
Label with information.
void abortDrawing()
abort drawing
const PositionVector & getTemporalShape() const
get Temporal shape
void startDrawing()
start drawing
DrawingShape(GNEFrame *frameParent)
FOX-declaration.
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
void hideDrawingShape()
hide Drawing mode
~DrawingShape()
destructor
FXButton * myStartDrawingButton
button for start drawing
void addNewPoint(const Position &P)
add new point to temporal shape
FXButton * myStopDrawingButton
button for stop drawing
void removeLastPoint()
remove last added point
void showDrawingShape()
show Drawing mode
bool isDrawing() const
return true if currently a shape is drawed
void createPopUpMenu(int X, int Y, GNEAttributeCarrier *clickedAC)
FXTreeListDinamic * myTreeListDinamic
tree list dinamic to show the children of the element to erase
FXTreeItem * addListItem(GNEAttributeCarrier *AC, FXTreeItem *itemParent=nullptr, std::string prefix="", std::string sufix="")
add item into list
void showHierarchicalElementChildren(GNEHierarchicalElement *HE, FXTreeItem *itemParent)
show children of given hierarchical element
~HierarchicalElementTree()
destructor
long onCmdMoveItemDown(FXObject *, FXSelector, void *)
called when user click over option "Move down" of child menu
long onCmdCenterItem(FXObject *, FXSelector, void *)
called when user click over option "center" of child Menu
long onCmdShowChildMenu(FXObject *, FXSelector, void *data)
void hideHierarchicalElementTree()
hide HierarchicalElementTree
void refreshHierarchicalElementTree()
refresh HierarchicalElementTree
void removeCurrentEditedAttributeCarrier(const GNEAttributeCarrier *HE)
if given AttributeCarrier is the same of myHE, set it as nullptr
long onCmdInspectItem(FXObject *, FXSelector, void *)
called when user click over option "inspect" of child menu
long onCmdDeleteItem(FXObject *, FXSelector, void *)
called when user click over option "delete" of child menu
long onCmdMoveItemUp(FXObject *, FXSelector, void *)
called when user click over option "Move up" of child menu
HierarchicalElementTree(GNEFrame *frameParent)
FOX-declaration.
void showHierarchicalElementTree(GNEAttributeCarrier *AC)
show HierarchicalElementTree
FXTreeItem * showAttributeCarrierParents()
show child of current attributeCarrier
~OverlappedInspection()
destructor
OverlappedInspection()
FOX needs this.
long onCmdListItemSelected(FXObject *, FXSelector, void *)
called when a list item is selected
long onCmdShowList(FXObject *, FXSelector, void *)
show list of overlapped elements
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
long onCmdOverlappingHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
long onCmdNextElement(FXObject *, FXSelector, void *)
Inspect next Element (from top to bot)
void buildFXElements()
build Fox Toolkit elemements
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
int getNumberOfOverlappedACs() const
get number of overlapped ACSs
long onCmdPreviousElement(FXObject *, FXSelector, void *)
Inspect previous element (from top to bot)
void hideOverlappedInspection()
hide template editor
bool previousElement(const Position &clickedPosition)
try to go to previous element if clicked position is near to saved position
bool nextElement(const Position &clickedPosition)
try to go to next element if clicked position is near to saved position
GNEAdditional * getToBusStop() const
to additional
Path()
default constructor
bool isConflictVClass() const
check if current path is conflict due vClass
bool myConflictDisconnected
flag to mark this path as disconnected
std::vector< GNEEdge * > mySubPath
sub path
bool myConflictVClass
flag to mark this path as conflicted
GNEAdditional * getFromBusStop() const
get from additional
bool isConflictDisconnected() const
check if current path is conflict due is disconnected
const std::vector< GNEEdge * > & getSubPath() const
get sub path
void setVClass(SUMOVehicleClass vClass)
set vClass
const std::vector< Path > & getPath() const
get path route
void removeRoute()
remove route
GNEFrame * myFrameParent
current frame parent
FXButton * myAbortCreationButton
button for abort route creation
PathCreator(GNEFrame *frameParent)
default constructor
void recalculatePath()
recalculate path
GNEAdditional * getToStoppingPlace(SumoXMLTag expectedTag) const
get to stoppingPlace
bool addEdge(GNEEdge *edge, const bool shiftKeyPressed, const bool controlKeyPressed)
add edge
FXButton * myFinishCreationButton
button for finish route creation
int myCreationMode
current creation mode
void abortPathCreation()
abort path creation
void hidePathCreatorModule()
show PathCreator
long onCmdShowCandidateEdges(FXObject *, FXSelector, void *)
Called when the user click over check button "show candidate edges".
FXLabel * myInfoRouteLabel
label with route info
SUMOVehicleClass getVClass() const
get vClass
long onCmdCreatePath(FXObject *, FXSelector, void *)
GNEAdditional * myToStoppingPlace
to additional (usually a busStop)
long onCmdAbortPathCreation(FXObject *, FXSelector, void *)
Called when the user click over button "Abort route creation".
void setSpecialCandidates(GNEEdge *originEdge)
set special candidates (This function will be called recursively)
FXButton * myRemoveLastInsertedElement
button for removing last inserted element
void clearEdgeColors()
clear edge colors
void updateInfoRouteLabel()
update InfoRouteLabel
void setPossibleCandidates(GNEEdge *originEdge, const SUMOVehicleClass vClass)
set edgereachability (This function will be called recursively)
FXCheckButton * myShowCandidateEdges
CheckBox for show candidate edges.
void updateJunctionColors()
update junction colors
GNEDemandElement * myRoute
route (usually a busStop)
GNEDemandElement * getRoute() const
get route
void clearPath()
clear edges (and restore colors)
const std::vector< GNEEdge * > & getSelectedEdges() const
get current selected edges
FXLabel * myControlLabel
label for control information
void clearJunctionColors()
clear junction colors
bool drawCandidateEdgesWithSpecialColor() const
draw candidate edges with special color (Only for candidates, special and conflicted)
FXLabel * myShiftLabel
label for shift information
void removeLastElement()
remove path element
SUMOVehicleClass myVClass
current vClass
void updateEdgeColors()
update edge colors
bool addRoute(GNEDemandElement *route, const bool shiftKeyPressed, const bool controlKeyPressed)
add route
bool addJunction(GNEJunction *junction, const bool shiftKeyPressed, const bool controlKeyPressed)
add junction
const std::vector< GNEJunction * > & getSelectedJunctions() const
get current selected junctions
void createPath()
create path
void drawTemporalRoute(const GUIVisualizationSettings &s) const
draw temporal route
long onCmdRemoveLastElement(FXObject *, FXSelector, void *)
Called when the user click over button "Remove las inserted edge".
bool addStoppingPlace(GNEAdditional *stoppingPlace, const bool shiftKeyPressed, const bool controlKeyPressed)
add stoppingPlace
void showPathCreatorModule(SumoXMLTag element, const bool firstElement, const bool consecutives)
show PathCreator for the given tag
PathLegend(GNEFrame *frameParent)
constructor
void hidePathLegendModule()
hide Legend modul
void showPathLegendModule()
show Legend modul
SelectorParent(GNEFrame *frameParent)
constructor
void setIDSelected(const std::string &id)
select manually a element of the list
FXLabel * myParentsLabel
Label with parent name.
FXList * myParentsList
List of parents.
std::string getIdSelected() const
get currently parent additional selected
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
~SelectorParent()
destructor
void hideSelectorParentModule()
hide SelectorParent Module
bool showSelectorParentModule(const std::vector< SumoXMLTag > &additionalTypeParents)
Show list of SelectorParent Module.
GNEAttributeCarrier * getAC() const
get template AC
GNEAttributeCarrier * myAC
editedAC
ACTemplate(GNENet *net, const GNETagProperties tagProperty)
constructor
void hideTagSelector()
hide item selector
long onCmdSelectTag(FXObject *, FXSelector, void *)
GNEAttributeCarrier * getTemplateAC(SumoXMLTag ACTag) const
get templateAC
void setCurrentTag(SumoXMLTag newTag, const bool notifyFrameParent=true)
set current type manually
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEFrame * myFrameParent
pointer to Frame Parent
void setCurrentTagType(GNETagProperties::TagType tagType, const bool onlyDrawables, const bool notifyFrameParent=true)
set current type manually
std::vector< ACTemplate * > myACTemplates
list with ACTemplates
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
void showTagSelector()
show item selector
static FXLabel * buildRainbow(FXComposite *parent)
build rainbow in frame modul
An Element which don't belongs to GNENet but has influency in the simulation.
GNEDataInterval * getDataIntervalParent() const
get data interval parent
const std::vector< GNETAZElement * > & getChildTAZElements() const
get child TAZElements
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNELane * > & getChildLanes() const
get child lanes
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
const std::vector< GNEShape * > & getChildShapes() const
get child shapes
const std::vector< GNETAZElement * > & getParentTAZElements() const
get parent TAZElements
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
const std::vector< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
bool exist(const GNELane *toLane) const
check if exist a lane2lane geometry for the given tolane
const GUIGeometry & getLane2laneGeometry(const GNELane *toLane) const
get lane2lane geometry
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
const GNELane2laneConnection & getLane2laneConnections() const
get Lane2laneConnection struct
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
GNEEdge * getParentEdge() const
get arent edge
GNETAZElement * retrieveTAZElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named TAZElement.
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
GNEShape * retrieveShape(SumoXMLTag, const std::string &id, bool hardFail=true) const
Returns the named shape.
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
A NBNetBuilder extended by visualisation and editing capabilities.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEPathManager * getPathManager()
get path manager
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
const std::string & getID() const
get ID
A lane area vehicles can park at (netedit-version)
vehicle space used by GNEParkingAreas
std::vector< GNEEdge * > calculateDijkstraPath(const SUMOVehicleClass vClass, const std::vector< GNEEdge * > &partialEdges) const
calculate Dijkstra path between a list of partial edges
PathCalculator * getPathCalculator()
obtain instance of PathCalculator
Representation of a RouteProbe in netedit.
An Element which don't belongs to GNENet but has influency in the simulation.
bool isShape() const
return true if tag correspond to a shape
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isNetworkElement() const
return true if tag correspond to a network element
bool isDataElement() const
return true if tag correspond to a data element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element
Representation of a vaporizer in netedit.
class used to group all variables related with objects under cursor after a click over view
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
GNENet * getNet() const
get the net object
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
const PositionVector & getShape() const
The shape of the additional element.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings
Stores the information about how to visualize structures.
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
const std::string & getProjString() const
Returns the original projection definition.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
A point in 2D or 3D with translation and scaling methods.
double distanceTo2D(const Position &p2) const
returns the euclidean distance in the x-y-plane
double x() const
Returns the x-position.
double y() const
Returns the y-position.
static const RGBColor WHITE
static const RGBColor GREY
static const RGBColor ORANGE
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors
static const RGBColor special
color for selected special candidate element (Usually selected using shift+click)
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source