98 if (selected && (myViewNet->getViewParent()->getGNEAppWindows()->getLockMenuCommands().menuCheckLockSelectedElements->getCheck() == TRUE)) {
105 return myLockedElements.at(
GLO_WIRE).lock;
108 return myLockedElements.at(
GLO_ROUTE).lock;
120 return myLockedElements.at(
GLO_STOP).lock;
122 return myLockedElements.at(objectType).lock;
205 mySupermode(supermode) {
229 myViewObjects.clearElements();
238 std::vector<const GUIGlObject*> edges;
239 for (
const auto& edge : myViewObjects.edges) {
240 edges.push_back(edge);
242 myViewObjects.filterElements(edges);
249 std::vector<const GUIGlObject*> lanes;
250 for (
const auto& lane : myViewObjects.lanes) {
251 lanes.push_back(lane);
253 myViewObjects.filterElements(lanes);
260 std::vector<const GUIGlObject*> shapes;
261 for (
const auto& poly : myViewObjects.polys) {
262 shapes.push_back(poly);
264 for (
const auto&
POI : myViewObjects.POIs) {
265 shapes.push_back(
POI);
267 myViewObjects.filterElements(shapes);
274 std::vector<const GUIGlObject*> additionals;
275 for (
const auto& additional : myViewObjects.additionals) {
278 }
else if (!includeTAZs && (additional->getType() ==
GLO_TAZ)) {
281 additionals.push_back(additional);
284 myViewObjects.filterElements(additionals);
291 std::vector<const GUIGlObject*> demandElements;
292 for (
const auto& demandElement : myViewObjects.demandElements) {
293 if (!includeRoutes && (demandElement->getType() ==
GLO_ROUTE)) {
296 demandElements.push_back(demandElement);
299 myViewObjects.filterElements(demandElements);
305 std::vector<const GUIGlObject*> GUIGlObjects;
307 for (
const auto&
GUIGlObject : myViewObjects.GUIGlObjects) {
313 for (
const auto& ignoredType : ignoreFilter) {
314 auto it = GUIGlObjects.begin();
315 while (it != GUIGlObjects.end()) {
316 if ((*it)->getType() == ignoredType) {
317 it = GUIGlObjects.erase(it);
324 myViewObjects.filterElements(GUIGlObjects);
330 if (myViewObjects.GUIGlObjects.size() > 0) {
331 return myViewObjects.GUIGlObjects.front();
340 if (myViewObjects.attributeCarriers.size() > 0) {
341 return myViewObjects.attributeCarriers.front();
350 if (myViewObjects.networkElements.size() > 0) {
351 return myViewObjects.networkElements.front();
360 if (myViewObjects.additionals.size() > 0) {
361 return myViewObjects.additionals.front();
370 if (myViewObjects.demandElements.size() > 0) {
371 return myViewObjects.demandElements.front();
380 if (myViewObjects.genericDatas.size() > 0) {
381 return myViewObjects.genericDatas.front();
390 if (myViewObjects.junctions.size() > 0) {
391 return myViewObjects.junctions.front();
400 if (myViewObjects.edges.size() > 0) {
401 return myViewObjects.edges.front();
410 if (myViewObjects.lanes.size() > 0) {
411 return myViewObjects.lanes.front();
420 if (myViewObjects.lanes.size() > 0) {
421 for (
auto& lane : myViewObjects.lanes) {
422 if (!(lane->isAttributeCarrierSelected() || lane->getParentEdge()->isAttributeCarrierSelected()) ||
423 !myViewNet->getViewParent()->getGNEAppWindows()->getLockMenuCommands().menuCheckLockSelectedElements->getCheck()) {
435const std::vector<GNELane*>&
437 return myViewObjects.lanes;
443 if (myViewObjects.crossings.size() > 0) {
444 return myViewObjects.crossings.front();
453 if (myViewObjects.walkingAreas.size() > 0) {
454 return myViewObjects.walkingAreas.front();
463 if (myViewObjects.connections.size() > 0) {
464 return myViewObjects.connections.front();
473 if (myViewObjects.internalLanes.size() > 0) {
474 return myViewObjects.internalLanes.front();
483 if (myViewObjects.POIs.size() > 0) {
484 return myViewObjects.POIs.front();
493 if (myViewObjects.polys.size() > 0) {
494 return myViewObjects.polys.front();
503 if (myViewObjects.TAZs.size() > 0) {
504 return myViewObjects.TAZs.front();
513 if (myViewObjects.edgeDatas.size() > 0) {
514 return myViewObjects.edgeDatas.front();
523 if (myViewObjects.edgeRelDatas.size() > 0) {
524 return myViewObjects.edgeRelDatas.front();
533 if (myViewObjects.TAZRelDatas.size() > 0) {
534 return myViewObjects.TAZRelDatas.front();
541const std::vector<GUIGlObject*>&
543 return myViewObjects.GUIGlObjects;
547const std::vector<GNEAttributeCarrier*>&
549 return myViewObjects.attributeCarriers;
553const std::vector<GNEJunction*>&
555 return myViewObjects.junctions;
559const std::vector<GNEEdge*>&
561 return myViewObjects.edges;
564const std::vector<GNETAZ*>&
566 return myViewObjects.TAZs;
569const std::vector<GNEAdditional*>&
571 return myViewObjects.additionals;
574const std::vector<GNEDemandElement*>&
576 return myViewObjects.demandElements;
586 GUIGlObjects.clear();
587 attributeCarriers.clear();
588 networkElements.clear();
590 demandElements.clear();
595 walkingAreas.clear();
597 internalLanes.clear();
601 genericDatas.clear();
603 edgeRelDatas.clear();
610 for (
const auto&
object : objects) {
612 auto itGlObjects = GUIGlObjects.begin();
613 while (itGlObjects != GUIGlObjects.end()) {
614 if (*itGlObjects ==
object) {
615 itGlObjects = GUIGlObjects.erase(itGlObjects);
621 auto itACs = attributeCarriers.begin();
622 while (itACs != attributeCarriers.end()) {
623 if ((*itACs)->getGUIGlObject() == object) {
624 itACs = attributeCarriers.erase(itACs);
630 auto itNetworkElements = networkElements.begin();
631 while (itNetworkElements != networkElements.end()) {
632 if ((*itNetworkElements)->getGUIGlObject() == object) {
633 itNetworkElements = networkElements.erase(itNetworkElements);
639 auto itAdditionals = additionals.begin();
640 while (itAdditionals != additionals.end()) {
641 if ((*itAdditionals)->getGUIGlObject() == object) {
642 itAdditionals = additionals.erase(itAdditionals);
648 auto itDemandElements = demandElements.begin();
649 while (itDemandElements != demandElements.end()) {
650 if ((*itDemandElements)->getGUIGlObject() == object) {
651 itDemandElements = demandElements.erase(itDemandElements);
657 auto itGenericDatas = genericDatas.begin();
658 while (itGenericDatas != genericDatas.end()) {
659 if ((*itGenericDatas)->getGUIGlObject() == object) {
660 itGenericDatas = genericDatas.erase(itGenericDatas);
666 auto itJunctions = junctions.begin();
667 while (itJunctions != junctions.end()) {
668 if ((*itJunctions)->getGUIGlObject() == object) {
669 itJunctions = junctions.erase(itJunctions);
675 auto itEdges = edges.begin();
676 while (itEdges != edges.end()) {
677 if ((*itEdges)->getGUIGlObject() == object) {
678 itEdges = edges.erase(itEdges);
684 auto itLanes = lanes.begin();
685 while (itLanes != lanes.end()) {
686 if ((*itLanes)->getGUIGlObject() == object) {
687 itLanes = lanes.erase(itLanes);
693 auto itCrossings = crossings.begin();
694 while (itCrossings != crossings.end()) {
695 if ((*itCrossings)->getGUIGlObject() == object) {
696 itCrossings = crossings.erase(itCrossings);
702 auto itWalkingAreas = walkingAreas.begin();
703 while (itWalkingAreas != walkingAreas.end()) {
704 if ((*itWalkingAreas)->getGUIGlObject() == object) {
705 itWalkingAreas = walkingAreas.erase(itWalkingAreas);
711 auto itConnections = connections.begin();
712 while (itConnections != connections.end()) {
713 if ((*itConnections)->getGUIGlObject() == object) {
714 itConnections = connections.erase(itConnections);
720 auto itInternalLanes = internalLanes.begin();
721 while (itInternalLanes != internalLanes.end()) {
722 if ((*itInternalLanes)->getGUIGlObject() == object) {
723 itInternalLanes = internalLanes.erase(itInternalLanes);
729 auto itTAZs = TAZs.begin();
730 while (itTAZs != TAZs.end()) {
731 if ((*itTAZs)->getGUIGlObject() == object) {
732 itTAZs = TAZs.erase(itTAZs);
738 auto itPOIs = POIs.begin();
739 while (itPOIs != POIs.end()) {
740 if ((*itPOIs)->getGUIGlObject() == object) {
741 itPOIs = POIs.erase(itPOIs);
747 auto itPolys = polys.begin();
748 while (itPolys != polys.end()) {
749 if ((*itPolys)->getGUIGlObject() == object) {
750 itPolys = polys.erase(itPolys);
756 auto itEdgeDatas = edgeDatas.begin();
757 while (itEdgeDatas != edgeDatas.end()) {
758 if ((*itEdgeDatas)->getGUIGlObject() == object) {
759 itEdgeDatas = edgeDatas.erase(itEdgeDatas);
765 auto itEdgeRelDatas = edgeRelDatas.begin();
766 while (itEdgeRelDatas != edgeRelDatas.end()) {
767 if ((*itEdgeRelDatas)->getGUIGlObject() == object) {
768 itEdgeRelDatas = edgeRelDatas.erase(itEdgeRelDatas);
774 auto itTAZRelDatas = TAZRelDatas.begin();
775 while (itTAZRelDatas != TAZRelDatas.end()) {
776 if ((*itTAZRelDatas)->getGUIGlObject() == object) {
777 itTAZRelDatas = TAZRelDatas.erase(itTAZRelDatas);
789 const auto frontGLObject = myViewNet->getFrontGLObject();
796 if (glObject == frontGLObject) {
813 auto edge = myViewNet->getNet()->getAttributeCarriers()->retrieveEdge(glObject->
getMicrosimID());
815 if (glObject == frontGLObject) {
817 container.
edges.insert(container.
edges.begin(), edge);
823 container.
edges.push_back(edge);
832 auto lane = myViewNet->getNet()->getAttributeCarriers()->retrieveLane(glObject);
834 if (glObject == frontGLObject) {
836 container.
lanes.insert(container.
lanes.begin(), lane);
842 container.
lanes.push_back(lane);
851 auto crossing = myViewNet->getNet()->getAttributeCarriers()->retrieveCrossing(glObject);
853 if (glObject == frontGLObject) {
870 auto walkingArea = myViewNet->getNet()->getAttributeCarriers()->retrieveWalkingArea(glObject);
872 if (glObject == frontGLObject) {
889 auto connection = myViewNet->getNet()->getAttributeCarriers()->retrieveConnection(glObject);
891 if (glObject == frontGLObject) {
908 auto internalLane = myViewNet->getNet()->getAttributeCarriers()->retrieveInternalLane(glObject);
910 if (glObject == frontGLObject) {
932 auto additionalElement = myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject,
false);
933 if (additionalElement) {
935 if (additionalElement == myViewNet->getFrontAttributeCarrier()) {
942 container.
additionals.push_back(additionalElement);
955 auto POI =
dynamic_cast<GNEPOI*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
957 if (glObject == myViewNet->getFrontGLObject()) {
959 container.
POIs.insert(container.
POIs.begin(),
POI);
966 auto poly =
dynamic_cast<GNEPoly*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
968 if (glObject == myViewNet->getFrontGLObject()) {
970 container.
polys.insert(container.
polys.begin(), poly);
973 container.
polys.push_back(poly);
984 auto TAZ =
dynamic_cast<GNETAZ*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
986 if (glObject == myViewNet->getFrontGLObject()) {
988 container.
TAZs.insert(container.
TAZs.begin(),
TAZ);
1001 if (demandElement) {
1003 if (demandElement == myViewNet->getFrontAttributeCarrier()) {
1021 switch (glObject->
getType()) {
1024 auto edgeData =
dynamic_cast<GNEEdgeData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1026 if (glObject == myViewNet->getFrontGLObject()) {
1034 container.
edgeDatas.push_back(edgeData);
1043 auto edgeRelData =
dynamic_cast<GNEEdgeRelData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1045 if (glObject == myViewNet->getFrontGLObject()) {
1062 auto TAZRelData =
dynamic_cast<GNETAZRelData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1064 if (glObject == myViewNet->getFrontGLObject()) {
1088 for (
const auto& glObjectLayer : objectsContainer) {
1089 for (
const auto& glObject : glObjectLayer.second) {
1091 updateNetworkElements(myViewObjects, glObject.object);
1092 updateAdditionalElements(myViewObjects, glObject.object);
1093 updateShapeElements(myViewObjects, glObject.object);
1094 updateTAZElements(myViewObjects, glObject.object);
1095 updateDemandElements(myViewObjects, glObject.object);
1096 updateGenericDataElements(myViewObjects, glObject.object);
1103 myViewNet(nullptr) {
1111 myEventInfo(nullptr) {
1117 myEventInfo = (FXEvent*) eventData;
1124 return (myEventInfo->state & SHIFTMASK) != 0;
1134 return (myEventInfo->state & CONTROLMASK) != 0;
1144 return (myEventInfo->state & ALTMASK) != 0;
1154 return (myEventInfo->state & LEFTBUTTONMASK) != 0;
1164 return (myEventInfo->state & RIGHTBUTTONMASK) != 0;
1175 myViewNet(viewNet) {
1182 myRelativeClickedPosition = myViewNet->getPositionInformation();
1184 const GNENetworkElement* editedElement = myViewNet->myEditNetworkElementShapes.getEditedNetworkElement();
1186 if (myViewNet->myViewObjectsSelector.getJunctionFront() && (myViewNet->myViewObjectsSelector.getJunctionFront() == editedElement)) {
1188 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getJunctionFront()->getMoveOperation();
1190 if (moveOperation) {
1191 myMoveOperation = moveOperation;
1196 }
else if (myViewNet->myViewObjectsSelector.getLaneFront() && (myViewNet->myViewObjectsSelector.getLaneFront() == editedElement)) {
1198 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getLaneFront()->getMoveOperation();
1200 if (moveOperation) {
1201 myMoveOperation = moveOperation;
1206 }
else if (myViewNet->myViewObjectsSelector.getCrossingFront() && (myViewNet->myViewObjectsSelector.getCrossingFront() == editedElement)) {
1208 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getCrossingFront()->getMoveOperation();
1210 if (moveOperation) {
1211 myMoveOperation = moveOperation;
1216 }
else if (myViewNet->myViewObjectsSelector.getConnectionFront() && (myViewNet->myViewObjectsSelector.getConnectionFront() == editedElement)) {
1218 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getConnectionFront()->getMoveOperation();
1220 if (moveOperation) {
1221 myMoveOperation = moveOperation;
1226 }
else if (myViewNet->myViewObjectsSelector.getWalkingAreaFront() && (myViewNet->myViewObjectsSelector.getWalkingAreaFront() == editedElement)) {
1228 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getWalkingAreaFront()->getMoveOperation();
1230 if (moveOperation) {
1231 myMoveOperation = moveOperation;
1246 myRelativeClickedPosition = myViewNet->getPositionInformation();
1248 const GNEAttributeCarrier* frontAC = myViewNet->myViewObjectsSelector.getAttributeCarrierFront();
1250 if (myViewNet->myViewObjectsSelector.getPolyFront() && (frontAC == myViewNet->myViewObjectsSelector.getPolyFront())) {
1252 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getPolyFront()->getMoveOperation();
1254 if (moveOperation) {
1255 myMoveOperation = moveOperation;
1260 }
else if (myViewNet->myViewObjectsSelector.getPOIFront() && (frontAC == myViewNet->myViewObjectsSelector.getPOIFront())) {
1262 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getPOIFront()->getMoveOperation();
1264 if (moveOperation) {
1265 myMoveOperation = moveOperation;
1270 }
else if (myViewNet->myViewObjectsSelector.getAdditionalFront() && (frontAC == myViewNet->myViewObjectsSelector.getAdditionalFront())) {
1272 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getAdditionalFront()->getMoveOperation();
1274 if (moveOperation) {
1275 myMoveOperation = moveOperation;
1280 }
else if (myViewNet->myViewObjectsSelector.getJunctionFront() && (frontAC == myViewNet->myViewObjectsSelector.getJunctionFront())) {
1282 if (myViewNet->myViewObjectsSelector.getEdgeFront() && (myViewNet->myViewObjectsSelector.getEdgeFront()->clickedOverGeometryPoint(myRelativeClickedPosition))) {
1284 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getEdgeFront()->getMoveOperation();
1286 if (moveOperation) {
1287 myMoveOperation = moveOperation;
1294 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getJunctionFront()->getMoveOperation();
1296 if (moveOperation) {
1297 myMoveOperation = moveOperation;
1303 }
else if (myViewNet->myViewObjectsSelector.getEdgeFront() && (frontAC == myViewNet->myViewObjectsSelector.getEdgeFront())) {
1305 if (myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1307 myViewNet->myViewObjectsSelector.getEdgeFront()->editEndpoint(myViewNet->getPositionInformation(), myViewNet->myUndoList);
1312 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getEdgeFront()->getMoveOperation();
1314 if (moveOperation) {
1315 myMoveOperation = moveOperation;
1321 }
else if (myViewNet->myViewObjectsSelector.getLaneFront() && (frontAC == myViewNet->myViewObjectsSelector.getLaneFront())) {
1323 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getLaneFront()->getMoveOperation();
1325 if (moveOperation) {
1326 myMoveOperation = moveOperation;
1341 myRelativeClickedPosition = myViewNet->getPositionInformation();
1343 const GNEAttributeCarrier* frontAC = myViewNet->myViewObjectsSelector.getAttributeCarrierFront();
1345 if (myViewNet->myViewObjectsSelector.getDemandElementFront() && (frontAC == myViewNet->myViewObjectsSelector.getDemandElementFront())) {
1347 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getDemandElementFront()->getMoveOperation();
1349 if (moveOperation) {
1350 myMoveOperation = moveOperation;
1365 if (myMoveOperation) {
1369 if (mouseLeftButtonPressed) {
1376 delete myMoveOperation;
1377 myMoveOperation =
nullptr;
1385 if (myMoveOperation) {
1390 delete myMoveOperation;
1391 myMoveOperation =
nullptr;
1398 return myMoveOperation !=
nullptr;
1404 if (myMoveOperation) {
1416 Position moveOffset = (myViewNet->getPositionInformation() - myViewNet->myMoveSingleElement.myRelativeClickedPosition);
1418 if (myViewNet->myNetworkViewOptions.menuCheckMoveElevation->shown() && myViewNet->myNetworkViewOptions.menuCheckMoveElevation->amChecked() == TRUE) {
1433 myMovingSelectedEdge(false),
1441 myClickedPosition = myViewNet->getPositionInformation();
1443 if (myViewNet->myViewObjectsSelector.getJunctionFront()) {
1444 calculateJunctionSelection();
1445 }
else if (myViewNet->myViewObjectsSelector.getEdgeFront()) {
1446 calculateEdgeSelection(myViewNet->myViewObjectsSelector.getEdgeFront());
1448 myViewNet->updateViewNet();
1457 if (mouseLeftButtonPressed) {
1459 for (
const auto& moveOperation : myMoveOperations) {
1463 }
else if (myMoveOperations.size() > 0) {
1467 for (
const auto& moveOperation : myMoveOperations) {
1471 delete moveOperation;
1474 myViewNet->getUndoList()->end();
1476 myMoveOperations.clear();
1488 for (
const auto& moveOperation : myMoveOperations) {
1491 delete moveOperation;
1494 myViewNet->getUndoList()->end();
1496 myMoveOperations.clear();
1502 return (myMoveOperations.size() > 0);
1508 return myMovingSelectedEdge;
1514 myMovingSelectedEdge =
false;
1520 return myEdgeOffset;
1526 return myMoveOperations.size() > 0;
1534 Position moveOffset = (myViewNet->getPositionInformation() - myClickedPosition);
1536 if (myViewNet->myNetworkViewOptions.menuCheckMoveElevation->shown() && myViewNet->myNetworkViewOptions.menuCheckMoveElevation->amChecked() == TRUE) {
1551 const auto selectedJunctions = myViewNet->getNet()->getAttributeCarriers()->getSelectedJunctions();
1553 for (
const auto& junction : selectedJunctions) {
1554 moveOperation = junction->getMoveOperation();
1555 if (moveOperation) {
1556 myMoveOperations.push_back(moveOperation);
1560 const auto selectedEdges = myViewNet->getNet()->getAttributeCarriers()->getSelectedEdges();
1562 for (
const auto& edge : selectedEdges) {
1563 moveOperation = edge->getMoveOperation();
1564 if (moveOperation) {
1565 myMoveOperations.push_back(moveOperation);
1574 const auto selectedJunctions = myViewNet->getNet()->getAttributeCarriers()->getSelectedJunctions();
1576 for (
const auto& junction : selectedJunctions) {
1578 if (moveOperation) {
1579 myMoveOperations.push_back(moveOperation);
1583 myMovingSelectedEdge =
true;
1590 myEdgeOffset = shape.length2D() - shape.nearest_offset_to_point2D(myViewNet->getPositionInformation());
1593 const auto selectedEdges = myViewNet->getNet()->getAttributeCarriers()->getSelectedEdges();
1595 for (
const auto& edge : selectedEdges) {
1598 if (moveOperation) {
1599 myMoveOperations.push_back(moveOperation);
1609 myViewNet(viewNet) {
1630 myViewNet(viewNet) {
1651 selectingUsingRectangle(false),
1652 startDrawing(false),
1653 myViewNet(viewNet) {
1659 selectingUsingRectangle =
true;
1660 selectionCorner1 = myViewNet->getPositionInformation();
1661 selectionCorner2 = selectionCorner1;
1668 startDrawing =
true;
1670 selectionCorner2 = myViewNet->getPositionInformation();
1672 myViewNet->setStatusBarText(
TL(
"Selection width:") +
toString(fabs(selectionCorner1.x() - selectionCorner2.x()))
1673 +
TL(
" height:") +
toString(fabs(selectionCorner1.y() - selectionCorner2.y()))
1674 +
TL(
" diagonal:") +
toString(selectionCorner1.distanceTo2D(selectionCorner2)));
1681 selectingUsingRectangle =
false;
1682 startDrawing =
false;
1684 myViewNet->setStatusBarText(
"");
1691 if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) &&
1692 (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) &&
1693 myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1696 rectangleBoundary.
add(selectionCorner1);
1697 rectangleBoundary.
add(selectionCorner2);
1699 processBoundarySelection(rectangleBoundary);
1704std::vector<GNEEdge*>
1707 if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) &&
1708 (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) &&
1709 myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1712 rectangleBoundary.
add(selectionCorner1);
1713 rectangleBoundary.
add(selectionCorner2);
1715 myViewNet->updateObjectsInBoundary(rectangleBoundary);
1717 return myViewNet->getViewObjectsSelector().getEdges();
1726 if (selectingUsingRectangle) {
1731 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1733 glVertex2d(selectionCorner1.x(), selectionCorner1.y());
1734 glVertex2d(selectionCorner1.x(), selectionCorner2.y());
1735 glVertex2d(selectionCorner2.x(), selectionCorner2.y());
1736 glVertex2d(selectionCorner2.x(), selectionCorner1.y());
1745 const bool selEdges = myViewNet->myNetworkViewOptions.selectEdges();
1747 myViewNet->updateObjectsInBoundary(boundary);
1749 std::set<GNEAttributeCarrier*> ACsFiltered;
1750 for (
const auto& AC : myViewNet->getViewObjectsSelector().getAttributeCarriers()) {
1751 if (!AC->getGUIGlObject()->isGLObjectLocked()) {
1752 if (myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
1753 if (AC->getTagProperty().isNetworkElement() || AC->getTagProperty().isAdditionalElement()) {
1754 if ((AC->getTagProperty().getTag() ==
SUMO_TAG_EDGE && !selEdges)
1755 || (AC->getTagProperty().getTag() ==
SUMO_TAG_LANE && selEdges)) {
1758 ACsFiltered.insert(AC);
1760 }
else if (myViewNet->myEditModes.isCurrentSupermodeDemand() && AC->getTagProperty().isDemandElement()) {
1761 ACsFiltered.insert(AC);
1762 }
else if (myViewNet->myEditModes.isCurrentSupermodeData() && AC->getTagProperty().isGenericData()) {
1763 ACsFiltered.insert(AC);
1768 std::vector<GNEAttributeCarrier*> ACToSelect;
1769 std::vector<GNEAttributeCarrier*> ACToUnselect;
1771 ACToSelect.reserve(ACsFiltered.size());
1772 ACToUnselect.reserve(ACsFiltered.size());
1777 const auto selectedAC = myViewNet->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
false);
1779 for (
const auto& AC : selectedAC) {
1780 ACToUnselect.push_back(AC);
1784 for (
const auto& AC : ACsFiltered) {
1785 switch (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode()) {
1787 ACToUnselect.push_back(AC);
1790 if (std::find(ACToUnselect.begin(), ACToUnselect.end(), AC) != ACToUnselect.end()) {
1791 ACToSelect.push_back(AC);
1795 ACToSelect.push_back(AC);
1801 std::vector<GNEEdge*> edgesToSelect;
1803 for (
const auto& AC : ACToSelect) {
1805 edgesToSelect.push_back(
dynamic_cast<GNEEdge*
>(AC));
1809 for (
const auto& edge : edgesToSelect) {
1811 ACToSelect.push_back(edge->getFromJunction());
1812 for (
const auto& connection : edge->getFromJunction()->getGNEConnections()) {
1813 ACToSelect.push_back(connection);
1815 for (
const auto& crossing : edge->getFromJunction()->getGNECrossings()) {
1816 ACToSelect.push_back(crossing);
1819 ACToSelect.push_back(edge->getToJunction());
1820 for (
const auto& connection : edge->getToJunction()->getGNEConnections()) {
1821 ACToSelect.push_back(connection);
1823 for (
const auto& crossing : edge->getToJunction()->getGNECrossings()) {
1824 ACToSelect.push_back(crossing);
1829 if ((ACToSelect.size() + ACToUnselect.size()) > 0) {
1832 for (
const auto& AC : ACToUnselect) {
1835 for (
const auto& AC : ACToSelect) {
1836 if (AC->getTagProperty().isSelectable()) {
1840 myViewNet->myUndoList->end();
1842 myViewNet->makeNonCurrent();
1850 myViewNet(viewNet) {
1860 if ((windowSize.size() == 2) && GNEAttributeCarrier::canParse<int>(windowSize[0]) && GNEAttributeCarrier::canParse<int>(windowSize[1])) {
1861 myTestingWidth = GNEAttributeCarrier::parse<int>(windowSize[0]);
1862 myTestingHeight = GNEAttributeCarrier::parse<int>(windowSize[1]);
1875 if (myTestingWidth > 0) {
1876 mainWindow->resize(myTestingWidth, myTestingHeight);
1880 const double size = myViewNet->p2m(32);
1881 Position center = myViewNet->screenPos2NetPos(8, 8);
1886 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1889 glVertex2d(0, -size);
1890 glVertex2d(size, -size);
1891 glVertex2d(size, 0);
1898 glScaled(0.7, 0.7, 0);
1899 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1902 glVertex2d(0, -size);
1903 glVertex2d(size, -size);
1904 glVertex2d(size, 0);
1911 glScaled(0.4, 0.4, 0);
1912 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1915 glVertex2d(0, -size);
1916 glVertex2d(size, -size);
1917 glVertex2d(size, 0);
1928 myViewNet(viewNet) {
1933 delete mySaveIndividualFilesPopup;
1940 auto gripSaveElements = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().saveElements;
1942 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
1947 mySaveNeteditConfig->create();
1952 mySaveSumoConfig->create();
1957 mySaveNetwork->create();
1959 mySaveIndividualFilesPopup =
new FXPopup(gripSaveElements, POPUP_VERTICAL);
1960 mySaveIndividualFilesPopup->create();
1963 std::string(
"\t") +
TL(
"Save individual files") + std::string(
"\t") +
TL(
"Save individual files."),
1965 mySaveIndividualFiles->create();
1967 mySaveAdditionalElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
1970 mySaveAdditionalElements->create();
1972 mySaveDemandElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
1975 mySaveDemandElements->create();
1977 mySaveDataElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
1980 mySaveDataElements->create();
1982 mySaveMeanDataElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
1985 mySaveMeanDataElements->create();
1987 gripSaveElements->recalc();
1989 gripSaveElements->show();
1996 mySaveIndividualFiles->enable();
1998 mySaveIndividualFiles->disable();
2007 myViewNet(viewNet) {
2014 mySwitchButton =
new MFXButtonTooltip(myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().timeSwitch,
2015 myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu(),
2016 gHumanReadableTime ?
"H" :
"S" + std::string(
"\t") +
TL(
"Switch between seconds and HH:MM:SS") + std::string(
"\t") +
TL(
"Switch between seconds and HH:MM:SS"),
nullptr,
2018 mySwitchButton->create();
2037 mySwitchButton->setText(
"H");
2039 mySwitchButton->setText(
"S");
2052 myViewNet(viewNet) {
2055 if (neteditOptions.getBool(
"new")) {
2057 neteditOptions.resetWritable();
2058 neteditOptions.set(
"new",
"false");
2064 delete myNeteditViewsPopup;
2071 auto gripSupermodes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes;
2073 auto toolTipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2076 TL(
"Network") + std::string(
"\t") +
TL(
"Edit network elements") + std::string(
"\t") +
TL(
"Set mode for editing network elements. (F2)"),
2078 networkButton->create();
2081 TL(
"Demand") + std::string(
"\t") +
TL(
"Edit traffic demand elements") + std::string(
"\t") +
TL(
"Set mode for editing traffic demand. (F3)"),
2083 demandButton->create();
2086 TL(
"Data") + std::string(
"\t") +
TL(
"Edit data elements") + std::string(
"\t") +
TL(
"Set mode for editing data demand. (F4)"),
2088 dataButton->create();
2090 myNeteditViewsPopup =
new FXPopup(gripSupermodes, POPUP_VERTICAL);
2091 myNeteditViewsPopup->create();
2094 (std::string(
"\t") +
TL(
"Change netedit view") + std::string(
"\t") +
TL(
"Change netedit view.")).c_str(),
2096 myNeteditViewsButton->create();
2098 myDefaultViewButton =
new MFXButtonTooltip(myNeteditViewsPopup, toolTipMenu,
2099 (std::string(
"Default\t") +
TL(
"Set default view") + std::string(
"\t") +
TL(
"Set default view.")).c_str(),
2101 myDefaultViewButton->create();
2103 myJuPedSimViewButton =
new MFXButtonTooltip(myNeteditViewsPopup, toolTipMenu,
2104 (std::string(
"JuPedSim\t") +
TL(
"Set JuPedSim view") + std::string(
"\t") +
TL(
"Set JuPedSim view.")).c_str(),
2106 myJuPedSimViewButton->create();
2107 myNeteditViewsPopup->recalc();
2109 gripSupermodes->setWidth(353);
2111 gripSupermodes->show();
2117 if (!force && (supermode == currentSupermode)) {
2118 myViewNet->setStatusBarText(
TL(
"Mode already selected"));
2119 if (myViewNet->myCurrentFrame !=
nullptr) {
2120 myViewNet->myCurrentFrame->focusUpperElement();
2123 myViewNet->setStatusBarText(
"");
2125 myViewNet->abortOperation(
false);
2127 currentSupermode = supermode;
2131 networkButton->setChecked(
true);
2132 demandButton->setChecked(
false);
2133 dataButton->setChecked(
false);
2135 myViewNet->myNetworkCheckableButtons.showNetworkCheckableButtons();
2137 myViewNet->myDemandCheckableButtons.hideDemandCheckableButtons();
2139 myViewNet->myDataCheckableButtons.hideDataCheckableButtons();
2141 setNetworkEditMode(networkEditMode,
true);
2144 networkButton->setChecked(
false);
2145 demandButton->setChecked(
true);
2146 dataButton->setChecked(
false);
2148 myViewNet->myNetworkCheckableButtons.hideNetworkCheckableButtons();
2150 myViewNet->myDemandCheckableButtons.showDemandCheckableButtons();
2152 myViewNet->myDataCheckableButtons.hideDataCheckableButtons();
2154 setDemandEditMode(demandEditMode,
true);
2156 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2158 if (!myViewNet->myNet->getDemandPathManager()->getPathCalculator()->isPathCalculatorUpdated()) {
2160 myViewNet->myNet->getDemandPathManager()->getPathCalculator()->updatePathCalculator();
2162 myViewNet->myNet->computeDemandElements(myViewNet->myViewParent->getGNEAppWindows());
2166 networkButton->setChecked(
false);
2167 demandButton->setChecked(
false);
2168 dataButton->setChecked(
true);
2170 myViewNet->myNetworkCheckableButtons.hideNetworkCheckableButtons();
2172 myViewNet->myDemandCheckableButtons.hideDemandCheckableButtons();
2174 myViewNet->myDataCheckableButtons.showDataCheckableButtons();
2176 setDataEditMode(dataEditMode,
true);
2178 if (myViewNet->getViewParent()->getGNEAppWindows()->getProcessingMenuCommands().menuCheckRecomputeDataMode->getCheck() == TRUE) {
2180 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2183 if (!myViewNet->myNet->getNetworkPathManager()->getPathCalculator()->isPathCalculatorUpdated()) {
2185 myViewNet->myNet->computeDataElements(myViewNet->myViewParent->getGNEAppWindows());
2188 for (
const auto&
TAZ : myViewNet->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_TAZ)) {
2189 TAZ.second->resetAdditionalContour();
2193 networkButton->update();
2194 demandButton->update();
2195 dataButton->update();
2197 myViewNet->myViewParent->getGNEAppWindows()->updateSuperModeMenuCommands(currentSupermode);
2204 if ((mode == networkEditMode) && !force) {
2205 myViewNet->setStatusBarText(
TL(
"Network mode already selected"));
2206 if (myViewNet->myCurrentFrame !=
nullptr) {
2207 myViewNet->myCurrentFrame->focusUpperElement();
2210 myViewNet->setStatusBarText(
TL(
"Save modifications in TLS before change mode"));
2211 myViewNet->myCurrentFrame->focusUpperElement();
2213 myViewNet->setStatusBarText(
"");
2214 myViewNet->abortOperation(
false);
2216 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2218 networkEditMode = mode;
2239 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2245 myViewNet->updateCursor();
2247 myViewNet->updateNetworkModeSpecificControls();
2254 if ((mode == demandEditMode) && !force) {
2255 myViewNet->setStatusBarText(
TL(
"Demand mode already selected"));
2256 if (myViewNet->myCurrentFrame !=
nullptr) {
2257 myViewNet->myCurrentFrame->focusUpperElement();
2260 myViewNet->setStatusBarText(
"");
2261 myViewNet->abortOperation(
false);
2263 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2265 demandEditMode = mode;
2280 myViewNet->updateCursor();
2282 myViewNet->updateDemandModeSpecificControls();
2289 if ((mode == dataEditMode) && !force) {
2290 myViewNet->setStatusBarText(
TL(
"Data mode already selected"));
2291 if (myViewNet->myCurrentFrame !=
nullptr) {
2292 myViewNet->myCurrentFrame->focusUpperElement();
2295 myViewNet->setStatusBarText(
"");
2296 myViewNet->abortOperation(
false);
2298 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2300 dataEditMode = mode;
2313 for (
const auto& dataSet : myViewNet->getNet()->getAttributeCarriers()->getDataSets()) {
2314 dataSet.second->updateAttributeColors();
2317 myViewNet->updateCursor();
2319 myViewNet->updateDataModeSpecificControls();
2345 auto gripSupermodes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes;
2347 auto& fileMenuCommands = myViewNet->getViewParent()->getGNEAppWindows()->getFileMenuCommands();
2351 gripSupermodes->setWidth(353);
2353 fileMenuCommands.setDefaultView();
2356 gripSupermodes->setWidth(250);
2358 fileMenuCommands.setJuPedSimView();
2361 myViewNet->viewUpdated();
2381 myViewNet(viewNet) {
2388 auto gripModes = myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes;
2390 auto toolTipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2393 (std::string(
"\t") +
TL(
"Show grid") + std::string(
"\t") +
TL(
"Show grid and restrict movement to the grid - define grid size in visualization options. (Ctrl+G)")),
2396 menuCheckToggleGrid->setChecked(
false);
2397 menuCheckToggleGrid->create();
2399 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, toolTipMenu,
2400 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
2403 menuCheckToggleDrawJunctionShape->setChecked(
false);
2404 menuCheckToggleDrawJunctionShape->create();
2407 (std::string(
"\t") +
TL(
"Draw vehicles spread in lane or depart position") + std::string(
"\t") +
TL(
"Draw vehicles spread in lane or in depart position.")),
2410 menuCheckDrawSpreadVehicles->setChecked(
false);
2411 menuCheckDrawSpreadVehicles->create();
2414 (std::string(
"\t") +
TL(
"Show demand elements") + std::string(
"\t") +
TL(
"Toggle show demand elements.")),
2417 menuCheckShowDemandElements->setChecked(
false);
2418 menuCheckShowDemandElements->create();
2421 (std::string(
"\t") +
TL(
"Clicks target lanes") + std::string(
"\t") +
TL(
"Toggle whether clicking should inspect/select/delete lanes instead of edges.")),
2424 menuCheckSelectEdges->create();
2427 (std::string(
"\t") +
TL(
"Show connections over junctions") + std::string(
"\t") +
TL(
"Toggle show connections over junctions.")),
2430 menuCheckShowConnections->setChecked(myViewNet->getVisualisationSettings().showLane2Lane);
2431 menuCheckShowConnections->create();
2434 (std::string(
"\t") +
TL(
"Hide connections") + std::string(
"\t") +
TL(
"Toggle hide connections.")),
2437 menuCheckHideConnections->setChecked(
false);
2438 menuCheckHideConnections->create();
2440 menuCheckShowAdditionalSubElements =
new MFXCheckableButton(
false, gripModes, toolTipMenu,
2441 (std::string(
"\t") +
TL(
"Show additional sub-elements") + std::string(
"\t") +
TL(
"Toggle show additional sub-elements.")),
2444 menuCheckShowAdditionalSubElements->setChecked(
false);
2445 menuCheckShowAdditionalSubElements->create();
2448 (std::string(
"\t") +
TL(
"Show TAZ elements") + std::string(
"\t") +
TL(
"Toggle show TAZ elements.")),
2451 menuCheckShowTAZElements->setChecked(
false);
2452 menuCheckShowTAZElements->create();
2455 (std::string(
"\t") +
TL(
"Automatic select junctions") + std::string(
"\t") +
TL(
"Toggle whether selecting multiple edges should automatically select their junctions.")),
2458 menuCheckExtendSelection->setChecked(
true);
2459 menuCheckExtendSelection->create();
2462 (std::string(
"\t") +
TL(
"Apply state to all phases") + std::string(
"\t") +
TL(
"Toggle whether clicking should apply state changes to all phases of the current TLS plan.")),
2465 menuCheckChangeAllPhases->setChecked(
false);
2466 menuCheckChangeAllPhases->create();
2469 (std::string(
"\t") +
TL(
"Automatic merging junction") + std::string(
"\t") +
TL(
"Toggle ask for confirmation before merging junction.")),
2472 menuCheckWarnAboutMerge->create();
2475 (std::string(
"\t") +
TL(
"Show bubbles") + std::string(
"\t") +
TL(
"Toggle show bubbles over junctions shapes.")),
2478 menuCheckShowJunctionBubble->setChecked(
false);
2479 menuCheckShowJunctionBubble->create();
2482 (std::string(
"\t") +
TL(
"Move elevation") + std::string(
"\t") +
TL(
"Apply mouse movement to elevation instead of x,y position.")),
2485 menuCheckMoveElevation->setChecked(
false);
2486 menuCheckMoveElevation->create();
2489 (std::string(
"\t") +
TL(
"Edge chain mode") + std::string(
"\t") +
TL(
"Create consecutive edges with a single click (hit ESC to cancel chain).")),
2492 menuCheckChainEdges->setChecked(
false);
2493 menuCheckChainEdges->create();
2496 (std::string(
"\t") +
TL(
"Edge opposite direction") + std::string(
"\t") +
TL(
"Automatically create an edge in the opposite direction.")),
2499 menuCheckAutoOppositeEdge->setChecked(
false);
2500 menuCheckAutoOppositeEdge->create();
2503 gripModes->recalc();
2509 menuCheckToggleGrid->hide();
2510 menuCheckToggleDrawJunctionShape->hide();
2511 menuCheckDrawSpreadVehicles->hide();
2512 menuCheckShowDemandElements->hide();
2513 menuCheckSelectEdges->hide();
2514 menuCheckShowConnections->hide();
2515 menuCheckHideConnections->hide();
2516 menuCheckShowAdditionalSubElements->hide();
2517 menuCheckShowTAZElements->hide();
2518 menuCheckExtendSelection->hide();
2519 menuCheckChangeAllPhases->hide();
2520 menuCheckWarnAboutMerge->hide();
2521 menuCheckShowJunctionBubble->hide();
2522 menuCheckMoveElevation->hide();
2523 menuCheckChainEdges->hide();
2524 menuCheckAutoOppositeEdge->hide();
2531 if (menuCheckToggleGrid->shown()) {
2532 commands.push_back(menuCheckToggleGrid);
2534 if (menuCheckToggleDrawJunctionShape->shown()) {
2535 commands.push_back(menuCheckToggleDrawJunctionShape);
2537 if (menuCheckDrawSpreadVehicles->shown()) {
2538 commands.push_back(menuCheckDrawSpreadVehicles);
2540 if (menuCheckShowDemandElements->shown()) {
2541 commands.push_back(menuCheckShowDemandElements);
2543 if (menuCheckSelectEdges->shown()) {
2544 commands.push_back(menuCheckSelectEdges);
2546 if (menuCheckShowConnections->shown()) {
2547 commands.push_back(menuCheckShowConnections);
2549 if (menuCheckHideConnections->shown()) {
2550 commands.push_back(menuCheckHideConnections);
2552 if (menuCheckShowAdditionalSubElements->shown()) {
2553 commands.push_back(menuCheckShowAdditionalSubElements);
2555 if (menuCheckShowTAZElements->shown()) {
2556 commands.push_back(menuCheckShowTAZElements);
2558 if (menuCheckExtendSelection->shown()) {
2559 commands.push_back(menuCheckExtendSelection);
2561 if (menuCheckChangeAllPhases->shown()) {
2562 commands.push_back(menuCheckChangeAllPhases);
2564 if (menuCheckWarnAboutMerge->shown()) {
2565 commands.push_back(menuCheckWarnAboutMerge);
2567 if (menuCheckShowJunctionBubble->shown()) {
2568 commands.push_back(menuCheckShowJunctionBubble);
2570 if (menuCheckMoveElevation->shown()) {
2571 commands.push_back(menuCheckMoveElevation);
2573 if (menuCheckChainEdges->shown()) {
2574 commands.push_back(menuCheckChainEdges);
2576 if (menuCheckAutoOppositeEdge->shown()) {
2577 commands.push_back(menuCheckAutoOppositeEdge);
2584 return (menuCheckDrawSpreadVehicles->amChecked() == TRUE);
2590 if (menuCheckShowDemandElements->shown()) {
2591 return (menuCheckShowDemandElements->amChecked() == TRUE);
2601 if (menuCheckSelectEdges->shown()) {
2602 return (menuCheckSelectEdges->amChecked() != TRUE);
2612 if (myViewNet->myEditModes.isCurrentSupermodeData()) {
2616 return (menuCheckHideConnections->amChecked() == FALSE);
2619 }
else if (myViewNet->myEditModes.isCurrentSupermodeNetwork() && menuCheckShowConnections->shown() ==
false) {
2622 return (myViewNet->getVisualisationSettings().showLane2Lane);
2629 if (!myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
2631 }
else if (menuCheckShowAdditionalSubElements->shown() ==
false) {
2634 return menuCheckShowAdditionalSubElements->amChecked();
2641 if (!myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
2643 }
else if (menuCheckShowTAZElements->shown() ==
false) {
2646 return menuCheckShowTAZElements->amChecked();
2653 if (menuCheckMoveElevation->shown()) {
2654 return (menuCheckMoveElevation->amChecked() == TRUE);
2665 myViewNet(viewNet) {
2672 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
2674 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2677 (std::string(
"\t") +
TL(
"Show grid") + std::string(
"\t") +
TL(
"Show grid and restrict movement to the grid - define grid size in visualization options. (Ctrl+G)")),
2680 menuCheckToggleGrid->setChecked(
false);
2681 menuCheckToggleGrid->create();
2683 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2684 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
2687 menuCheckToggleDrawJunctionShape->setChecked(
false);
2688 menuCheckToggleDrawJunctionShape->create();
2691 (std::string(
"\t") +
TL(
"Draw vehicles spread/depart position") + std::string(
"\t") +
TL(
"Draw vehicles spread in lane or in depart position.")),
2694 menuCheckDrawSpreadVehicles->setChecked(
false);
2695 menuCheckDrawSpreadVehicles->create();
2698 (std::string(
"\t") +
TL(
"Show shapes") + std::string(
"\t") +
TL(
"Toggle show shapes (Polygons and POIs).")),
2701 menuCheckHideShapes->setChecked(
false);
2702 menuCheckHideShapes->create();
2705 (std::string(
"\t") +
TL(
"Show all trips") + std::string(
"\t") +
TL(
"Toggle show all trips (requires updated demand - F5).")),
2708 menuCheckShowAllTrips->setChecked(
false);
2709 menuCheckShowAllTrips->create();
2712 (std::string(
"\t") +
TL(
"Show all person plans") + std::string(
"\t") +
TL(
"Toggle show all person plans.")),
2715 menuCheckShowAllPersonPlans->setChecked(
false);
2716 menuCheckShowAllPersonPlans->create();
2719 (std::string(
"\t") +
TL(
"Lock selected person") + std::string(
"\t") +
TL(
"Toggle lock selected person.")),
2722 menuCheckLockPerson->setChecked(
false);
2723 menuCheckLockPerson->create();
2725 menuCheckShowAllContainerPlans =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2726 (std::string(
"\t") +
TL(
"Show all containers plans") + std::string(
"\t") +
TL(
"Toggle show all container plans.")),
2729 menuCheckShowAllContainerPlans->setChecked(
false);
2730 menuCheckShowAllContainerPlans->create();
2733 (std::string(
"\t") +
TL(
"Lock selected container") + std::string(
"\t") +
TL(
"Toggle lock selected container.")),
2736 menuCheckLockContainer->setChecked(
false);
2737 menuCheckLockContainer->create();
2739 menuCheckHideNonInspectedDemandElements =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2740 (std::string(
"\t") +
TL(
"Show non-inspected demand elements") + std::string(
"\t") +
TL(
"Toggle show non-inspected demand elements.")),
2743 menuCheckHideNonInspectedDemandElements->setChecked(
false);
2744 menuCheckHideNonInspectedDemandElements->create();
2746 menuCheckShowOverlappedRoutes =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2747 (std::string(
"\t") +
TL(
"Show number of overlapped routes") + std::string(
"\t") +
TL(
"Toggle show number of overlapped routes.")),
2750 menuCheckShowOverlappedRoutes->setChecked(
false);
2751 menuCheckShowOverlappedRoutes->create();
2754 gripModes->recalc();
2760 menuCheckToggleGrid->hide();
2761 menuCheckToggleDrawJunctionShape->hide();
2762 menuCheckDrawSpreadVehicles->hide();
2763 menuCheckHideShapes->hide();
2764 menuCheckShowAllTrips->hide();
2765 menuCheckShowAllPersonPlans->hide();
2766 menuCheckLockPerson->hide();
2767 menuCheckShowAllContainerPlans->hide();
2768 menuCheckLockContainer->hide();
2769 menuCheckHideNonInspectedDemandElements->hide();
2770 menuCheckShowOverlappedRoutes->hide();
2777 if (menuCheckToggleGrid->shown()) {
2778 commands.push_back(menuCheckToggleGrid);
2780 if (menuCheckToggleDrawJunctionShape->shown()) {
2781 commands.push_back(menuCheckToggleDrawJunctionShape);
2783 if (menuCheckDrawSpreadVehicles->shown()) {
2784 commands.push_back(menuCheckDrawSpreadVehicles);
2786 if (menuCheckHideShapes->shown()) {
2787 commands.push_back(menuCheckHideShapes);
2789 if (menuCheckShowAllTrips->shown()) {
2790 commands.push_back(menuCheckShowAllTrips);
2792 if (menuCheckShowAllPersonPlans->shown() && menuCheckShowAllPersonPlans->isEnabled()) {
2793 commands.push_back(menuCheckShowAllPersonPlans);
2795 if (menuCheckLockPerson->shown() && menuCheckLockPerson->isEnabled()) {
2796 commands.push_back(menuCheckLockPerson);
2798 if (menuCheckShowAllContainerPlans->shown() && menuCheckShowAllContainerPlans->isEnabled()) {
2799 commands.push_back(menuCheckShowAllContainerPlans);
2801 if (menuCheckLockContainer->shown() && menuCheckLockContainer->isEnabled()) {
2802 commands.push_back(menuCheckLockContainer);
2804 if (menuCheckHideNonInspectedDemandElements->shown()) {
2805 commands.push_back(menuCheckHideNonInspectedDemandElements);
2807 if (menuCheckShowOverlappedRoutes->shown()) {
2808 commands.push_back(menuCheckShowOverlappedRoutes);
2815 return (menuCheckDrawSpreadVehicles->amChecked() == TRUE);
2821 if (menuCheckHideNonInspectedDemandElements->shown()) {
2823 if ((menuCheckHideNonInspectedDemandElements->amChecked() == FALSE) || (myViewNet->getInspectedAttributeCarriers().empty())) {
2826 }
else if (myViewNet->getInspectedAttributeCarriers().front()->getTagProperty().isDemandElement()) {
2827 if (myViewNet->isAttributeCarrierInspected(demandElement)) {
2833 if (myViewNet->isAttributeCarrierInspected(i)) {
2839 if (myViewNet->isAttributeCarrierInspected(i)) {
2859 if (menuCheckHideShapes->shown()) {
2860 return (menuCheckHideShapes->amChecked() == FALSE);
2869 return (menuCheckShowAllTrips->amChecked() == TRUE);
2875 if (menuCheckShowAllPersonPlans->isEnabled()) {
2876 return (menuCheckShowAllPersonPlans->amChecked() == TRUE);
2885 myLockedPerson = person;
2891 myLockedPerson =
nullptr;
2897 return myLockedPerson;
2903 if (menuCheckShowAllContainerPlans->isEnabled()) {
2904 return (menuCheckShowAllContainerPlans->amChecked() == TRUE);
2913 myLockedContainer = container;
2919 myLockedContainer =
nullptr;
2925 if (menuCheckShowOverlappedRoutes->isEnabled()) {
2926 return (menuCheckShowOverlappedRoutes->amChecked() == TRUE);
2935 return myLockedContainer;
2943 myViewNet(viewNet) {
2950 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
2952 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2954 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2955 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
2958 menuCheckToggleDrawJunctionShape->setChecked(
false);
2959 menuCheckToggleDrawJunctionShape->create();
2962 (std::string(
"\t") +
TL(
"Show additionals") + std::string(
"\t") +
TL(
"Toggle show additionals.")),
2965 menuCheckShowAdditionals->create();
2968 (std::string(
"\t") +
TL(
"Show shapes") + std::string(
"\t") +
TL(
"Toggle show shapes (Polygons and POIs).")),
2971 menuCheckShowShapes->create();
2974 (std::string(
"\t") +
TL(
"Show demand elements") + std::string(
"\t") +
TL(
"Toggle show demand elements.")),
2977 menuCheckShowDemandElements->create();
2980 (std::string(
"\t") +
TL(
"Draw TAZREL drawing mode") + std::string(
"\t") +
TL(
"Toggle draw TAZREL drawing mode.")),
2983 menuCheckToggleTAZRelDrawing->create();
2986 (std::string(
"\t") +
TL(
"Toggle draw TAZ fill") + std::string(
"\t") +
TL(
"Toggle draw TAZ fill")),
2989 menuCheckToggleTAZDrawFill->create();
2991 menuCheckToggleTAZRelOnlyFrom =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2992 (std::string(
"\t") +
TL(
"Toggle draw TAZRel only from") + std::string(
"\t") +
TL(
"Toggle draw TAZRel only from")),
2995 menuCheckToggleTAZRelOnlyFrom->create();
2998 (std::string(
"\t") +
TL(
"Toggle draw TAZRel only to") + std::string(
"\t") +
TL(
"Toggle draw TAZRel only to")),
3001 menuCheckToggleTAZRelOnlyTo->create();
3004 gripModes->recalc();
3010 menuCheckToggleDrawJunctionShape->hide();
3011 menuCheckShowAdditionals->hide();
3012 menuCheckShowShapes->hide();
3013 menuCheckShowDemandElements->hide();
3014 menuCheckToggleTAZRelDrawing->hide();
3015 menuCheckToggleTAZDrawFill->hide();
3016 menuCheckToggleTAZRelOnlyFrom->hide();
3017 menuCheckToggleTAZRelOnlyTo->hide();
3024 if (menuCheckToggleDrawJunctionShape->shown()) {
3025 commands.push_back(menuCheckToggleDrawJunctionShape);
3027 if (menuCheckShowAdditionals->shown()) {
3028 commands.push_back(menuCheckShowAdditionals);
3030 if (menuCheckShowShapes->shown()) {
3031 commands.push_back(menuCheckShowShapes);
3033 if (menuCheckShowDemandElements->shown()) {
3034 commands.push_back(menuCheckShowDemandElements);
3036 if (menuCheckToggleTAZRelDrawing->shown()) {
3037 commands.push_back(menuCheckToggleTAZRelDrawing);
3039 if (menuCheckToggleTAZDrawFill->shown()) {
3040 commands.push_back(menuCheckToggleTAZDrawFill);
3042 if (menuCheckToggleTAZRelOnlyFrom->shown()) {
3043 commands.push_back(menuCheckToggleTAZRelOnlyFrom);
3045 if (menuCheckToggleTAZRelOnlyTo->shown()) {
3046 commands.push_back(menuCheckToggleTAZRelOnlyTo);
3053 if (menuCheckShowAdditionals->shown()) {
3054 return (menuCheckShowAdditionals->amChecked() == TRUE);
3063 if (menuCheckShowShapes->shown()) {
3064 return (menuCheckShowShapes->amChecked() == TRUE);
3073 if (menuCheckShowDemandElements->shown()) {
3074 return (menuCheckShowDemandElements->amChecked() == TRUE);
3083 return (menuCheckToggleTAZRelDrawing->amChecked() != TRUE);
3089 if (menuCheckToggleTAZDrawFill->shown()) {
3090 return (menuCheckToggleTAZDrawFill->amChecked() != TRUE);
3099 if (menuCheckToggleTAZRelOnlyFrom->shown()) {
3100 return (menuCheckToggleTAZRelOnlyFrom->amChecked() != TRUE);
3109 if (menuCheckToggleTAZRelOnlyTo->shown()) {
3110 return (menuCheckToggleTAZRelOnlyTo->amChecked() != TRUE);
3121 myViewNet(viewNet) {
3128 FXLabel* genericDataLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3130 genericDataLabel->create();
3132 myGenericDataTypesComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3135 myGenericDataTypesComboBox->create();
3137 myGenericDataTypesComboBox->appendIconItem(
"<all>");
3142 FXLabel* dataSetLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3144 dataSetLabel->create();
3146 myDataSetsComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3149 myDataSetsComboBox->create();
3151 myIntervalCheckBox =
new FXCheckButton(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3153 myIntervalCheckBox->create();
3155 myBeginTextField =
new FXTextField(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3157 myBeginTextField->create();
3159 myEndTextField =
new FXTextField(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3161 myEndTextField->create();
3163 FXLabel* parameterLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3165 parameterLabel->create();
3167 myParametersComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3170 myParametersComboBox->create();
3172 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->recalc();
3179 updateIntervalBar();
3181 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->show();
3188 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->hide();
3195 if (myUpdateInterval && myViewNet->getNet()) {
3202 myParameters.clear();
3204 for (
const auto& dataSet : myViewNet->getNet()->getAttributeCarriers()->getDataSets()) {
3206 myDataSets.push_back(dataSet.second->getID());
3208 for (
const auto& interval : dataSet.second->getDataIntervalChildren()) {
3211 begin = interval.first;
3214 end = interval.first;
3217 for (
const auto& genericData : interval.second->getGenericDataChildren()) {
3219 for (
const auto& parameter : genericData->getParametersMap()) {
3220 myParameters.insert(parameter.first);
3226 const std::string previousDataSet = myDataSetsComboBox->getText().text();
3228 const std::string previousBegin = (myIntervalCheckBox->getCheck() == TRUE) ? myBeginTextField->getText().text() :
"";
3229 const std::string previousEnd = (myIntervalCheckBox->getCheck() == TRUE) ? myEndTextField->getText().text() :
"";
3231 const std::string previousParameter = myParametersComboBox->getText().text();
3233 myDataSetsComboBox->clearItems();
3234 myParametersComboBox->clearItems();
3236 myDataSetsComboBox->appendIconItem(
"<all>");
3237 myParametersComboBox->appendIconItem(
"<all>");
3239 for (
const auto& dataSet : myDataSets) {
3240 myDataSetsComboBox->appendIconItem(dataSet.c_str());
3243 myBeginTextField->setText(
toString(begin).c_str());
3244 myEndTextField->setText(
toString(end).c_str());
3246 for (
const auto& parameter : myParameters) {
3247 myParametersComboBox->appendIconItem(parameter.c_str());
3250 myDataSetsComboBox->setCurrentItem(0, FALSE);
3251 for (
int i = 0; i < myDataSetsComboBox->getNumItems(); i++) {
3252 if (myDataSetsComboBox->getItemText(i) == previousDataSet) {
3253 myDataSetsComboBox->setCurrentItem(i);
3257 if (myIntervalCheckBox->getCheck() == TRUE) {
3258 myBeginTextField->setText(previousBegin.c_str());
3259 myEndTextField->setText(previousEnd.c_str());
3262 myParametersComboBox->setCurrentItem(0, FALSE);
3263 for (
int i = 0; i < myParametersComboBox->getNumItems(); i++) {
3264 if (myParametersComboBox->getItemText(i) == previousParameter) {
3265 myParametersComboBox->setCurrentItem(i);
3272 enableIntervalBar();
3274 disableIntervalBar();
3277 myUpdateInterval =
false;
3284 myUpdateInterval =
true;
3290 if (myGenericDataTypesComboBox->isEnabled() && (myGenericDataTypesComboBox->getTextColor() == FXRGB(0, 0, 0))) {
3305 if (!myDataSetsComboBox->isEnabled() ||
3306 (myDataSetsComboBox->getCurrentItem() == 0) ||
3307 (myDataSetsComboBox->getTextColor() == FXRGB(255, 0, 0))) {
3317 if (!myIntervalCheckBox->isEnabled() || (myIntervalCheckBox->getCheck() == FALSE)) {
3320 return GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
3327 if (!myIntervalCheckBox->isEnabled() || (myIntervalCheckBox->getCheck() == FALSE)) {
3330 return GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
3337 if (!myParametersComboBox->isEnabled() ||
3338 (myParametersComboBox->getCurrentItem() == 0) ||
3339 (myParametersComboBox->getTextColor() == FXRGB(255, 0, 0))) {
3342 return myParametersComboBox->getText().text();
3349 if ((myGenericDataTypesComboBox->getText() ==
"<all>") ||
3353 myGenericDataTypesComboBox->setTextColor(FXRGB(0, 0, 0));
3355 myGenericDataTypesComboBox->setTextColor(FXRGB(255, 0, 0));
3358 myViewNet->updateViewNet();
3365 if (std::find(myDataSets.begin(), myDataSets.end(), myDataSetsComboBox->getText().text()) != myDataSets.end()) {
3366 myDataSetsComboBox->setTextColor(FXRGB(0, 0, 0));
3368 myDataSetsComboBox->setTextColor(FXRGB(255, 0, 0));
3371 myViewNet->updateViewNet();
3378 if (myIntervalCheckBox->isEnabled() && (myIntervalCheckBox->getCheck() == TRUE)) {
3379 myBeginTextField->enable();
3380 myEndTextField->enable();
3382 myBeginTextField->disable();
3383 myEndTextField->disable();
3386 myViewNet->updateViewNet();
3392 if (myBeginTextField->getText().empty()) {
3393 myBeginTextField->setText(
toString(myViewNet->getNet()->getDataSetIntervalMinimumBegin()).c_str());
3394 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
3395 }
else if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
3396 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
3398 myBeginTextField->setTextColor(FXRGB(255, 0, 0));
3401 myViewNet->updateViewNet();
3407 if (myEndTextField->getText().empty()) {
3408 myEndTextField->setText(
toString(myViewNet->getNet()->getDataSetIntervalMaximumEnd()).c_str());
3409 myEndTextField->setTextColor(FXRGB(0, 0, 0));
3410 }
else if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
3411 myEndTextField->setTextColor(FXRGB(0, 0, 0));
3413 myEndTextField->setTextColor(FXRGB(255, 0, 0));
3416 myViewNet->updateViewNet();
3423 if (myParameters.count(myParametersComboBox->getText().text()) > 0) {
3424 myParametersComboBox->setTextColor(FXRGB(0, 0, 0));
3426 myParametersComboBox->setTextColor(FXRGB(255, 0, 0));
3429 myViewNet->updateViewNet();
3437 myGenericDataTypesComboBox->enable();
3438 myDataSetsComboBox->enable();
3439 myIntervalCheckBox->enable();
3440 if (myIntervalCheckBox->getCheck() == TRUE) {
3441 myBeginTextField->enable();
3442 myEndTextField->enable();
3444 myBeginTextField->disable();
3445 myEndTextField->disable();
3447 myParametersComboBox->enable();
3454 myGenericDataTypesComboBox->disable();
3455 myDataSetsComboBox->disable();
3456 myIntervalCheckBox->disable();
3457 myBeginTextField->disable();
3458 myEndTextField->disable();
3459 myParametersComboBox->disable();
3467 myViewNet(viewNet) {
3474 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3476 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3479 std::string(
"\t") +
TL(
"Inspect mode") + std::string(
"\t") +
TL(
"Mode for inspect elements and change their attributes. (I)"),
3481 inspectButton->create();
3484 std::string(
"\t") +
TL(
"Delete mode") + std::string(
"\t") +
TL(
"Mode for deleting elements. (D)"),
3486 deleteButton->create();
3489 std::string(
"\t") +
TL(
"Select mode") + std::string(
"\t") +
TL(
"Mode for selecting elements. (S)"),
3491 selectButton->create();
3493 gripModes->recalc();
3499 inspectButton->show();
3500 deleteButton->show();
3501 selectButton->show();
3507 inspectButton->hide();
3508 deleteButton->hide();
3509 selectButton->hide();
3515 inspectButton->setChecked(
false);
3516 deleteButton->setChecked(
false);
3517 selectButton->setChecked(
false);
3523 inspectButton->update();
3524 deleteButton->update();
3525 selectButton->update();
3533 myViewNet(viewNet) {
3540 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3542 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3545 std::string(
"\t") +
TL(
"Move mode") + std::string(
"\t") +
TL(
"Mode for moving elements. (M)"),
3547 moveNetworkElementsButton->create();
3550 std::string(
"\t") +
TL(
"Edge mode") + std::string(
"\t") +
TL(
"Mode for creating junctions and edges. (E)"),
3552 createEdgeButton->create();
3555 std::string(
"\t") +
TL(
"Traffic light mode") + std::string(
"\t") +
TL(
"Mode for editing traffic lights over junctions. (T)"),
3557 trafficLightButton->create();
3560 std::string(
"\t") +
TL(
"Connection mode") + std::string(
"\t") +
TL(
"Mode for edit connections between lanes. (C)"),
3562 connectionButton->create();
3565 std::string(
"\t") +
TL(
"Prohibition mode") + std::string(
"\t") +
TL(
"Mode for editing connection prohibitions. (H)"),
3567 prohibitionButton->create();
3570 std::string(
"\t") +
TL(
"Crossing mode") + std::string(
"\t") +
TL(
"Mode for creating crossings between edges. (R)"),
3572 crossingButton->create();
3575 std::string(
"\t") +
TL(
"Additional mode") + std::string(
"\t") +
TL(
"Mode for creating additional elements. (A)"),
3577 additionalButton->create();
3580 std::string(
"\t") +
TL(
"Wire mode") + std::string(
"\t") +
TL(
"Mode for editing overhead wires. (W)"),
3582 wireButton->create();
3585 std::string(
"\t") +
TL(
"TAZ mode") + std::string(
"\t") +
TL(
"Mode for creating Traffic Assignment Zones. (Z)"),
3587 TAZButton->create();
3590 std::string(
"\t") +
TL(
"Polygon mode") + std::string(
"\t") +
TL(
"Mode for creating polygons and POIs. (P)"),
3592 shapeButton->create();
3595 std::string(
"\t") +
TL(
"Decal mode") + std::string(
"\t") +
TL(
"Mode for editing decals. (U)"),
3597 decalButton->create();
3599 gripModes->recalc();
3606 if (myViewNet->getEditModes().isJuPedSimView()) {
3607 moveNetworkElementsButton->show();
3608 createEdgeButton->show();
3609 connectionButton->hide();
3610 trafficLightButton->hide();
3611 additionalButton->show();
3612 crossingButton->show();
3614 shapeButton->show();
3615 prohibitionButton->hide();
3617 decalButton->hide();
3619 moveNetworkElementsButton->show();
3620 createEdgeButton->show();
3621 connectionButton->show();
3622 trafficLightButton->show();
3623 additionalButton->show();
3624 crossingButton->show();
3626 shapeButton->show();
3627 prohibitionButton->show();
3629 decalButton->show();
3636 moveNetworkElementsButton->hide();
3637 createEdgeButton->hide();
3638 connectionButton->hide();
3639 trafficLightButton->hide();
3640 additionalButton->hide();
3641 crossingButton->hide();
3643 shapeButton->hide();
3644 prohibitionButton->hide();
3646 decalButton->hide();
3652 moveNetworkElementsButton->setChecked(
false);
3653 createEdgeButton->setChecked(
false);
3654 connectionButton->setChecked(
false);
3655 trafficLightButton->setChecked(
false);
3656 additionalButton->setChecked(
false);
3657 crossingButton->setChecked(
false);
3658 TAZButton->setChecked(
false);
3659 shapeButton->setChecked(
false);
3660 prohibitionButton->setChecked(
false);
3661 wireButton->setChecked(
false);
3662 decalButton->setChecked(
false);
3668 moveNetworkElementsButton->update();
3669 createEdgeButton->update();
3670 connectionButton->update();
3671 trafficLightButton->update();
3672 additionalButton->update();
3673 crossingButton->update();
3674 TAZButton->update();
3675 shapeButton->update();
3676 prohibitionButton->update();
3677 wireButton->update();
3678 decalButton->update();
3686 myViewNet(viewNet) {
3693 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3695 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3698 std::string(
"\t") +
TL(
"Move mode") + std::string(
"\t") +
TL(
"Mode for moving elements. (M)"),
3700 moveDemandElementsButton->create();
3703 std::string(
"\t") +
TL(
"Route mode") + std::string(
"\t") +
TL(
"Mode for creating routes. (R)"),
3705 routeButton->create();
3708 std::string(
"\t") +
TL(
"Route distribution mode") + std::string(
"\t") +
TL(
"Mode for creating and editing rout distributions. (W)"),
3710 routeDistributionButton->create();
3713 std::string(
"\t") +
TL(
"Vehicle mode") + std::string(
"\t") +
TL(
"Mode for creating vehicles. (V)"),
3715 vehicleButton->create();
3718 std::string(
"\t") +
TL(
"Type mode") + std::string(
"\t") +
TL(
"Mode for creating types (of vehicles, persons and containers). (T)"),
3720 typeButton->create();
3723 std::string(
"\t") +
TL(
"Type distribution mode") + std::string(
"\t") +
TL(
"Mode for creating and editing type distribution. (U)"),
3725 typeDistributionButton->create();
3728 std::string(
"\t") +
TL(
"Stop mode") + std::string(
"\t") +
TL(
"Mode for creating stops. (A)"),
3730 stopButton->create();
3733 std::string(
"\t") +
TL(
"Person mode") + std::string(
"\t") +
TL(
"Mode for creating persons. (P)"),
3735 personButton->create();
3738 std::string(
"\t") +
TL(
"Person plan mode") + std::string(
"\t") +
TL(
"Mode for creating person plans. (L)"),
3740 personPlanButton->create();
3743 std::string(
"\t") +
TL(
"Container mode") + std::string(
"\t") +
TL(
"Mode for creating containers. (C)"),
3745 containerButton->create();
3748 std::string(
"\t") +
TL(
"Container plan mode") + std::string(
"\t") +
TL(
"Mode for creating container plans. (H)"),
3750 containerPlanButton->create();
3752 gripModes->recalc();
3758 if (myViewNet->getEditModes().isJuPedSimView()) {
3759 moveDemandElementsButton->hide();
3760 routeButton->show();
3761 routeDistributionButton->show();
3762 vehicleButton->hide();
3764 typeDistributionButton->show();
3766 personButton->show();
3767 personPlanButton->show();
3768 containerButton->hide();
3769 containerPlanButton->hide();
3771 moveDemandElementsButton->show();
3772 routeButton->show();
3773 routeDistributionButton->show();
3774 vehicleButton->show();
3776 typeDistributionButton->show();
3778 personButton->show();
3779 personPlanButton->show();
3780 containerButton->show();
3781 containerPlanButton->show();
3788 moveDemandElementsButton->hide();
3789 routeButton->hide();
3790 routeDistributionButton->hide();
3791 vehicleButton->hide();
3793 typeDistributionButton->hide();
3795 personButton->hide();
3796 personPlanButton->hide();
3797 containerButton->hide();
3798 containerPlanButton->hide();
3804 moveDemandElementsButton->setChecked(
false);
3805 routeButton->setChecked(
false);
3806 routeDistributionButton->setChecked(
false);
3807 vehicleButton->setChecked(
false);
3808 typeButton->setChecked(
false);
3809 typeDistributionButton->setChecked(
false);
3810 stopButton->setChecked(
false);
3811 personButton->setChecked(
false);
3812 personPlanButton->setChecked(
false);
3813 containerButton->setChecked(
false);
3814 containerPlanButton->setChecked(
false);
3820 moveDemandElementsButton->update();
3821 routeButton->update();
3822 routeDistributionButton->update();
3823 vehicleButton->update();
3824 typeButton->update();
3825 typeDistributionButton->update();
3826 stopButton->update();
3827 personButton->update();
3828 personPlanButton->update();
3829 containerButton->update();
3830 containerPlanButton->update();
3838 myViewNet(viewNet) {
3845 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3847 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3850 std::string(
"\t") +
TL(
"Edge data mode") + std::string(
"\t") +
TL(
"Mode for creating edge datas. (E)"),
3852 edgeDataButton->create();
3855 std::string(
"\t") +
TL(
"Edge relation data mode") + std::string(
"\t") +
TL(
"Mode for creating edge relation datas. (R)"),
3857 edgeRelDataButton->create();
3860 std::string(
"\t") +
TL(
"TAZ relation data mode") + std::string(
"\t") +
TL(
"Mode for creating TAZ relation datas. (Z)"),
3862 TAZRelDataButton->create();
3865 std::string(
"\t") +
TL(
"MeanData mode") + std::string(
"\t") +
TL(
"Mode for MeanData elements. (M)"),
3867 meanDataButton->create();
3869 gripModes->recalc();
3875 edgeDataButton->show();
3876 edgeRelDataButton->show();
3877 TAZRelDataButton->show();
3878 meanDataButton->show();
3884 edgeDataButton->hide();
3885 edgeRelDataButton->hide();
3886 TAZRelDataButton->hide();
3887 meanDataButton->hide();
3893 edgeDataButton->setChecked(
false);
3894 edgeRelDataButton->setChecked(
false);
3895 TAZRelDataButton->setChecked(
false);
3896 meanDataButton->setChecked(
false);
3902 edgeDataButton->update();
3903 edgeRelDataButton->update();
3904 TAZRelDataButton->update();
3905 meanDataButton->update();
3920 if (element && (myEditedNetworkElement ==
nullptr)) {
3922 myPreviousNetworkEditMode = myViewNet->myEditModes.networkEditMode;
3926 myEditedNetworkElement = element;
3930 myViewNet->updateViewNet();
3938 if (myEditedNetworkElement !=
nullptr) {
3940 myEditedNetworkElement->setShapeEdited(
false);
3942 myEditedNetworkElement =
nullptr;
3944 if (myViewNet->myEditModes.networkEditMode != myPreviousNetworkEditMode) {
3945 myViewNet->myEditModes.setNetworkEditMode(myPreviousNetworkEditMode);
3954 if (myEditedNetworkElement !=
nullptr) {
3956 stopEditCustomShape();
3963 return myEditedNetworkElement;
3973 const double size,
const double offsetx,
const double offsety) {
3975 if (checkDrawing(d, AC, type, exaggeration)) {
3981 glTranslated(offsetx, offsety, 0);
3983 glRotated(180, 0, 0, 1);
4007 if (exaggeration == 0) {
4011 if (viewNet->getEditModes().isCurrentSupermodeNetwork() &&
4033const std::vector<RGBColor>&
4058 }
else if (value >= max) {
4062 const double procent = ((value - min) * 100) / (max - min);
4066 }
else if (procent >= 100) {
4076std::vector<GUIGlObject*>
4078 std::vector<GUIGlObject*> filteredGLObjects;
4079 if (GLObjects.size() > 0) {
4080 const auto firstLayer = GLObjects.front()->getType();
4081 for (
const auto& GLObject : GLObjects) {
4083 (GLO_RIDE <= GLObject->getType()) && (GLObject->getType() <=
GLO_TRANSHIP)) {
4084 filteredGLObjects.push_back(GLObject);
4086 (GLO_STOP <= GLObject->getType()) && (GLObject->getType() <=
GLO_STOP_PLAN)) {
4087 filteredGLObjects.push_back(GLObject);
4089 (GLO_VEHICLE <= GLObject->getType()) && (GLObject->getType() <=
GLO_ROUTEFLOW)) {
4090 filteredGLObjects.push_back(GLObject);
4092 (GLO_PERSON <= GLObject->getType()) && (GLObject->getType() <=
GLO_PERSONFLOW)) {
4093 filteredGLObjects.push_back(GLObject);
4095 (GLO_CONTAINER <= GLObject->getType()) && (GLObject->getType() <=
GLO_CONTAINERFLOW)) {
4096 filteredGLObjects.push_back(GLObject);
4097 }
else if (GLObject->getType() == firstLayer) {
4098 filteredGLObjects.push_back(GLObject);
4102 return filteredGLObjects;
DataEditMode
enum for data edit modes
@ DATA_SELECT
mode for selecting data elements
@ DATA_INSPECT
mode for inspecting data elements
@ DATA_DELETE
mode for deleting data elements
Supermode
@brie enum for supermodes
@ NETWORK
Network mode (Edges, junctions, etc..)
@ DATA
Data mode (edgeData, LaneData etc..)
@ DEMAND
Demand mode (Routes, Vehicles etc..)
NetworkEditMode
@brie enum for network edit modes
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_WIRE
Mode for editing wires.
@ NETWORK_CREATE_EDGE
mode for creating new edges
@ NETWORK_TLS
mode for editing tls
@ NETWORK_SELECT
mode for selecting network elements
@ NETWORK_INSPECT
mode for inspecting network elements
@ NETWORK_PROHIBITION
Mode for editing connection prohibitions.
@ NETWORK_NONE
empty Network mode
@ NETWORK_CONNECT
mode for connecting lanes
DemandEditMode
@brie enum for demand edit modes
@ DEMAND_INSPECT
mode for inspecting demand elements
@ DEMAND_DELETE
mode for deleting demand elements
@ DEMAND_SELECT
mode for selecting demand elements
@ DEMAND_MOVE
mode for moving demand elements
@ MID_GNE_NETWORKVIEWOPTIONS_AUTOOPPOSITEEDGES
automatically create opposite edge
@ MID_HOTKEY_CTRL_SHIFT_B_SAVEDATAELEMENTS
save Data Elements
@ MID_HOTKEY_F3_SUPERMODE_DEMAND
select demand supermode in netedit
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLPERSONPLANS
show all person plans
@ MID_GNE_DATAVIEWOPTIONS_TAZRELDRAWING
toggle TAZRel drawing
@ MID_HOTKEY_U_MODE_DECAL_TYPEDISTRIBUTION
hotkey for mode decal AND type distribution
@ MID_GNE_NETWORKVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
@ MID_GNE_NETWORKVIEWOPTIONS_MOVEELEVATION
move elevation instead of x,y
@ MID_GNE_NETWORKVIEWOPTIONS_HIDECONNECTIONS
hide connections
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWCONNECTIONS
show connections
@ MID_GNE_INTERVALBAR_BEGIN
begin changed in InterbalBar
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYTO
toggle draw TAZRel only to
@ MID_GNE_DATAVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWTAZELEMENTS
show TAZ elements
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKPERSON
lock person
@ MID_HOTKEY_Z_MODE_TAZ_TAZREL
hotkey for mode editing TAZ and TAZRel
@ MID_GNE_DEMANDVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
@ MID_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALS_STOPS
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
@ MID_GNE_NETWORKVIEWOPTIONS_ASKFORMERGE
ask before merging junctions
@ MID_GNE_TOGGLE_TIMEFORMAT
switch time format
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWGRID
show grid
@ MID_HOTKEY_CTRL_SHIFT_D_SAVEDEMANDELEMENTS
Save Demand Elements.
@ MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK
Stop the simulation in SUMO and save network in netedit.
@ MID_HOTKEY_D_MODE_SINGLESIMULATIONSTEP_DELETE
hotkey for perform a single simulation step in SUMO and set delete mode in netedit
@ MID_GNE_NETWORKVIEWOPTIONS_CHAINEDGES
create edges in chain mode
@ MID_GNE_DATAVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
@ MID_HOTKEY_C_MODE_CONNECT_CONTAINER
hotkey for mode connecting lanes AND container
@ MID_HOTKEY_H_MODE_PROHIBITION_CONTAINERPLAN
hotkey for mode prohibition AND container plan
@ MID_HOTKEY_W_MODE_WIRE_ROUTEDISTRIBUTION
hotkey for mode editing overhead wires AND route distributions
@ MID_HOTKEY_T_MODE_TLS_TYPE
hotkey for mode editing TLS AND Vehicle Types
@ MID_GNE_DEMANDVIEWOPTIONS_HIDESHAPES
hide shapes
@ MID_GNE_DATAVIEWOPTIONS_SHOWADDITIONALS
show additionals
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWBUBBLES
show junctions as bubbles
@ MID_GNE_INTERVALBAR_END
end changed in InterbalBar
@ MID_GNE_NETWORKVIEWOPTIONS_EXTENDSELECTION
extend selection
@ MID_HOTKEY_S_MODE_STOPSIMULATION_SELECT
hotkey for stop simulation in SUMO and set select mode in netedit
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWSUBADDITIONALS
show sub-additionals
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWALLCONTAINERPLANS
show all container plans
@ MID_GNE_VIEW_DEFAULT
set default view
@ MID_HOTKEY_F4_SUPERMODE_DATA
select data supermode in netedit
@ MID_GNE_VIEW_JUPEDSIM
set juPedSim view
@ MID_GNE_INTERVALBAR_PARAMETER
parameter changed in InterbalBar
@ MID_HOTKEY_R_MODE_CROSSING_ROUTE_EDGERELDATA
hotkey for mode editing crossing, routes and edge rel datas
@ MID_GNE_DATAVIEWOPTIONS_TAZDRAWFILL
toggle draw TAZ fill
@ MID_HOTKEY_CTRL_SHIFT_M_SAVEMEANDATAS
save Mean Datas
@ MID_HOTKEY_L_MODE_PERSONPLAN
hotkey for mode person plan
@ MID_HOTKEY_V_MODE_VEHICLE
hotkey for mode create vehicles
@ MID_HOTKEY_I_MODE_INSPECT
hotkey for mode inspecting object attributes
@ MID_GNE_NETWORKVIEWOPTIONS_SHOWDEMANDELEMENTS
show demand elements
@ MID_HOTKEY_CTRL_SHIFT_E_SAVENETEDITCONFIG
save netedit Config
@ MID_GNE_DEMANDVIEWOPTIONS_HIDENONINSPECTED
hide non-inspected demand element
@ MID_HOTKEY_CTRL_SHIFT_A_SAVEADDITIONALS
Save Additional Elements.
@ MID_GNE_INTERVALBAR_GENERICDATATYPE
generic data selected
@ MID_GNE_NETWORKVIEWOPTIONS_CHANGEALLPHASES
change all phases
@ MID_GNE_DATAVIEWOPTIONS_SHOWSHAPES
show shapes
@ MID_HOTKEY_E_MODE_EDGE_EDGEDATA
hotkey for mode adding edges AND edgeDatas
@ MID_GNE_DATAVIEWOPTIONS_TAZRELONLYFROM
toggle draw TAZRel only from
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
@ MID_GNE_DEMANDVIEWOPTIONS_DRAWSPREADVEHICLES
Draw vehicles in begin position or spread in lane.
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWOVERLAPPEDROUTES
show overlapped routes
@ MID_HOTKEY_CTRL_SHIFT_S_SAVESUMOCONFIG
save SUMOConfig (SUMO AND netedit)
@ MID_GNE_INTERVALBAR_DATASET
data set selected
@ MID_HOTKEY_M_MODE_MOVE_MEANDATA
hotkey for mode moving element AND mean data
@ MID_HOTKEY_F2_SUPERMODE_NETWORK
select network supermode in netedit
@ MID_GNE_DEMANDVIEWOPTIONS_LOCKCONTAINER
lock container
@ MID_GNE_NETWORKVIEWOPTIONS_SELECTEDGES
select edges
@ MID_GNE_DEMANDVIEWOPTIONS_SHOWTRIPS
show all trips
@ MID_GNE_NETWORKVIEWOPTIONS_TOGGLEGRID
show grid
@ MID_GNE_INTERVALBAR_LIMITED
enable/disable show data elements by interval
@ MID_HOTKEY_P_MODE_POLYGON_PERSON
hotkey for mode creating polygons
#define GUIDesignComboBoxWidth180
comboBox with thick frame, width 180
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignButtonPopup
checkable button placed in popup (for example, locate buttons)
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
#define GUIDesignButtonLeft
button extended over over Frame with thick and raise frame
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignTLSTableCheckableButtonIcon
checkable button only with icon used in TLSTable
#define GUIDesignComboBoxVisibleItemsFixed
#define GUIDesignTextFieldFixedRestricted(width, type)
text field with fixed width
#define GUIDesignMFXCheckableButtonSquare
#define GUIDesignButtonToolbarLocator
little checkable button with icon placed in navigation toolbar used specify for Locator
#define GUIDesignMFXCheckableButtonSupermode
checkable button with icon placed in navigation toolbar for supermodes
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
@ GLO_EDGERELDATA
edge relation data
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_WALKINGAREA
a walkingArea
@ GLO_JPS_WALKABLEAREA
walkable area
@ GLO_ROUTE_EMBEDDED
a route
@ GLO_TESTELEMENT
test element (used in netedit)
@ GLO_TRANSHIP
a container tranship
@ GLO_STOPPING_PLACE_LAST
reserved GLO type for packing all StoppingPlace elements
@ GLO_STOP_PLAN
a stop plan stop
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_WIRE
reserved GLO type for packing all wire elements
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ GLO_CONTAINER
a container
@ GLO_JPS_OBSTACLE
obstacles
@ GLO_CONNECTION
a connection
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_PERSONTRIP
a person trip
@ GLO_STOPPING_PLACE
reserved GLO type for packing all StoppingPlace elements
@ GLO_TRANSPORT
a container transport
@ GLO_POI
poi (over view, geo and lane)
@ GLO_RECTANGLESELECTION
rectangle selection shape (used in netedit)
@ GLO_CONTAINERFLOW
a person flow
@ GLO_PERSONFLOW
a person flow
@ GLO_TRACTIONSUBSTATION
a segment of an overhead line
@ GLO_LOCKICON
Lock icon (used in netedit)
GUIViewObjectsHandler gViewObjectsHandler
@ DATAMODE_CHECKBOX_SHOWADDITIONALS
@ NETWORKMODE_CHECKBOX_BUBBLES
@ DATAMODE_CHECKBOX_TAZRELONLYFROM
@ SAVE_ADDITIONALELEMENTS
@ DEMANDMODE_CHECKBOX_HIDENONINSPECTEDDEMANDELEMENTS
@ NETWORKMODE_CHECKBOX_HIDECONNECTIONS
@ DEMANDMODE_CHECKBOX_SHOWTRIPS
@ COMMONMODE_CHECKBOX_TOGGLEDRAWJUNCTIONSHAPE
@ DATAMODE_CHECKBOX_SHOWSHAPES
@ NETWORKMODE_CHECKBOX_SELECTEDGES
@ COMMONMODE_CHECKBOX_SHOWDEMANDELEMENTS
@ DEMANDMODE_CHECKBOX_LOCKPERSON
@ NETWORKMODE_CHECKBOX_APPLYTOALLPHASES
@ DATAMODE_CHECKBOX_TAZRELONLYTO
@ NETWORKMODE_CHECKBOX_AUTOSELECTJUNCTIONS
@ DATAMODE_CHECKBOX_TAZRELDRAWING
@ NETWORKMODE_CHECKBOX_SHOWCONNECTIONS
@ DEMANDMODE_CHECKBOX_SHOWPERSONPLANS
@ DEMANDMODE_CHECKBOX_HIDESHAPES
@ DATAMODE_CHECKBOX_TAZDRAWFILL
@ NETWORKMODE_CHECKBOX_ELEVATION
@ COMMONMODE_CHECKBOX_SPREADVEHICLE
@ DEMANDMODE_CHECKBOX_LOCKCONTAINER
@ NETWORKMODE_CHECKBOX_SHOWSUBADDITIONALS
@ NETWORKMODE_CHECKBOX_SHOWTAZELEMENTS
@ NETWORKMODE_CHECKBOX_CHAIN
@ DEMANDMODE_CHECKBOX_SHOWOVERLAPPEDROUTES
@ NETWORKMODE_CHECKBOX_ASKFORMERGE
@ COMMONMODE_CHECKBOX_TOGGLEGRID
@ DEMANDMODE_CHECKBOX_SHOWCONTAINERPLANS
@ NETWORKMODE_CHECKBOX_TWOWAY
#define WRITE_ERRORF(...)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_TAZ
a traffic assignment zone
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_TAZREL
a relation between two TAZs
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_SELECTED
element is selected
const double INVALID_DOUBLE
invalid double
#define UNUSED_PARAMETER(x)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
static void setColor(const RGBColor &c)
Sets the gl-color to this value.
static void popMatrix()
pop matrix
static void pushMatrix()
push matrix
An Element which don't belong to GNENet but has influence in the simulation.
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
GNENet * getNet() const
get pointer to net
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
bool isConvexAngle() const
check if edge makes a convex angle [0 - 180) degrees
NBEdge * getNBEdge() const
returns the internal NBEdge
An Element which don't belong to GNENet but has influence in the simulation.
An Element which don't belong to GNENet but has influence in the simulation.
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
static void commitMove(const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const GNEMoveOffset &offset, GNEUndoList *undoList)
commit move element for the given offset
static void moveElement(const GNEViewNet *viewNet, GNEMoveOperation *moveOperation, const GNEMoveOffset &offset)
move element the for given offset (note: offset can be X-Y-0, 0-0-Z or X-Y-Z)
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.
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
GNEViewNet * getViewNet() const
get view net
void setShapeEdited(const bool value)
set shape edited
An Element which don't belong to GNENet but has influence in the simulation.
bool isNetworkElement() const
element sets
bool isDataElement() const
return true if tag correspond to a data element
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
void setDataSet()
set dataSet
void setParameter()
set parameter
std::string getParameter() const
get parameter
void hideIntervalBar()
hide all options menu checks
void setGenericDataType()
set generic data type
double getBegin() const
get begin
void showIntervalBar()
show interval option bar
void disableIntervalBar()
disable interval bar
void updateIntervalBar()
update interval bar
void buildIntervalBarElements()
build interval bar elements
GNEDataSet * getDataSet() const
get dataSet
IntervalBar(GNEViewNet *viewNet)
default constructor
void enableIntervalBar()
enable interval bar
void setInterval()
update limit by interval
double getEnd() const
get end
SumoXMLTag getGenericDataType() const
get generic data type
~OperationLocked()
destructor
Supermode getSupermode() const
get supermode
OperationLocked()
constructor
void updateLockMenuBar()
update lock inspect menuBar
bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const
check if given GLObject is locked for inspect, select, delete and move
LockManager(GNEViewNet *viewNet)
constructor
std::map< GUIGlObjectType, OperationLocked > myLockedElements
map with locked elements
void updateFlags()
update flags
GNEViewNet * myViewNet
pointer to viewNet
std::vector< GNEConnection * > connections
vector with the connections
std::vector< GNEGenericData * > genericDatas
vector with the generic datas
std::vector< GNEPOI * > POIs
vector with the POIs
std::vector< GNEInternalLane * > internalLanes
vector with the internal lanes
std::vector< GUIGlObject * > GUIGlObjects
vector with the GUIGlObjects
std::vector< GNELane * > lanes
vector with the lanes
std::vector< GNETAZRelData * > TAZRelDatas
vector with the TAZ relation datas
std::vector< GNECrossing * > crossings
vector with the crossings
std::vector< GNEPoly * > polys
vector with the polys
std::vector< GNETAZ * > TAZs
vector with the TAZ elements
std::vector< GNEAdditional * > additionals
vector with the additional elements
std::vector< GNEAttributeCarrier * > attributeCarriers
vector with the attribute carriers
void clearElements()
clear elements
std::vector< GNENetworkElement * > networkElements
vector with the network elements
std::vector< GNEEdgeData * > edgeDatas
vector with the edge datas
std::vector< GNEEdgeRelData * > edgeRelDatas
vector with the edge relation datas
std::vector< GNEEdge * > edges
vector with the edges
void filterElements(const std::vector< const GUIGlObject * > &objects)
filter elements
std::vector< GNEJunction * > junctions
vector with the junctions
std::vector< GNEWalkingArea * > walkingAreas
vector with the walkingAreas
std::vector< GNEDemandElement * > demandElements
vector with the demand elements
ViewObjectsContainer()
constructor
GNEEdgeRelData * getEdgeRelDataElementFront() const
get edge rel data element or a pointer to nullptr
void updateObjects()
update objects (using gViewObjectsHandler)
GNEEdgeData * getEdgeDataElementFront() const
get edge data element or a pointer to nullptr
void updateShapeElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update shape elements
GNEConnection * getConnectionFront() const
get front connection or a pointer to nullptr
const std::vector< GNEAttributeCarrier * > & getAttributeCarriers() const
get vector with ACs
void filterEdges()
filter (remove) edges
GNEPoly * getPolyFront() const
get front Poly or a pointer to nullptr
void updateDemandElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update demand elements
void filterLockedElements(const std::vector< GUIGlObjectType > ignoreFilter={})
filter locked elements (except the ignoreFilter)
GNEPOI * getPOIFront() const
get front POI or a pointer to nullptr
GNEInternalLane * getInternalLaneFront() const
get front internal lane or a pointer to nullptr
void processGUIGlObjects(const GUIViewObjectsHandler::GLObjectsSortedContainer &objectsContainer)
process GL objects
const std::vector< GNETAZ * > & getTAZs() const
get vector with TAZs
GNEWalkingArea * getWalkingAreaFront() const
get front walkingArea or a pointer to nullptr
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
void updateAdditionalElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update additional elements
void updateGenericDataElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update generic data elements
void filterDemandElements(const bool includeRoutes)
filter (remove) demand elements
void updateTAZElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update TAZ elements
const std::vector< GNEDemandElement * > & getDemandElements() const
get vector with Demand Elements
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
void filterAdditionals(const bool includeStoppigPlaces, const bool includeTAZs)
filter (remove) additionals
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
void updateNetworkElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update network elements
GNEGenericData * getGenericDataElementFront() const
get generic data element or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNELane * getLaneFrontNonLocked() const
get front lane or a pointer to nullptr checking if is locked
const GUIGlObject * getGUIGlObjectFront() const
get front attribute carrier or a pointer to nullptr
GNENetworkElement * getNetworkElementFront() const
get front network element or a pointer to nullptr
const std::vector< GNEEdge * > & getEdges() const
get vector with edges
GNECrossing * getCrossingFront() const
get front crossing or a pointer to nullptr
ViewObjectsSelector()
default constructor
GNEJunction * getJunctionFront() const
get front junction or a pointer to nullptr
void filterLanes()
filter (remove) lanes
GNETAZRelData * getTAZRelDataElementFront() const
get TAZ rel data element or a pointer to nullptr
const std::vector< GUIGlObject * > & getGLObjects() const
get vector with GL objects
void filterShapes()
filter (remove) polys and POIs
const std::vector< GNEJunction * > & getJunctions() const
get vector with junctions
GNEDemandElement * getDemandElementFront() const
get front demand element or a pointer to nullptr
const std::vector< GNELane * > & getLanes() const
get lanes
const std::vector< GNEAdditional * > & getAdditionals() const
get vector with additionals
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual bool isGLObjectLocked() const
check if element is locked (Currently used only in netedit)
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static GUIGlID getTexture(GUITexture which)
returns a texture previously defined in the enum GUITexture
static void drawTexturedBox(int which, double size)
Draws a named texture as a box with the given size.
std::map< double, std::vector< ObjectContainer > > GLObjectsSortedContainer
typedef
const GLObjectsSortedContainer & getSelectedObjects() const
get all elements under cursor sorted by layer
const PositionVector & getGeometry() const
Returns the geometry of the edge.
bool set(const std::string &name, const std::string &value, const bool append=false)
Sets the given value for the named option.
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
void resetWritable()
Resets all options to be writeable.
static OptionsCont & getOptions()
Retrieves the options.
C++ TraCI client API implementation.
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
double y() const
Returns the y-position.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor BLUE
static const RGBColor YELLOW
static const RGBColor MAGENTA
struct for processing menu commands
MFXMenuCheckIcon * menuCheckLockConnections
menu check to lock connections
MFXMenuCheckIcon * menuCheckLockPersonTrip
menu check to lock personTrips
MFXMenuCheckIcon * menuCheckLockPersons
menu check to lock persons
MFXMenuCheckIcon * menuCheckLockVehicles
menu check to lock vehicles
MFXMenuCheckIcon * menuCheckLockCrossings
menu check to lock crossings
MFXMenuCheckIcon * menuCheckLockRoutes
MFXMenuCheckIcon * menuCheckLockTAZs
menu check to lock TAZs
MFXMenuCheckIcon * menuCheckLockWalk
menu check to lock walks
MFXMenuCheckIcon * menuCheckLockEdgeTAZRels
menu check to lock edgeTAZRels
MFXMenuCheckIcon * menuCheckLockJunction
MFXMenuCheckIcon * menuCheckLockWires
menu check to lock Wires
MFXMenuCheckIcon * menuCheckLockPOIs
menu check to lock POIs
MFXMenuCheckIcon * menuCheckLockPolygons
menu check to lock polygons
MFXMenuCheckIcon * menuCheckLockWalkingAreas
menu check to lock walkingAreas
MFXMenuCheckIcon * menuCheckLockEdgeDatas
MFXMenuCheckIcon * menuCheckLockEdges
menu check to lock edges
MFXMenuCheckIcon * menuCheckLockRides
menu check to lock rides
MFXMenuCheckIcon * menuCheckLockContainers
menu check to lock containers
MFXMenuCheckIcon * menuCheckLockJpsWalkableAreas
menu check to lock jps walkableareas
MFXMenuCheckIcon * menuCheckLockEdgeRelDatas
menu check to lock edgeRelDatas
MFXMenuCheckIcon * menuCheckLockStops
menu check to lock stops
MFXMenuCheckIcon * menuCheckLockLanes
menu check to lock lanes
MFXMenuCheckIcon * menuCheckLockAdditionals
menu check to lock additionals
MFXMenuCheckIcon * menuCheckLockJpsObstacles
menu check to lock jps obstacles
MFXMenuCheckIcon * menuCheckLockTranships
menu check to lock tranships
MFXMenuCheckIcon * menuCheckLockTransports
menu check to lock transports
DataViewOptions(GNEViewNet *viewNet)
default constructor
bool TAZRelOnlyTo() const
check if toggle TAZRel only to checkbox is enabled
void hideDataViewOptionsMenuChecks()
hide all options menu checks
bool showAdditionals() const
check if additionals has to be drawn
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool TAZRelOnlyFrom() const
check if toggle TAZRel only from checkbox is enabled
bool TAZDrawFill() const
check if toggle TAZ draw fill checkbox is enabled
void buildDataViewOptionsMenuChecks()
build menu checks
void getVisibleDataMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible demand menu commands
bool showShapes() const
check if shapes has to be drawn
bool TAZRelDrawing() const
check if toggle TAZRel drawing checkbox is enabled
void lockPerson(const GNEDemandElement *person)
lock person
bool showAllPersonPlans() const
check all person plans has to be show
void lockContainer(const GNEDemandElement *container)
lock container
void buildDemandViewOptionsMenuChecks()
build menu checks
const GNEDemandElement * getLockedPerson() const
get locked person
const GNEDemandElement * getLockedContainer() const
get locked container
bool showShapes() const
check if shapes has to be drawn
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
bool showAllContainerPlans() const
check all container plans has to be show
void unlockContainer()
unlock container
void unlockPerson()
unlock person
bool drawSpreadVehicles() const
check if vehicles must be drawn spread
bool showNonInspectedDemandElements(const GNEDemandElement *demandElement) const
check if non inspected element has to be hidden
DemandViewOptions(GNEViewNet *viewNet)
default constructor
bool showOverlappedRoutes() const
show overlapped routes
void getVisibleDemandMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible demand menu commands
bool showAllTrips() const
check if trips has to be drawn
void buildSuperModeButtons()
build checkable buttons
bool isDefaultView() const
check if default view is enabled
NetworkEditMode networkEditMode
the current Network edit mode
bool isCurrentSupermodeDemand() const
@check if current supermode is Demand
void setDemandEditMode(DemandEditMode demandMode, const bool force=false)
set Demand edit mode
bool isCurrentSupermodeData() const
@check if current supermode is Data
void setView(FXSelector sel)
set view
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
bool isJuPedSimView() const
check if default view is enabled
void setSupermode(Supermode supermode, const bool force)
set supermode
void setNetworkEditMode(NetworkEditMode networkMode, const bool force=false)
set Network edit mode
EditModes(GNEViewNet *viewNet)
constructor
void setDataEditMode(DataEditMode dataMode, const bool force=false)
set Data edit mode
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
void stopEditCustomShape()
edit edit shape
EditNetworkElementShapes(GNEViewNet *viewNet)
default constructor
void startEditCustomShape(GNENetworkElement *element)
start edit custom shape
void commitShapeEdited()
save edited shape
static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const double exaggeration)
check if icon can be drawn
static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position position, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
void moveSelection(const bool mouseLeftButtonPressed)
move selection
void calculateEdgeSelection(const GNEEdge *clickedEdge)
calculate edge selection
const GNEMoveOffset calculateMoveOffset() const
calculate move offset
bool isCurrentlyMovingMultipleElements() const
check if there are moving elements
void finishMoveSelection()
finish moving selection
double getEdgeOffset() const
edge offset
bool isMovingSelection() const
check if currently there is element being moved
void beginMoveSelection()
begin move selection
void resetMovingSelectedEdge()
reset flag for moving edge
void calculateJunctionSelection()
calculate junction selection
MoveMultipleElementModul(GNEViewNet *viewNet)
constructor
bool isMovingSelectedEdge() const
flag for moving edge
const GNEMoveOffset calculateMoveOffset() const
calculate offset
MoveSingleElementModul(GNEViewNet *viewNet)
constructor
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
void moveSingleElement(const bool mouseLeftButtonPressed)
move single element in Network AND Demand mode
GNEMoveElement * getMovedElement() const
get moved element
bool isCurrentlyMovingSingleElement() const
check if there are moving elements
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
bool beginMoveNetworkElementShape()
begin move network elementshape
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
bool showConnections() const
check if select show connections checkbox is enabled
bool drawSpreadVehicles() const
check if vehicles must be drawn spread
bool editingElevation() const
check if we're editing elevation
void getVisibleNetworkMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible network menu commands
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool showSubAdditionals() const
check if show sub-additionals
bool selectEdges() const
check if select edges checkbox is enabled
bool showTAZElements() const
check if show TAZ Elements
NetworkViewOptions(GNEViewNet *viewNet)
default constructor
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
void buildNetworkViewOptionsMenuChecks()
build menu checks
~SaveElements()
destructor
SaveElements(GNEViewNet *viewNet)
default constructor
void setSaveIndividualFiles(bool value)
enable or disable save individual files
void buildSaveElementsButtons()
build save buttons
void finishRectangleSelection()
finish rectangle selection
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
void beginRectangleSelection()
begin rectangle selection
void moveRectangleSelection()
move rectangle selection
void processBoundarySelection(const Boundary &boundary)
Process boundary Selection.
void processRectangleSelection()
process rectangle Selection
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
SelectingArea(GNEViewNet *viewNet)
default constructor
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
TestingMode(GNEViewNet *viewNet)
default constructor
void initTestingMode()
init testing mode
void buildVehicleOptionsMenuChecks()
build menu checks
VehicleOptions(GNEViewNet *viewNet)
constructor
void hideVehicleOptionsMenuChecks()
hide all options menu checks
VehicleTypeOptions(GNEViewNet *viewNet)
constructor
void buildVehicleTypeOptionsMenuChecks()
build menu checks
void hideVehicleTypeOptionsMenuChecks()
hide all options menu checks
static std::vector< RGBColor > myRainbowScaledColors
scale (rainbow) colors
static const RGBColor & getRainbowScaledColor(const double min, const double max, const double value)
get rainbow scaled color
static std::vector< GUIGlObject * > filterElementsByLayer(const std::vector< GUIGlObject * > &GLObjects)
filter elements based on the layer
static const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors