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) {
226 myInspectedACs.clear();
228 myFirstInspectedAC = AC;
229 myInspectedACs.insert(AC);
231 myFirstInspectedAC =
nullptr;
238 myInspectedACs.clear();
239 if (ACs.size() > 0) {
240 myFirstInspectedAC = ACs.front();
241 for (
const auto& AC : ACs) {
242 myInspectedACs.insert(AC);
245 myFirstInspectedAC =
nullptr;
252 auto it = myInspectedACs.find(AC);
253 if (it != myInspectedACs.end()) {
254 myInspectedACs.erase(it);
255 if (myInspectedACs.size() == 0) {
256 myInspectedACs.clear();
257 myFirstInspectedAC =
nullptr;
258 }
else if (myFirstInspectedAC == AC) {
259 myFirstInspectedAC = (*myInspectedACs.begin());
267 return myFirstInspectedAC;
271const std::unordered_set<GNEAttributeCarrier*>&
273 return myInspectedACs;
279 if (myInspectedACs.empty()) {
281 }
else if (myFirstInspectedAC == AC) {
284 return myInspectedACs.find(AC) != myInspectedACs.end();
291 if (myInspectedACs.empty()) {
293 }
else if (myFirstInspectedAC == AC) {
304 return myInspectedACs.size() > 0;
310 return myInspectedACs.size() == 1;
316 return myInspectedACs.size() > 1;
331 myViewObjects.clearElements();
340 std::vector<const GUIGlObject*> edges;
341 for (
const auto& edge : myViewObjects.edges) {
342 edges.push_back(edge);
344 myViewObjects.filterElements(edges);
351 std::vector<const GUIGlObject*> lanes;
352 for (
const auto& lane : myViewObjects.lanes) {
353 lanes.push_back(lane);
355 myViewObjects.filterElements(lanes);
362 std::vector<const GUIGlObject*> shapes;
363 for (
const auto& poly : myViewObjects.polys) {
364 shapes.push_back(poly);
366 for (
const auto&
POI : myViewObjects.POIs) {
367 shapes.push_back(
POI);
369 myViewObjects.filterElements(shapes);
376 std::vector<const GUIGlObject*> additionals;
377 for (
const auto& additional : myViewObjects.additionals) {
380 }
else if (!includeTAZs && (additional->getType() ==
GLO_TAZ)) {
383 additionals.push_back(additional);
386 myViewObjects.filterElements(additionals);
393 std::vector<const GUIGlObject*> demandElements;
394 for (
const auto& demandElement : myViewObjects.demandElements) {
395 if (!includeRoutes && (demandElement->getType() ==
GLO_ROUTE)) {
398 demandElements.push_back(demandElement);
401 myViewObjects.filterElements(demandElements);
407 std::vector<const GUIGlObject*> GUIGlObjects;
409 for (
const auto&
GUIGlObject : myViewObjects.GUIGlObjects) {
415 for (
const auto& ignoredType : ignoreFilter) {
416 auto it = GUIGlObjects.begin();
417 while (it != GUIGlObjects.end()) {
418 if ((*it)->getType() == ignoredType) {
419 it = GUIGlObjects.erase(it);
426 myViewObjects.filterElements(GUIGlObjects);
432 if (myViewObjects.GUIGlObjects.size() > 0) {
433 return myViewObjects.GUIGlObjects.front();
442 if (myViewObjects.attributeCarriers.size() > 0) {
443 return myViewObjects.attributeCarriers.front();
452 if (myViewObjects.networkElements.size() > 0) {
453 return myViewObjects.networkElements.front();
462 if (myViewObjects.additionals.size() > 0) {
463 return myViewObjects.additionals.front();
472 if (myViewObjects.demandElements.size() > 0) {
473 return myViewObjects.demandElements.front();
482 if (myViewObjects.genericDatas.size() > 0) {
483 return myViewObjects.genericDatas.front();
492 if (myViewObjects.junctions.size() > 0) {
493 return myViewObjects.junctions.front();
502 if (myViewObjects.edges.size() > 0) {
503 return myViewObjects.edges.front();
512 if (myViewObjects.lanes.size() > 0) {
513 return myViewObjects.lanes.front();
522 if (myViewObjects.lanes.size() > 0) {
523 for (
auto& lane : myViewObjects.lanes) {
524 if (!(lane->isAttributeCarrierSelected() || lane->getParentEdge()->isAttributeCarrierSelected()) ||
525 !myViewNet->getViewParent()->getGNEAppWindows()->getLockMenuCommands().menuCheckLockSelectedElements->getCheck()) {
537const std::vector<GNELane*>&
539 return myViewObjects.lanes;
545 if (myViewObjects.crossings.size() > 0) {
546 return myViewObjects.crossings.front();
555 if (myViewObjects.walkingAreas.size() > 0) {
556 return myViewObjects.walkingAreas.front();
565 if (myViewObjects.connections.size() > 0) {
566 return myViewObjects.connections.front();
575 if (myViewObjects.internalLanes.size() > 0) {
576 return myViewObjects.internalLanes.front();
585 if (myViewObjects.POIs.size() > 0) {
586 return myViewObjects.POIs.front();
595 if (myViewObjects.polys.size() > 0) {
596 return myViewObjects.polys.front();
605 if (myViewObjects.TAZs.size() > 0) {
606 return myViewObjects.TAZs.front();
615 if (myViewObjects.edgeDatas.size() > 0) {
616 return myViewObjects.edgeDatas.front();
625 if (myViewObjects.edgeRelDatas.size() > 0) {
626 return myViewObjects.edgeRelDatas.front();
635 if (myViewObjects.TAZRelDatas.size() > 0) {
636 return myViewObjects.TAZRelDatas.front();
643const std::vector<GUIGlObject*>&
645 return myViewObjects.GUIGlObjects;
649const std::vector<GNEAttributeCarrier*>&
651 return myViewObjects.attributeCarriers;
655const std::vector<GNEJunction*>&
657 return myViewObjects.junctions;
661const std::vector<GNEEdge*>&
663 return myViewObjects.edges;
666const std::vector<GNETAZ*>&
668 return myViewObjects.TAZs;
671const std::vector<GNEAdditional*>&
673 return myViewObjects.additionals;
676const std::vector<GNEDemandElement*>&
678 return myViewObjects.demandElements;
688 GUIGlObjects.clear();
689 attributeCarriers.clear();
690 networkElements.clear();
692 demandElements.clear();
697 walkingAreas.clear();
699 internalLanes.clear();
703 genericDatas.clear();
705 edgeRelDatas.clear();
712 for (
const auto&
object : objects) {
714 auto itGlObjects = GUIGlObjects.begin();
715 while (itGlObjects != GUIGlObjects.end()) {
716 if (*itGlObjects ==
object) {
717 itGlObjects = GUIGlObjects.erase(itGlObjects);
723 auto itACs = attributeCarriers.begin();
724 while (itACs != attributeCarriers.end()) {
725 if ((*itACs)->getGUIGlObject() == object) {
726 itACs = attributeCarriers.erase(itACs);
732 auto itNetworkElements = networkElements.begin();
733 while (itNetworkElements != networkElements.end()) {
734 if ((*itNetworkElements)->getGUIGlObject() == object) {
735 itNetworkElements = networkElements.erase(itNetworkElements);
741 auto itAdditionals = additionals.begin();
742 while (itAdditionals != additionals.end()) {
743 if ((*itAdditionals)->getGUIGlObject() == object) {
744 itAdditionals = additionals.erase(itAdditionals);
750 auto itDemandElements = demandElements.begin();
751 while (itDemandElements != demandElements.end()) {
752 if ((*itDemandElements)->getGUIGlObject() == object) {
753 itDemandElements = demandElements.erase(itDemandElements);
759 auto itGenericDatas = genericDatas.begin();
760 while (itGenericDatas != genericDatas.end()) {
761 if ((*itGenericDatas)->getGUIGlObject() == object) {
762 itGenericDatas = genericDatas.erase(itGenericDatas);
768 auto itJunctions = junctions.begin();
769 while (itJunctions != junctions.end()) {
770 if ((*itJunctions)->getGUIGlObject() == object) {
771 itJunctions = junctions.erase(itJunctions);
777 auto itEdges = edges.begin();
778 while (itEdges != edges.end()) {
779 if ((*itEdges)->getGUIGlObject() == object) {
780 itEdges = edges.erase(itEdges);
786 auto itLanes = lanes.begin();
787 while (itLanes != lanes.end()) {
788 if ((*itLanes)->getGUIGlObject() == object) {
789 itLanes = lanes.erase(itLanes);
795 auto itCrossings = crossings.begin();
796 while (itCrossings != crossings.end()) {
797 if ((*itCrossings)->getGUIGlObject() == object) {
798 itCrossings = crossings.erase(itCrossings);
804 auto itWalkingAreas = walkingAreas.begin();
805 while (itWalkingAreas != walkingAreas.end()) {
806 if ((*itWalkingAreas)->getGUIGlObject() == object) {
807 itWalkingAreas = walkingAreas.erase(itWalkingAreas);
813 auto itConnections = connections.begin();
814 while (itConnections != connections.end()) {
815 if ((*itConnections)->getGUIGlObject() == object) {
816 itConnections = connections.erase(itConnections);
822 auto itInternalLanes = internalLanes.begin();
823 while (itInternalLanes != internalLanes.end()) {
824 if ((*itInternalLanes)->getGUIGlObject() == object) {
825 itInternalLanes = internalLanes.erase(itInternalLanes);
831 auto itTAZs = TAZs.begin();
832 while (itTAZs != TAZs.end()) {
833 if ((*itTAZs)->getGUIGlObject() == object) {
834 itTAZs = TAZs.erase(itTAZs);
840 auto itPOIs = POIs.begin();
841 while (itPOIs != POIs.end()) {
842 if ((*itPOIs)->getGUIGlObject() == object) {
843 itPOIs = POIs.erase(itPOIs);
849 auto itPolys = polys.begin();
850 while (itPolys != polys.end()) {
851 if ((*itPolys)->getGUIGlObject() == object) {
852 itPolys = polys.erase(itPolys);
858 auto itEdgeDatas = edgeDatas.begin();
859 while (itEdgeDatas != edgeDatas.end()) {
860 if ((*itEdgeDatas)->getGUIGlObject() == object) {
861 itEdgeDatas = edgeDatas.erase(itEdgeDatas);
867 auto itEdgeRelDatas = edgeRelDatas.begin();
868 while (itEdgeRelDatas != edgeRelDatas.end()) {
869 if ((*itEdgeRelDatas)->getGUIGlObject() == object) {
870 itEdgeRelDatas = edgeRelDatas.erase(itEdgeRelDatas);
876 auto itTAZRelDatas = TAZRelDatas.begin();
877 while (itTAZRelDatas != TAZRelDatas.end()) {
878 if ((*itTAZRelDatas)->getGUIGlObject() == object) {
879 itTAZRelDatas = TAZRelDatas.erase(itTAZRelDatas);
891 const auto frontGLObject = myViewNet->getFrontGLObject();
898 if (glObject == frontGLObject) {
915 auto edge = myViewNet->getNet()->getAttributeCarriers()->retrieveEdge(glObject->
getMicrosimID());
917 if (glObject == frontGLObject) {
919 container.
edges.insert(container.
edges.begin(), edge);
925 container.
edges.push_back(edge);
934 auto lane = myViewNet->getNet()->getAttributeCarriers()->retrieveLane(glObject);
936 if (glObject == frontGLObject) {
938 container.
lanes.insert(container.
lanes.begin(), lane);
944 container.
lanes.push_back(lane);
953 auto crossing = myViewNet->getNet()->getAttributeCarriers()->retrieveCrossing(glObject);
955 if (glObject == frontGLObject) {
972 auto walkingArea = myViewNet->getNet()->getAttributeCarriers()->retrieveWalkingArea(glObject);
974 if (glObject == frontGLObject) {
991 auto connection = myViewNet->getNet()->getAttributeCarriers()->retrieveConnection(glObject);
993 if (glObject == frontGLObject) {
1010 auto internalLane = myViewNet->getNet()->getAttributeCarriers()->retrieveInternalLane(glObject);
1012 if (glObject == frontGLObject) {
1034 auto additionalElement = myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject,
false);
1035 if (additionalElement) {
1037 if (additionalElement == myViewNet->getFrontAttributeCarrier()) {
1044 container.
additionals.push_back(additionalElement);
1057 auto POI =
dynamic_cast<GNEPOI*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
1059 if (glObject == myViewNet->getFrontGLObject()) {
1061 container.
POIs.insert(container.
POIs.begin(),
POI);
1064 container.
POIs.push_back(
POI);
1068 auto poly =
dynamic_cast<GNEPoly*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
1070 if (glObject == myViewNet->getFrontGLObject()) {
1072 container.
polys.insert(container.
polys.begin(), poly);
1075 container.
polys.push_back(poly);
1086 auto TAZ =
dynamic_cast<GNETAZ*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveAdditional(glObject));
1088 if (glObject == myViewNet->getFrontGLObject()) {
1090 container.
TAZs.insert(container.
TAZs.begin(),
TAZ);
1093 container.
TAZs.push_back(
TAZ);
1103 if (demandElement) {
1105 if (demandElement == myViewNet->getFrontAttributeCarrier()) {
1123 switch (glObject->
getType()) {
1126 auto edgeData =
dynamic_cast<GNEEdgeData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1128 if (glObject == myViewNet->getFrontGLObject()) {
1136 container.
edgeDatas.push_back(edgeData);
1145 auto edgeRelData =
dynamic_cast<GNEEdgeRelData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1147 if (glObject == myViewNet->getFrontGLObject()) {
1164 auto TAZRelData =
dynamic_cast<GNETAZRelData*
>(myViewNet->getNet()->getAttributeCarriers()->retrieveGenericData(glObject));
1166 if (glObject == myViewNet->getFrontGLObject()) {
1190 for (
const auto& glObjectLayer : objectsContainer) {
1191 for (
const auto& glObject : glObjectLayer.second) {
1193 updateNetworkElements(myViewObjects, glObject.object);
1194 updateAdditionalElements(myViewObjects, glObject.object);
1195 updateShapeElements(myViewObjects, glObject.object);
1196 updateTAZElements(myViewObjects, glObject.object);
1197 updateDemandElements(myViewObjects, glObject.object);
1198 updateGenericDataElements(myViewObjects, glObject.object);
1205 myViewNet(nullptr) {
1213 myEventInfo(nullptr) {
1219 myEventInfo = (FXEvent*) eventData;
1226 return (myEventInfo->state & SHIFTMASK) != 0;
1236 return (myEventInfo->state & CONTROLMASK) != 0;
1246 return (myEventInfo->state & ALTMASK) != 0;
1256 return (myEventInfo->state & LEFTBUTTONMASK) != 0;
1266 return (myEventInfo->state & RIGHTBUTTONMASK) != 0;
1277 myViewNet(viewNet) {
1284 myRelativeClickedPosition = myViewNet->getPositionInformation();
1286 const GNENetworkElement* editedElement = myViewNet->myEditNetworkElementShapes.getEditedNetworkElement();
1288 if (myViewNet->myViewObjectsSelector.getJunctionFront() && (myViewNet->myViewObjectsSelector.getJunctionFront() == editedElement)) {
1290 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getJunctionFront()->getMoveOperation();
1292 if (moveOperation) {
1293 myMoveOperation = moveOperation;
1298 }
else if (myViewNet->myViewObjectsSelector.getLaneFront() && (myViewNet->myViewObjectsSelector.getLaneFront() == editedElement)) {
1300 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getLaneFront()->getMoveOperation();
1302 if (moveOperation) {
1303 myMoveOperation = moveOperation;
1308 }
else if (myViewNet->myViewObjectsSelector.getCrossingFront() && (myViewNet->myViewObjectsSelector.getCrossingFront() == editedElement)) {
1310 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getCrossingFront()->getMoveOperation();
1312 if (moveOperation) {
1313 myMoveOperation = moveOperation;
1318 }
else if (myViewNet->myViewObjectsSelector.getConnectionFront() && (myViewNet->myViewObjectsSelector.getConnectionFront() == editedElement)) {
1320 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getConnectionFront()->getMoveOperation();
1322 if (moveOperation) {
1323 myMoveOperation = moveOperation;
1328 }
else if (myViewNet->myViewObjectsSelector.getWalkingAreaFront() && (myViewNet->myViewObjectsSelector.getWalkingAreaFront() == editedElement)) {
1330 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getWalkingAreaFront()->getMoveOperation();
1332 if (moveOperation) {
1333 myMoveOperation = moveOperation;
1348 myRelativeClickedPosition = myViewNet->getPositionInformation();
1350 const GNEAttributeCarrier* frontAC = myViewNet->myViewObjectsSelector.getAttributeCarrierFront();
1352 if (myViewNet->myViewObjectsSelector.getPolyFront() && (frontAC == myViewNet->myViewObjectsSelector.getPolyFront())) {
1354 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getPolyFront()->getMoveOperation();
1356 if (moveOperation) {
1357 myMoveOperation = moveOperation;
1362 }
else if (myViewNet->myViewObjectsSelector.getPOIFront() && (frontAC == myViewNet->myViewObjectsSelector.getPOIFront())) {
1364 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getPOIFront()->getMoveOperation();
1366 if (moveOperation) {
1367 myMoveOperation = moveOperation;
1372 }
else if (myViewNet->myViewObjectsSelector.getAdditionalFront() && (frontAC == myViewNet->myViewObjectsSelector.getAdditionalFront())) {
1374 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getAdditionalFront()->getMoveOperation();
1376 if (moveOperation) {
1377 myMoveOperation = moveOperation;
1382 }
else if (myViewNet->myViewObjectsSelector.getJunctionFront() && (frontAC == myViewNet->myViewObjectsSelector.getJunctionFront())) {
1384 if (myViewNet->myViewObjectsSelector.getEdgeFront() && (myViewNet->myViewObjectsSelector.getEdgeFront()->clickedOverGeometryPoint(myRelativeClickedPosition))) {
1386 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getEdgeFront()->getMoveOperation();
1388 if (moveOperation) {
1389 myMoveOperation = moveOperation;
1396 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getJunctionFront()->getMoveOperation();
1398 if (moveOperation) {
1399 myMoveOperation = moveOperation;
1405 }
else if (myViewNet->myViewObjectsSelector.getEdgeFront() && (frontAC == myViewNet->myViewObjectsSelector.getEdgeFront())) {
1407 if (myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1409 myViewNet->myViewObjectsSelector.getEdgeFront()->editEndpoint(myViewNet->getPositionInformation(), myViewNet->myUndoList);
1414 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getEdgeFront()->getMoveOperation();
1416 if (moveOperation) {
1417 myMoveOperation = moveOperation;
1423 }
else if (myViewNet->myViewObjectsSelector.getLaneFront() && (frontAC == myViewNet->myViewObjectsSelector.getLaneFront())) {
1425 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getLaneFront()->getMoveOperation();
1427 if (moveOperation) {
1428 myMoveOperation = moveOperation;
1443 myRelativeClickedPosition = myViewNet->getPositionInformation();
1445 const GNEAttributeCarrier* frontAC = myViewNet->myViewObjectsSelector.getAttributeCarrierFront();
1447 if (myViewNet->myViewObjectsSelector.getDemandElementFront() && (frontAC == myViewNet->myViewObjectsSelector.getDemandElementFront())) {
1449 GNEMoveOperation* moveOperation = myViewNet->myViewObjectsSelector.getDemandElementFront()->getMoveOperation();
1451 if (moveOperation) {
1452 myMoveOperation = moveOperation;
1467 if (myMoveOperation) {
1471 if (mouseLeftButtonPressed) {
1478 delete myMoveOperation;
1479 myMoveOperation =
nullptr;
1487 if (myMoveOperation) {
1492 delete myMoveOperation;
1493 myMoveOperation =
nullptr;
1500 return myMoveOperation !=
nullptr;
1506 if (myMoveOperation) {
1518 Position moveOffset = (myViewNet->getPositionInformation() - myViewNet->myMoveSingleElement.myRelativeClickedPosition);
1520 if (myViewNet->myNetworkViewOptions.menuCheckMoveElevation->shown() && myViewNet->myNetworkViewOptions.menuCheckMoveElevation->amChecked() == TRUE) {
1535 myMovingSelectedEdge(false),
1543 myClickedPosition = myViewNet->getPositionInformation();
1545 if (myViewNet->myViewObjectsSelector.getJunctionFront()) {
1546 calculateJunctionSelection();
1547 }
else if (myViewNet->myViewObjectsSelector.getEdgeFront()) {
1548 calculateEdgeSelection(myViewNet->myViewObjectsSelector.getEdgeFront());
1550 myViewNet->updateViewNet();
1559 if (mouseLeftButtonPressed) {
1561 for (
const auto& moveOperation : myMoveOperations) {
1565 }
else if (myMoveOperations.size() > 0) {
1569 for (
const auto& moveOperation : myMoveOperations) {
1573 delete moveOperation;
1576 myViewNet->getUndoList()->end();
1578 myMoveOperations.clear();
1590 for (
const auto& moveOperation : myMoveOperations) {
1593 delete moveOperation;
1596 myViewNet->getUndoList()->end();
1598 myMoveOperations.clear();
1604 return (myMoveOperations.size() > 0);
1610 return myMovingSelectedEdge;
1616 myMovingSelectedEdge =
false;
1622 return myEdgeOffset;
1628 return myMoveOperations.size() > 0;
1636 Position moveOffset = (myViewNet->getPositionInformation() - myClickedPosition);
1638 if (myViewNet->myNetworkViewOptions.menuCheckMoveElevation->shown() && myViewNet->myNetworkViewOptions.menuCheckMoveElevation->amChecked() == TRUE) {
1653 const auto selectedJunctions = myViewNet->getNet()->getAttributeCarriers()->getSelectedJunctions();
1655 for (
const auto& junction : selectedJunctions) {
1656 moveOperation = junction->getMoveOperation();
1657 if (moveOperation) {
1658 myMoveOperations.push_back(moveOperation);
1662 const auto selectedEdges = myViewNet->getNet()->getAttributeCarriers()->getSelectedEdges();
1664 for (
const auto& edge : selectedEdges) {
1665 moveOperation = edge->getMoveOperation();
1666 if (moveOperation) {
1667 myMoveOperations.push_back(moveOperation);
1676 const auto selectedJunctions = myViewNet->getNet()->getAttributeCarriers()->getSelectedJunctions();
1678 for (
const auto& junction : selectedJunctions) {
1680 if (moveOperation) {
1681 myMoveOperations.push_back(moveOperation);
1685 myMovingSelectedEdge =
true;
1692 myEdgeOffset = shape.length2D() - shape.nearest_offset_to_point2D(myViewNet->getPositionInformation());
1695 const auto selectedEdges = myViewNet->getNet()->getAttributeCarriers()->getSelectedEdges();
1697 for (
const auto& edge : selectedEdges) {
1700 if (moveOperation) {
1701 myMoveOperations.push_back(moveOperation);
1711 myViewNet(viewNet) {
1732 myViewNet(viewNet) {
1753 selectingUsingRectangle(false),
1754 startDrawing(false),
1755 myViewNet(viewNet) {
1761 selectingUsingRectangle =
true;
1762 selectionCorner1 = myViewNet->getPositionInformation();
1763 selectionCorner2 = selectionCorner1;
1770 startDrawing =
true;
1772 selectionCorner2 = myViewNet->getPositionInformation();
1774 myViewNet->setStatusBarText(
TL(
"Selection width:") +
toString(fabs(selectionCorner1.x() - selectionCorner2.x()))
1775 +
TL(
" height:") +
toString(fabs(selectionCorner1.y() - selectionCorner2.y()))
1776 +
TL(
" diagonal:") +
toString(selectionCorner1.distanceTo2D(selectionCorner2)));
1783 selectingUsingRectangle =
false;
1784 startDrawing =
false;
1786 myViewNet->setStatusBarText(
"");
1793 if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) &&
1794 (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) &&
1795 myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1798 rectangleBoundary.
add(selectionCorner1);
1799 rectangleBoundary.
add(selectionCorner2);
1801 processBoundarySelection(rectangleBoundary);
1806std::vector<GNEEdge*>
1809 if ((abs(selectionCorner1.x() - selectionCorner2.x()) > 0.01) &&
1810 (abs(selectionCorner1.y() - selectionCorner2.y()) > 0.01) &&
1811 myViewNet->myMouseButtonKeyPressed.shiftKeyPressed()) {
1814 rectangleBoundary.
add(selectionCorner1);
1815 rectangleBoundary.
add(selectionCorner2);
1817 myViewNet->updateObjectsInBoundary(rectangleBoundary);
1819 return myViewNet->getViewObjectsSelector().getEdges();
1828 if (selectingUsingRectangle) {
1833 glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
1835 glVertex2d(selectionCorner1.x(), selectionCorner1.y());
1836 glVertex2d(selectionCorner1.x(), selectionCorner2.y());
1837 glVertex2d(selectionCorner2.x(), selectionCorner2.y());
1838 glVertex2d(selectionCorner2.x(), selectionCorner1.y());
1847 const bool selEdges = myViewNet->myNetworkViewOptions.selectEdges();
1849 myViewNet->updateObjectsInBoundary(boundary);
1851 std::set<GNEAttributeCarrier*> ACsFiltered;
1852 for (
const auto& AC : myViewNet->getViewObjectsSelector().getAttributeCarriers()) {
1853 if (!AC->getGUIGlObject()->isGLObjectLocked()) {
1854 if (myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
1855 if (AC->getTagProperty().isNetworkElement() || AC->getTagProperty().isAdditionalElement()) {
1856 if ((AC->getTagProperty().getTag() ==
SUMO_TAG_EDGE && !selEdges)
1857 || (AC->getTagProperty().getTag() ==
SUMO_TAG_LANE && selEdges)) {
1860 ACsFiltered.insert(AC);
1862 }
else if (myViewNet->myEditModes.isCurrentSupermodeDemand() && AC->getTagProperty().isDemandElement()) {
1863 ACsFiltered.insert(AC);
1864 }
else if (myViewNet->myEditModes.isCurrentSupermodeData() && AC->getTagProperty().isGenericData()) {
1865 ACsFiltered.insert(AC);
1870 std::vector<GNEAttributeCarrier*> ACToSelect;
1871 std::vector<GNEAttributeCarrier*> ACToUnselect;
1873 ACToSelect.reserve(ACsFiltered.size());
1874 ACToUnselect.reserve(ACsFiltered.size());
1879 const auto selectedAC = myViewNet->getNet()->getAttributeCarriers()->getSelectedAttributeCarriers(
false);
1881 for (
const auto& AC : selectedAC) {
1882 ACToUnselect.push_back(AC);
1886 for (
const auto& AC : ACsFiltered) {
1887 switch (myViewNet->myViewParent->getSelectorFrame()->getModificationModeModul()->getModificationMode()) {
1889 ACToUnselect.push_back(AC);
1892 if (std::find(ACToUnselect.begin(), ACToUnselect.end(), AC) != ACToUnselect.end()) {
1893 ACToSelect.push_back(AC);
1897 ACToSelect.push_back(AC);
1903 std::vector<GNEEdge*> edgesToSelect;
1905 for (
const auto& AC : ACToSelect) {
1907 edgesToSelect.push_back(
dynamic_cast<GNEEdge*
>(AC));
1911 for (
const auto& edge : edgesToSelect) {
1913 ACToSelect.push_back(edge->getFromJunction());
1914 for (
const auto& connection : edge->getFromJunction()->getGNEConnections()) {
1915 ACToSelect.push_back(connection);
1917 for (
const auto& crossing : edge->getFromJunction()->getGNECrossings()) {
1918 ACToSelect.push_back(crossing);
1921 ACToSelect.push_back(edge->getToJunction());
1922 for (
const auto& connection : edge->getToJunction()->getGNEConnections()) {
1923 ACToSelect.push_back(connection);
1925 for (
const auto& crossing : edge->getToJunction()->getGNECrossings()) {
1926 ACToSelect.push_back(crossing);
1931 if ((ACToSelect.size() + ACToUnselect.size()) > 0) {
1934 for (
const auto& AC : ACToUnselect) {
1937 for (
const auto& AC : ACToSelect) {
1938 if (AC->getTagProperty().isSelectable()) {
1942 myViewNet->myUndoList->end();
1944 myViewNet->makeNonCurrent();
1952 myViewNet(viewNet) {
1962 if ((windowSize.size() == 2) && GNEAttributeCarrier::canParse<int>(windowSize[0]) && GNEAttributeCarrier::canParse<int>(windowSize[1])) {
1963 myTestingWidth = GNEAttributeCarrier::parse<int>(windowSize[0]);
1964 myTestingHeight = GNEAttributeCarrier::parse<int>(windowSize[1]);
1977 if (myTestingWidth > 0) {
1978 mainWindow->resize(myTestingWidth, myTestingHeight);
1982 const double size = myViewNet->p2m(32);
1983 Position center = myViewNet->screenPos2NetPos(8, 8);
1988 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
1991 glVertex2d(0, -size);
1992 glVertex2d(size, -size);
1993 glVertex2d(size, 0);
2000 glScaled(0.7, 0.7, 0);
2001 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
2004 glVertex2d(0, -size);
2005 glVertex2d(size, -size);
2006 glVertex2d(size, 0);
2013 glScaled(0.4, 0.4, 0);
2014 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
2017 glVertex2d(0, -size);
2018 glVertex2d(size, -size);
2019 glVertex2d(size, 0);
2030 myViewNet(viewNet) {
2035 delete mySaveIndividualFilesPopup;
2042 auto gripSaveElements = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().saveElements;
2044 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2049 mySaveNeteditConfig->create();
2054 mySaveSumoConfig->create();
2059 mySaveNetwork->create();
2061 mySaveIndividualFilesPopup =
new FXPopup(gripSaveElements, POPUP_VERTICAL);
2062 mySaveIndividualFilesPopup->create();
2065 std::string(
"\t") +
TL(
"Save individual files") + std::string(
"\t") +
TL(
"Save individual files."),
2067 mySaveIndividualFiles->create();
2069 mySaveAdditionalElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
2072 mySaveAdditionalElements->create();
2074 mySaveDemandElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
2077 mySaveDemandElements->create();
2079 mySaveDataElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
2082 mySaveDataElements->create();
2084 mySaveMeanDataElements =
new MFXButtonTooltip(mySaveIndividualFilesPopup, tooltipMenu,
2087 mySaveMeanDataElements->create();
2089 gripSaveElements->recalc();
2091 gripSaveElements->show();
2098 mySaveIndividualFiles->enable();
2100 mySaveIndividualFiles->disable();
2109 myViewNet(viewNet) {
2116 mySwitchButton =
new MFXButtonTooltip(myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().timeSwitch,
2117 myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu(),
2118 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,
2120 mySwitchButton->create();
2139 mySwitchButton->setText(
"H");
2141 mySwitchButton->setText(
"S");
2154 myViewNet(viewNet) {
2157 if (neteditOptions.getBool(
"new")) {
2159 neteditOptions.resetWritable();
2160 neteditOptions.set(
"new",
"false");
2166 delete myNeteditViewsPopup;
2173 auto gripSupermodes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes;
2175 auto toolTipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2178 TL(
"Network") + std::string(
"\t") +
TL(
"Edit network elements") + std::string(
"\t") +
TL(
"Set mode for editing network elements. (F2)"),
2180 networkButton->create();
2183 TL(
"Demand") + std::string(
"\t") +
TL(
"Edit traffic demand elements") + std::string(
"\t") +
TL(
"Set mode for editing traffic demand. (F3)"),
2185 demandButton->create();
2188 TL(
"Data") + std::string(
"\t") +
TL(
"Edit data elements") + std::string(
"\t") +
TL(
"Set mode for editing data demand. (F4)"),
2190 dataButton->create();
2192 myNeteditViewsPopup =
new FXPopup(gripSupermodes, POPUP_VERTICAL);
2193 myNeteditViewsPopup->create();
2196 (std::string(
"\t") +
TL(
"Change netedit view") + std::string(
"\t") +
TL(
"Change netedit view.")).c_str(),
2198 myNeteditViewsButton->create();
2200 myDefaultViewButton =
new MFXButtonTooltip(myNeteditViewsPopup, toolTipMenu,
2201 (std::string(
"Default\t") +
TL(
"Set default view") + std::string(
"\t") +
TL(
"Set default view.")).c_str(),
2203 myDefaultViewButton->create();
2205 myJuPedSimViewButton =
new MFXButtonTooltip(myNeteditViewsPopup, toolTipMenu,
2206 (std::string(
"JuPedSim\t") +
TL(
"Set JuPedSim view") + std::string(
"\t") +
TL(
"Set JuPedSim view.")).c_str(),
2208 myJuPedSimViewButton->create();
2209 myNeteditViewsPopup->recalc();
2211 gripSupermodes->setWidth(353);
2213 gripSupermodes->show();
2219 if (!force && (supermode == currentSupermode)) {
2220 myViewNet->setStatusBarText(
TL(
"Mode already selected"));
2221 if (myViewNet->myCurrentFrame !=
nullptr) {
2222 myViewNet->myCurrentFrame->focusUpperElement();
2225 myViewNet->setStatusBarText(
"");
2227 myViewNet->abortOperation(
false);
2229 currentSupermode = supermode;
2233 networkButton->setChecked(
true);
2234 demandButton->setChecked(
false);
2235 dataButton->setChecked(
false);
2237 myViewNet->myNetworkCheckableButtons.showNetworkCheckableButtons();
2239 myViewNet->myDemandCheckableButtons.hideDemandCheckableButtons();
2241 myViewNet->myDataCheckableButtons.hideDataCheckableButtons();
2243 setNetworkEditMode(networkEditMode,
true);
2246 networkButton->setChecked(
false);
2247 demandButton->setChecked(
true);
2248 dataButton->setChecked(
false);
2250 myViewNet->myNetworkCheckableButtons.hideNetworkCheckableButtons();
2252 myViewNet->myDemandCheckableButtons.showDemandCheckableButtons();
2254 myViewNet->myDataCheckableButtons.hideDataCheckableButtons();
2256 setDemandEditMode(demandEditMode,
true);
2258 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2260 if (!myViewNet->myNet->getDemandPathManager()->getPathCalculator()->isPathCalculatorUpdated()) {
2262 myViewNet->myNet->getDemandPathManager()->getPathCalculator()->updatePathCalculator();
2264 myViewNet->myNet->computeDemandElements(myViewNet->myViewParent->getGNEAppWindows());
2268 networkButton->setChecked(
false);
2269 demandButton->setChecked(
false);
2270 dataButton->setChecked(
true);
2272 myViewNet->myNetworkCheckableButtons.hideNetworkCheckableButtons();
2274 myViewNet->myDemandCheckableButtons.hideDemandCheckableButtons();
2276 myViewNet->myDataCheckableButtons.showDataCheckableButtons();
2278 setDataEditMode(dataEditMode,
true);
2280 if (myViewNet->getViewParent()->getGNEAppWindows()->getProcessingMenuCommands().menuCheckRecomputeDataMode->getCheck() == TRUE) {
2282 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2285 for (
const auto&
TAZ : myViewNet->getNet()->getAttributeCarriers()->getAdditionals().at(
SUMO_TAG_TAZ)) {
2286 TAZ.second->resetAdditionalContour();
2290 networkButton->update();
2291 demandButton->update();
2292 dataButton->update();
2294 myViewNet->myViewParent->getGNEAppWindows()->updateSuperModeMenuCommands(currentSupermode);
2301 if ((mode == networkEditMode) && !force) {
2302 myViewNet->setStatusBarText(
TL(
"Network mode already selected"));
2303 if (myViewNet->myCurrentFrame !=
nullptr) {
2304 myViewNet->myCurrentFrame->focusUpperElement();
2307 myViewNet->setStatusBarText(
TL(
"Save modifications in TLS before change mode"));
2308 myViewNet->myCurrentFrame->focusUpperElement();
2310 myViewNet->setStatusBarText(
"");
2311 myViewNet->abortOperation(
false);
2313 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2315 networkEditMode = mode;
2336 myViewNet->myNet->computeNetwork(myViewNet->myViewParent->getGNEAppWindows());
2342 myViewNet->updateCursor();
2344 myViewNet->updateNetworkModeSpecificControls();
2351 if ((mode == demandEditMode) && !force) {
2352 myViewNet->setStatusBarText(
TL(
"Demand mode already selected"));
2353 if (myViewNet->myCurrentFrame !=
nullptr) {
2354 myViewNet->myCurrentFrame->focusUpperElement();
2357 myViewNet->setStatusBarText(
"");
2358 myViewNet->abortOperation(
false);
2360 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2362 demandEditMode = mode;
2377 myViewNet->updateCursor();
2379 myViewNet->updateDemandModeSpecificControls();
2386 if ((mode == dataEditMode) && !force) {
2387 myViewNet->setStatusBarText(
TL(
"Data mode already selected"));
2388 if (myViewNet->myCurrentFrame !=
nullptr) {
2389 myViewNet->myCurrentFrame->focusUpperElement();
2392 myViewNet->setStatusBarText(
"");
2393 myViewNet->abortOperation(
false);
2395 myViewNet->myEditNetworkElementShapes.stopEditCustomShape();
2397 dataEditMode = mode;
2410 for (
const auto& dataSet : myViewNet->getNet()->getAttributeCarriers()->getDataSets()) {
2411 dataSet.second->updateAttributeColors();
2414 myViewNet->updateCursor();
2416 myViewNet->updateDataModeSpecificControls();
2442 auto gripSupermodes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().superModes;
2444 auto& fileMenuCommands = myViewNet->getViewParent()->getGNEAppWindows()->getFileMenuCommands();
2448 gripSupermodes->setWidth(353);
2450 fileMenuCommands.setDefaultView();
2453 gripSupermodes->setWidth(250);
2455 fileMenuCommands.setJuPedSimView();
2458 myViewNet->viewUpdated();
2478 myViewNet(viewNet) {
2485 auto gripModes = myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().modes;
2487 auto toolTipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2490 (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)")),
2493 menuCheckToggleGrid->setChecked(
false);
2494 menuCheckToggleGrid->create();
2496 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, toolTipMenu,
2497 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
2500 menuCheckToggleDrawJunctionShape->setChecked(
false);
2501 menuCheckToggleDrawJunctionShape->create();
2504 (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.")),
2507 menuCheckDrawSpreadVehicles->setChecked(
false);
2508 menuCheckDrawSpreadVehicles->create();
2511 (std::string(
"\t") +
TL(
"Show demand elements") + std::string(
"\t") +
TL(
"Toggle show demand elements.")),
2514 menuCheckShowDemandElements->setChecked(
false);
2515 menuCheckShowDemandElements->create();
2518 (std::string(
"\t") +
TL(
"Clicks target lanes") + std::string(
"\t") +
TL(
"Toggle whether clicking should inspect/select/delete lanes instead of edges.")),
2521 menuCheckSelectEdges->create();
2524 (std::string(
"\t") +
TL(
"Show connections over junctions") + std::string(
"\t") +
TL(
"Toggle show connections over junctions.")),
2527 menuCheckShowConnections->setChecked(myViewNet->getVisualisationSettings().showLane2Lane);
2528 menuCheckShowConnections->create();
2531 (std::string(
"\t") +
TL(
"Hide connections") + std::string(
"\t") +
TL(
"Toggle hide connections.")),
2534 menuCheckHideConnections->setChecked(
false);
2535 menuCheckHideConnections->create();
2537 menuCheckShowAdditionalSubElements =
new MFXCheckableButton(
false, gripModes, toolTipMenu,
2538 (std::string(
"\t") +
TL(
"Show additional sub-elements") + std::string(
"\t") +
TL(
"Toggle show additional sub-elements.")),
2541 menuCheckShowAdditionalSubElements->setChecked(
false);
2542 menuCheckShowAdditionalSubElements->create();
2545 (std::string(
"\t") +
TL(
"Show TAZ elements") + std::string(
"\t") +
TL(
"Toggle show TAZ elements.")),
2548 menuCheckShowTAZElements->setChecked(
false);
2549 menuCheckShowTAZElements->create();
2552 (std::string(
"\t") +
TL(
"Automatic select junctions") + std::string(
"\t") +
TL(
"Toggle whether selecting multiple edges should automatically select their junctions.")),
2555 menuCheckExtendSelection->setChecked(
true);
2556 menuCheckExtendSelection->create();
2559 (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.")),
2562 menuCheckChangeAllPhases->setChecked(
false);
2563 menuCheckChangeAllPhases->create();
2566 (std::string(
"\t") +
TL(
"Automatic merging junction") + std::string(
"\t") +
TL(
"Toggle ask for confirmation before merging junction.")),
2569 menuCheckWarnAboutMerge->create();
2572 (std::string(
"\t") +
TL(
"Show bubbles") + std::string(
"\t") +
TL(
"Toggle show bubbles over junctions shapes.")),
2575 menuCheckShowJunctionBubble->setChecked(
false);
2576 menuCheckShowJunctionBubble->create();
2579 (std::string(
"\t") +
TL(
"Move elevation") + std::string(
"\t") +
TL(
"Apply mouse movement to elevation instead of x,y position.")),
2582 menuCheckMoveElevation->setChecked(
false);
2583 menuCheckMoveElevation->create();
2586 (std::string(
"\t") +
TL(
"Edge chain mode") + std::string(
"\t") +
TL(
"Create consecutive edges with a single click (hit ESC to cancel chain).")),
2589 menuCheckChainEdges->setChecked(
false);
2590 menuCheckChainEdges->create();
2593 (std::string(
"\t") +
TL(
"Edge opposite direction") + std::string(
"\t") +
TL(
"Automatically create an edge in the opposite direction.")),
2596 menuCheckAutoOppositeEdge->setChecked(
false);
2597 menuCheckAutoOppositeEdge->create();
2600 gripModes->recalc();
2606 menuCheckToggleGrid->hide();
2607 menuCheckToggleDrawJunctionShape->hide();
2608 menuCheckDrawSpreadVehicles->hide();
2609 menuCheckShowDemandElements->hide();
2610 menuCheckSelectEdges->hide();
2611 menuCheckShowConnections->hide();
2612 menuCheckHideConnections->hide();
2613 menuCheckShowAdditionalSubElements->hide();
2614 menuCheckShowTAZElements->hide();
2615 menuCheckExtendSelection->hide();
2616 menuCheckChangeAllPhases->hide();
2617 menuCheckWarnAboutMerge->hide();
2618 menuCheckShowJunctionBubble->hide();
2619 menuCheckMoveElevation->hide();
2620 menuCheckChainEdges->hide();
2621 menuCheckAutoOppositeEdge->hide();
2628 if (menuCheckToggleGrid->shown()) {
2629 commands.push_back(menuCheckToggleGrid);
2631 if (menuCheckToggleDrawJunctionShape->shown()) {
2632 commands.push_back(menuCheckToggleDrawJunctionShape);
2634 if (menuCheckDrawSpreadVehicles->shown()) {
2635 commands.push_back(menuCheckDrawSpreadVehicles);
2637 if (menuCheckShowDemandElements->shown()) {
2638 commands.push_back(menuCheckShowDemandElements);
2640 if (menuCheckSelectEdges->shown()) {
2641 commands.push_back(menuCheckSelectEdges);
2643 if (menuCheckShowConnections->shown()) {
2644 commands.push_back(menuCheckShowConnections);
2646 if (menuCheckHideConnections->shown()) {
2647 commands.push_back(menuCheckHideConnections);
2649 if (menuCheckShowAdditionalSubElements->shown()) {
2650 commands.push_back(menuCheckShowAdditionalSubElements);
2652 if (menuCheckShowTAZElements->shown()) {
2653 commands.push_back(menuCheckShowTAZElements);
2655 if (menuCheckExtendSelection->shown()) {
2656 commands.push_back(menuCheckExtendSelection);
2658 if (menuCheckChangeAllPhases->shown()) {
2659 commands.push_back(menuCheckChangeAllPhases);
2661 if (menuCheckWarnAboutMerge->shown()) {
2662 commands.push_back(menuCheckWarnAboutMerge);
2664 if (menuCheckShowJunctionBubble->shown()) {
2665 commands.push_back(menuCheckShowJunctionBubble);
2667 if (menuCheckMoveElevation->shown()) {
2668 commands.push_back(menuCheckMoveElevation);
2670 if (menuCheckChainEdges->shown()) {
2671 commands.push_back(menuCheckChainEdges);
2673 if (menuCheckAutoOppositeEdge->shown()) {
2674 commands.push_back(menuCheckAutoOppositeEdge);
2681 return (menuCheckDrawSpreadVehicles->amChecked() == TRUE);
2687 if (menuCheckShowDemandElements->shown()) {
2688 return (menuCheckShowDemandElements->amChecked() == TRUE);
2698 if (menuCheckSelectEdges->shown()) {
2699 return (menuCheckSelectEdges->amChecked() != TRUE);
2709 if (myViewNet->myEditModes.isCurrentSupermodeData()) {
2713 return (menuCheckHideConnections->amChecked() == FALSE);
2716 }
else if (myViewNet->myEditModes.isCurrentSupermodeNetwork() && menuCheckShowConnections->shown() ==
false) {
2719 return (myViewNet->getVisualisationSettings().showLane2Lane);
2726 if (!myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
2728 }
else if (menuCheckShowAdditionalSubElements->shown() ==
false) {
2731 return menuCheckShowAdditionalSubElements->amChecked();
2738 if (!myViewNet->myEditModes.isCurrentSupermodeNetwork()) {
2740 }
else if (menuCheckShowTAZElements->shown() ==
false) {
2743 return menuCheckShowTAZElements->amChecked();
2750 if (menuCheckMoveElevation->shown()) {
2751 return (menuCheckMoveElevation->amChecked() == TRUE);
2762 myViewNet(viewNet) {
2769 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
2771 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
2774 (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)")),
2777 menuCheckToggleGrid->setChecked(
false);
2778 menuCheckToggleGrid->create();
2780 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2781 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
2784 menuCheckToggleDrawJunctionShape->setChecked(
false);
2785 menuCheckToggleDrawJunctionShape->create();
2788 (std::string(
"\t") +
TL(
"Draw vehicles spread/depart position") + std::string(
"\t") +
TL(
"Draw vehicles spread in lane or in depart position.")),
2791 menuCheckDrawSpreadVehicles->setChecked(
false);
2792 menuCheckDrawSpreadVehicles->create();
2795 (std::string(
"\t") +
TL(
"Show shapes") + std::string(
"\t") +
TL(
"Toggle show shapes (Polygons and POIs).")),
2798 menuCheckHideShapes->setChecked(
false);
2799 menuCheckHideShapes->create();
2802 (std::string(
"\t") +
TL(
"Show all trips") + std::string(
"\t") +
TL(
"Toggle show all trips (requires updated demand - F5).")),
2805 menuCheckShowAllTrips->setChecked(
false);
2806 menuCheckShowAllTrips->create();
2809 (std::string(
"\t") +
TL(
"Show all person plans") + std::string(
"\t") +
TL(
"Toggle show all person plans.")),
2812 menuCheckShowAllPersonPlans->setChecked(
false);
2813 menuCheckShowAllPersonPlans->create();
2816 (std::string(
"\t") +
TL(
"Lock selected person") + std::string(
"\t") +
TL(
"Toggle lock selected person.")),
2819 menuCheckLockPerson->setChecked(
false);
2820 menuCheckLockPerson->create();
2822 menuCheckShowAllContainerPlans =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2823 (std::string(
"\t") +
TL(
"Show all containers plans") + std::string(
"\t") +
TL(
"Toggle show all container plans.")),
2826 menuCheckShowAllContainerPlans->setChecked(
false);
2827 menuCheckShowAllContainerPlans->create();
2830 (std::string(
"\t") +
TL(
"Lock selected container") + std::string(
"\t") +
TL(
"Toggle lock selected container.")),
2833 menuCheckLockContainer->setChecked(
false);
2834 menuCheckLockContainer->create();
2836 menuCheckHideNonInspectedDemandElements =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2837 (std::string(
"\t") +
TL(
"Show non-inspected demand elements") + std::string(
"\t") +
TL(
"Toggle show non-inspected demand elements.")),
2840 menuCheckHideNonInspectedDemandElements->setChecked(
false);
2841 menuCheckHideNonInspectedDemandElements->create();
2843 menuCheckShowOverlappedRoutes =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
2844 (std::string(
"\t") +
TL(
"Show number of overlapped routes") + std::string(
"\t") +
TL(
"Toggle show number of overlapped routes.")),
2847 menuCheckShowOverlappedRoutes->setChecked(
false);
2848 menuCheckShowOverlappedRoutes->create();
2851 gripModes->recalc();
2857 menuCheckToggleGrid->hide();
2858 menuCheckToggleDrawJunctionShape->hide();
2859 menuCheckDrawSpreadVehicles->hide();
2860 menuCheckHideShapes->hide();
2861 menuCheckShowAllTrips->hide();
2862 menuCheckShowAllPersonPlans->hide();
2863 menuCheckLockPerson->hide();
2864 menuCheckShowAllContainerPlans->hide();
2865 menuCheckLockContainer->hide();
2866 menuCheckHideNonInspectedDemandElements->hide();
2867 menuCheckShowOverlappedRoutes->hide();
2874 if (menuCheckToggleGrid->shown()) {
2875 commands.push_back(menuCheckToggleGrid);
2877 if (menuCheckToggleDrawJunctionShape->shown()) {
2878 commands.push_back(menuCheckToggleDrawJunctionShape);
2880 if (menuCheckDrawSpreadVehicles->shown()) {
2881 commands.push_back(menuCheckDrawSpreadVehicles);
2883 if (menuCheckHideShapes->shown()) {
2884 commands.push_back(menuCheckHideShapes);
2886 if (menuCheckShowAllTrips->shown()) {
2887 commands.push_back(menuCheckShowAllTrips);
2889 if (menuCheckShowAllPersonPlans->shown() && menuCheckShowAllPersonPlans->isEnabled()) {
2890 commands.push_back(menuCheckShowAllPersonPlans);
2892 if (menuCheckLockPerson->shown() && menuCheckLockPerson->isEnabled()) {
2893 commands.push_back(menuCheckLockPerson);
2895 if (menuCheckShowAllContainerPlans->shown() && menuCheckShowAllContainerPlans->isEnabled()) {
2896 commands.push_back(menuCheckShowAllContainerPlans);
2898 if (menuCheckLockContainer->shown() && menuCheckLockContainer->isEnabled()) {
2899 commands.push_back(menuCheckLockContainer);
2901 if (menuCheckHideNonInspectedDemandElements->shown()) {
2902 commands.push_back(menuCheckHideNonInspectedDemandElements);
2904 if (menuCheckShowOverlappedRoutes->shown()) {
2905 commands.push_back(menuCheckShowOverlappedRoutes);
2912 return (menuCheckDrawSpreadVehicles->amChecked() == TRUE);
2918 if (menuCheckHideNonInspectedDemandElements->shown()) {
2919 const auto& inspectedElements = myViewNet->getInspectedElements();
2921 if ((menuCheckHideNonInspectedDemandElements->amChecked() == FALSE) || (inspectedElements.getFirstAC() ==
nullptr)) {
2924 }
else if (inspectedElements.getFirstAC() && inspectedElements.getFirstAC()->getTagProperty().isDemandElement()) {
2925 if (inspectedElements.isACInspected(demandElement)) {
2931 if (inspectedElements.isACInspected(demandElementChild)) {
2937 if (inspectedElements.isACInspected(demandElementParent)) {
2957 if (menuCheckHideShapes->shown()) {
2958 return (menuCheckHideShapes->amChecked() == FALSE);
2967 return (menuCheckShowAllTrips->amChecked() == TRUE);
2973 if (menuCheckShowAllPersonPlans->isEnabled()) {
2974 return (menuCheckShowAllPersonPlans->amChecked() == TRUE);
2983 myLockedPerson = person;
2989 myLockedPerson =
nullptr;
2995 return myLockedPerson;
3001 if (menuCheckShowAllContainerPlans->isEnabled()) {
3002 return (menuCheckShowAllContainerPlans->amChecked() == TRUE);
3011 myLockedContainer = container;
3017 myLockedContainer =
nullptr;
3023 if (menuCheckShowOverlappedRoutes->isEnabled()) {
3024 return (menuCheckShowOverlappedRoutes->amChecked() == TRUE);
3033 return myLockedContainer;
3041 myViewNet(viewNet) {
3048 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3050 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3052 menuCheckToggleDrawJunctionShape =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
3053 (std::string(
"\t") +
TL(
"Hide junction shape") + std::string(
"\t") +
TL(
"Toggle hiding junction shape. (Ctrl+J)")),
3056 menuCheckToggleDrawJunctionShape->setChecked(
false);
3057 menuCheckToggleDrawJunctionShape->create();
3060 (std::string(
"\t") +
TL(
"Show additionals") + std::string(
"\t") +
TL(
"Toggle show additionals.")),
3063 menuCheckShowAdditionals->create();
3066 (std::string(
"\t") +
TL(
"Show shapes") + std::string(
"\t") +
TL(
"Toggle show shapes (Polygons and POIs).")),
3069 menuCheckShowShapes->create();
3072 (std::string(
"\t") +
TL(
"Show demand elements") + std::string(
"\t") +
TL(
"Toggle show demand elements.")),
3075 menuCheckShowDemandElements->create();
3078 (std::string(
"\t") +
TL(
"Draw TAZREL drawing mode") + std::string(
"\t") +
TL(
"Toggle draw TAZREL drawing mode.")),
3081 menuCheckToggleTAZRelDrawing->create();
3084 (std::string(
"\t") +
TL(
"Toggle draw TAZ fill") + std::string(
"\t") +
TL(
"Toggle draw TAZ fill")),
3087 menuCheckToggleTAZDrawFill->create();
3089 menuCheckToggleTAZRelOnlyFrom =
new MFXCheckableButton(
false, gripModes, tooltipMenu,
3090 (std::string(
"\t") +
TL(
"Toggle draw TAZRel only from") + std::string(
"\t") +
TL(
"Toggle draw TAZRel only from")),
3093 menuCheckToggleTAZRelOnlyFrom->create();
3096 (std::string(
"\t") +
TL(
"Toggle draw TAZRel only to") + std::string(
"\t") +
TL(
"Toggle draw TAZRel only to")),
3099 menuCheckToggleTAZRelOnlyTo->create();
3102 gripModes->recalc();
3108 menuCheckToggleDrawJunctionShape->hide();
3109 menuCheckShowAdditionals->hide();
3110 menuCheckShowShapes->hide();
3111 menuCheckShowDemandElements->hide();
3112 menuCheckToggleTAZRelDrawing->hide();
3113 menuCheckToggleTAZDrawFill->hide();
3114 menuCheckToggleTAZRelOnlyFrom->hide();
3115 menuCheckToggleTAZRelOnlyTo->hide();
3122 if (menuCheckToggleDrawJunctionShape->shown()) {
3123 commands.push_back(menuCheckToggleDrawJunctionShape);
3125 if (menuCheckShowAdditionals->shown()) {
3126 commands.push_back(menuCheckShowAdditionals);
3128 if (menuCheckShowShapes->shown()) {
3129 commands.push_back(menuCheckShowShapes);
3131 if (menuCheckShowDemandElements->shown()) {
3132 commands.push_back(menuCheckShowDemandElements);
3134 if (menuCheckToggleTAZRelDrawing->shown()) {
3135 commands.push_back(menuCheckToggleTAZRelDrawing);
3137 if (menuCheckToggleTAZDrawFill->shown()) {
3138 commands.push_back(menuCheckToggleTAZDrawFill);
3140 if (menuCheckToggleTAZRelOnlyFrom->shown()) {
3141 commands.push_back(menuCheckToggleTAZRelOnlyFrom);
3143 if (menuCheckToggleTAZRelOnlyTo->shown()) {
3144 commands.push_back(menuCheckToggleTAZRelOnlyTo);
3151 if (menuCheckShowAdditionals->shown()) {
3152 return (menuCheckShowAdditionals->amChecked() == TRUE);
3161 if (menuCheckShowShapes->shown()) {
3162 return (menuCheckShowShapes->amChecked() == TRUE);
3171 if (menuCheckShowDemandElements->shown()) {
3172 return (menuCheckShowDemandElements->amChecked() == TRUE);
3181 return (menuCheckToggleTAZRelDrawing->amChecked() != TRUE);
3187 if (menuCheckToggleTAZDrawFill->shown()) {
3188 return (menuCheckToggleTAZDrawFill->amChecked() != TRUE);
3197 if (menuCheckToggleTAZRelOnlyFrom->shown()) {
3198 return (menuCheckToggleTAZRelOnlyFrom->amChecked() != TRUE);
3207 if (menuCheckToggleTAZRelOnlyTo->shown()) {
3208 return (menuCheckToggleTAZRelOnlyTo->amChecked() != TRUE);
3219 myViewNet(viewNet) {
3226 FXLabel* genericDataLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3228 genericDataLabel->create();
3230 myGenericDataTypesComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3233 myGenericDataTypesComboBox->create();
3235 myGenericDataTypesComboBox->appendIconItem(
"<all>");
3240 FXLabel* dataSetLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3242 dataSetLabel->create();
3244 myDataSetsComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3247 myDataSetsComboBox->create();
3249 myIntervalCheckBox =
new FXCheckButton(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3251 myIntervalCheckBox->create();
3253 myBeginTextField =
new FXTextField(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3255 myBeginTextField->create();
3257 myEndTextField =
new FXTextField(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3259 myEndTextField->create();
3261 FXLabel* parameterLabel =
new FXLabel(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3263 parameterLabel->create();
3265 myParametersComboBox =
new MFXComboBoxIcon(myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar,
3268 myParametersComboBox->create();
3270 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->recalc();
3277 updateIntervalBar();
3279 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->show();
3286 myViewNet->myViewParent->getGNEAppWindows()->getToolbarsGrip().intervalBar->hide();
3293 if (myUpdateInterval && myViewNet->getNet()) {
3300 myParameters.clear();
3302 for (
const auto& dataSet : myViewNet->getNet()->getAttributeCarriers()->getDataSets()) {
3304 myDataSets.push_back(dataSet.second->getID());
3306 for (
const auto& interval : dataSet.second->getDataIntervalChildren()) {
3309 begin = interval.first;
3312 end = interval.first;
3315 for (
const auto& genericData : interval.second->getGenericDataChildren()) {
3317 for (
const auto& parameter : genericData->getParametersMap()) {
3318 myParameters.insert(parameter.first);
3324 const std::string previousDataSet = myDataSetsComboBox->getText().text();
3326 const std::string previousBegin = (myIntervalCheckBox->getCheck() == TRUE) ? myBeginTextField->getText().text() :
"";
3327 const std::string previousEnd = (myIntervalCheckBox->getCheck() == TRUE) ? myEndTextField->getText().text() :
"";
3329 const std::string previousParameter = myParametersComboBox->getText().text();
3331 myDataSetsComboBox->clearItems();
3332 myParametersComboBox->clearItems();
3334 myDataSetsComboBox->appendIconItem(
"<all>");
3335 myParametersComboBox->appendIconItem(
"<all>");
3337 for (
const auto& dataSet : myDataSets) {
3338 myDataSetsComboBox->appendIconItem(dataSet.c_str());
3341 myBeginTextField->setText(
toString(begin).c_str());
3342 myEndTextField->setText(
toString(end).c_str());
3344 for (
const auto& parameter : myParameters) {
3345 myParametersComboBox->appendIconItem(parameter.c_str());
3348 myDataSetsComboBox->setCurrentItem(0, FALSE);
3349 for (
int i = 0; i < myDataSetsComboBox->getNumItems(); i++) {
3350 if (myDataSetsComboBox->getItemText(i) == previousDataSet) {
3351 myDataSetsComboBox->setCurrentItem(i);
3355 if (myIntervalCheckBox->getCheck() == TRUE) {
3356 myBeginTextField->setText(previousBegin.c_str());
3357 myEndTextField->setText(previousEnd.c_str());
3360 myParametersComboBox->setCurrentItem(0, FALSE);
3361 for (
int i = 0; i < myParametersComboBox->getNumItems(); i++) {
3362 if (myParametersComboBox->getItemText(i) == previousParameter) {
3363 myParametersComboBox->setCurrentItem(i);
3370 enableIntervalBar();
3372 disableIntervalBar();
3375 myUpdateInterval =
false;
3382 myUpdateInterval =
true;
3388 if (myGenericDataTypesComboBox->isEnabled() && (myGenericDataTypesComboBox->getTextColor() == FXRGB(0, 0, 0))) {
3403 if (!myDataSetsComboBox->isEnabled() ||
3404 (myDataSetsComboBox->getCurrentItem() == 0) ||
3405 (myDataSetsComboBox->getTextColor() == FXRGB(255, 0, 0))) {
3415 if (!myIntervalCheckBox->isEnabled() || (myIntervalCheckBox->getCheck() == FALSE)) {
3418 return GNEAttributeCarrier::parse<double>(myBeginTextField->getText().text());
3425 if (!myIntervalCheckBox->isEnabled() || (myIntervalCheckBox->getCheck() == FALSE)) {
3428 return GNEAttributeCarrier::parse<double>(myEndTextField->getText().text());
3435 if (!myParametersComboBox->isEnabled() ||
3436 (myParametersComboBox->getCurrentItem() == 0) ||
3437 (myParametersComboBox->getTextColor() == FXRGB(255, 0, 0))) {
3440 return myParametersComboBox->getText().text();
3447 if ((myGenericDataTypesComboBox->getText() ==
"<all>") ||
3451 myGenericDataTypesComboBox->setTextColor(FXRGB(0, 0, 0));
3453 myGenericDataTypesComboBox->setTextColor(FXRGB(255, 0, 0));
3456 myViewNet->updateViewNet();
3463 if (std::find(myDataSets.begin(), myDataSets.end(), myDataSetsComboBox->getText().text()) != myDataSets.end()) {
3464 myDataSetsComboBox->setTextColor(FXRGB(0, 0, 0));
3466 myDataSetsComboBox->setTextColor(FXRGB(255, 0, 0));
3469 myViewNet->updateViewNet();
3476 if (myIntervalCheckBox->isEnabled() && (myIntervalCheckBox->getCheck() == TRUE)) {
3477 myBeginTextField->enable();
3478 myEndTextField->enable();
3480 myBeginTextField->disable();
3481 myEndTextField->disable();
3484 myViewNet->updateViewNet();
3490 if (myBeginTextField->getText().empty()) {
3491 myBeginTextField->setText(
toString(myViewNet->getNet()->getDataSetIntervalMinimumBegin()).c_str());
3492 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
3493 }
else if (GNEAttributeCarrier::canParse<double>(myBeginTextField->getText().text())) {
3494 myBeginTextField->setTextColor(FXRGB(0, 0, 0));
3496 myBeginTextField->setTextColor(FXRGB(255, 0, 0));
3499 myViewNet->updateViewNet();
3505 if (myEndTextField->getText().empty()) {
3506 myEndTextField->setText(
toString(myViewNet->getNet()->getDataSetIntervalMaximumEnd()).c_str());
3507 myEndTextField->setTextColor(FXRGB(0, 0, 0));
3508 }
else if (GNEAttributeCarrier::canParse<double>(myEndTextField->getText().text())) {
3509 myEndTextField->setTextColor(FXRGB(0, 0, 0));
3511 myEndTextField->setTextColor(FXRGB(255, 0, 0));
3514 myViewNet->updateViewNet();
3521 if (myParameters.count(myParametersComboBox->getText().text()) > 0) {
3522 myParametersComboBox->setTextColor(FXRGB(0, 0, 0));
3524 myParametersComboBox->setTextColor(FXRGB(255, 0, 0));
3527 myViewNet->updateViewNet();
3535 myGenericDataTypesComboBox->enable();
3536 myDataSetsComboBox->enable();
3537 myIntervalCheckBox->enable();
3538 if (myIntervalCheckBox->getCheck() == TRUE) {
3539 myBeginTextField->enable();
3540 myEndTextField->enable();
3542 myBeginTextField->disable();
3543 myEndTextField->disable();
3545 myParametersComboBox->enable();
3552 myGenericDataTypesComboBox->disable();
3553 myDataSetsComboBox->disable();
3554 myIntervalCheckBox->disable();
3555 myBeginTextField->disable();
3556 myEndTextField->disable();
3557 myParametersComboBox->disable();
3565 myViewNet(viewNet) {
3572 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3574 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3577 std::string(
"\t") +
TL(
"Inspect mode") + std::string(
"\t") +
TL(
"Mode for inspect elements and change their attributes. (I)"),
3579 inspectButton->create();
3582 std::string(
"\t") +
TL(
"Delete mode") + std::string(
"\t") +
TL(
"Mode for deleting elements. (D)"),
3584 deleteButton->create();
3587 std::string(
"\t") +
TL(
"Select mode") + std::string(
"\t") +
TL(
"Mode for selecting elements. (S)"),
3589 selectButton->create();
3591 gripModes->recalc();
3597 inspectButton->show();
3598 deleteButton->show();
3599 selectButton->show();
3605 inspectButton->hide();
3606 deleteButton->hide();
3607 selectButton->hide();
3613 inspectButton->setChecked(
false);
3614 deleteButton->setChecked(
false);
3615 selectButton->setChecked(
false);
3621 inspectButton->update();
3622 deleteButton->update();
3623 selectButton->update();
3631 myViewNet(viewNet) {
3638 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3640 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3643 std::string(
"\t") +
TL(
"Move mode") + std::string(
"\t") +
TL(
"Mode for moving elements. (M)"),
3645 moveNetworkElementsButton->create();
3648 std::string(
"\t") +
TL(
"Edge mode") + std::string(
"\t") +
TL(
"Mode for creating junctions and edges. (E)"),
3650 createEdgeButton->create();
3653 std::string(
"\t") +
TL(
"Traffic light mode") + std::string(
"\t") +
TL(
"Mode for editing traffic lights over junctions. (T)"),
3655 trafficLightButton->create();
3658 std::string(
"\t") +
TL(
"Connection mode") + std::string(
"\t") +
TL(
"Mode for edit connections between lanes. (C)"),
3660 connectionButton->create();
3663 std::string(
"\t") +
TL(
"Prohibition mode") + std::string(
"\t") +
TL(
"Mode for editing connection prohibitions. (H)"),
3665 prohibitionButton->create();
3668 std::string(
"\t") +
TL(
"Crossing mode") + std::string(
"\t") +
TL(
"Mode for creating crossings between edges. (R)"),
3670 crossingButton->create();
3673 std::string(
"\t") +
TL(
"Additional mode") + std::string(
"\t") +
TL(
"Mode for creating additional elements. (A)"),
3675 additionalButton->create();
3678 std::string(
"\t") +
TL(
"Wire mode") + std::string(
"\t") +
TL(
"Mode for editing overhead wires. (W)"),
3680 wireButton->create();
3683 std::string(
"\t") +
TL(
"TAZ mode") + std::string(
"\t") +
TL(
"Mode for creating Traffic Assignment Zones. (Z)"),
3685 TAZButton->create();
3688 std::string(
"\t") +
TL(
"Polygon mode") + std::string(
"\t") +
TL(
"Mode for creating polygons and POIs. (P)"),
3690 shapeButton->create();
3693 std::string(
"\t") +
TL(
"Decal mode") + std::string(
"\t") +
TL(
"Mode for editing decals. (U)"),
3695 decalButton->create();
3697 gripModes->recalc();
3704 if (myViewNet->getEditModes().isJuPedSimView()) {
3705 moveNetworkElementsButton->show();
3706 createEdgeButton->show();
3707 connectionButton->hide();
3708 trafficLightButton->hide();
3709 additionalButton->show();
3710 crossingButton->show();
3712 shapeButton->show();
3713 prohibitionButton->hide();
3715 decalButton->hide();
3717 moveNetworkElementsButton->show();
3718 createEdgeButton->show();
3719 connectionButton->show();
3720 trafficLightButton->show();
3721 additionalButton->show();
3722 crossingButton->show();
3724 shapeButton->show();
3725 prohibitionButton->show();
3727 decalButton->show();
3734 moveNetworkElementsButton->hide();
3735 createEdgeButton->hide();
3736 connectionButton->hide();
3737 trafficLightButton->hide();
3738 additionalButton->hide();
3739 crossingButton->hide();
3741 shapeButton->hide();
3742 prohibitionButton->hide();
3744 decalButton->hide();
3750 moveNetworkElementsButton->setChecked(
false);
3751 createEdgeButton->setChecked(
false);
3752 connectionButton->setChecked(
false);
3753 trafficLightButton->setChecked(
false);
3754 additionalButton->setChecked(
false);
3755 crossingButton->setChecked(
false);
3756 TAZButton->setChecked(
false);
3757 shapeButton->setChecked(
false);
3758 prohibitionButton->setChecked(
false);
3759 wireButton->setChecked(
false);
3760 decalButton->setChecked(
false);
3766 moveNetworkElementsButton->update();
3767 createEdgeButton->update();
3768 connectionButton->update();
3769 trafficLightButton->update();
3770 additionalButton->update();
3771 crossingButton->update();
3772 TAZButton->update();
3773 shapeButton->update();
3774 prohibitionButton->update();
3775 wireButton->update();
3776 decalButton->update();
3784 myViewNet(viewNet) {
3791 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3793 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3796 std::string(
"\t") +
TL(
"Move mode") + std::string(
"\t") +
TL(
"Mode for moving elements. (M)"),
3798 moveDemandElementsButton->create();
3801 std::string(
"\t") +
TL(
"Route mode") + std::string(
"\t") +
TL(
"Mode for creating routes. (R)"),
3803 routeButton->create();
3806 std::string(
"\t") +
TL(
"Route distribution mode") + std::string(
"\t") +
TL(
"Mode for creating and editing rout distributions. (W)"),
3808 routeDistributionButton->create();
3811 std::string(
"\t") +
TL(
"Vehicle mode") + std::string(
"\t") +
TL(
"Mode for creating vehicles. (V)"),
3813 vehicleButton->create();
3816 std::string(
"\t") +
TL(
"Type mode") + std::string(
"\t") +
TL(
"Mode for creating types (of vehicles, persons and containers). (T)"),
3818 typeButton->create();
3821 std::string(
"\t") +
TL(
"Type distribution mode") + std::string(
"\t") +
TL(
"Mode for creating and editing type distribution. (U)"),
3823 typeDistributionButton->create();
3826 std::string(
"\t") +
TL(
"Stop mode") + std::string(
"\t") +
TL(
"Mode for creating stops. (A)"),
3828 stopButton->create();
3831 std::string(
"\t") +
TL(
"Person mode") + std::string(
"\t") +
TL(
"Mode for creating persons. (P)"),
3833 personButton->create();
3836 std::string(
"\t") +
TL(
"Person plan mode") + std::string(
"\t") +
TL(
"Mode for creating person plans. (L)"),
3838 personPlanButton->create();
3841 std::string(
"\t") +
TL(
"Container mode") + std::string(
"\t") +
TL(
"Mode for creating containers. (C)"),
3843 containerButton->create();
3846 std::string(
"\t") +
TL(
"Container plan mode") + std::string(
"\t") +
TL(
"Mode for creating container plans. (H)"),
3848 containerPlanButton->create();
3850 gripModes->recalc();
3856 if (myViewNet->getEditModes().isJuPedSimView()) {
3857 moveDemandElementsButton->hide();
3858 routeButton->show();
3859 routeDistributionButton->show();
3860 vehicleButton->hide();
3862 typeDistributionButton->show();
3864 personButton->show();
3865 personPlanButton->show();
3866 containerButton->hide();
3867 containerPlanButton->hide();
3869 moveDemandElementsButton->show();
3870 routeButton->show();
3871 routeDistributionButton->show();
3872 vehicleButton->show();
3874 typeDistributionButton->show();
3876 personButton->show();
3877 personPlanButton->show();
3878 containerButton->show();
3879 containerPlanButton->show();
3886 moveDemandElementsButton->hide();
3887 routeButton->hide();
3888 routeDistributionButton->hide();
3889 vehicleButton->hide();
3891 typeDistributionButton->hide();
3893 personButton->hide();
3894 personPlanButton->hide();
3895 containerButton->hide();
3896 containerPlanButton->hide();
3902 moveDemandElementsButton->setChecked(
false);
3903 routeButton->setChecked(
false);
3904 routeDistributionButton->setChecked(
false);
3905 vehicleButton->setChecked(
false);
3906 typeButton->setChecked(
false);
3907 typeDistributionButton->setChecked(
false);
3908 stopButton->setChecked(
false);
3909 personButton->setChecked(
false);
3910 personPlanButton->setChecked(
false);
3911 containerButton->setChecked(
false);
3912 containerPlanButton->setChecked(
false);
3918 moveDemandElementsButton->update();
3919 routeButton->update();
3920 routeDistributionButton->update();
3921 vehicleButton->update();
3922 typeButton->update();
3923 typeDistributionButton->update();
3924 stopButton->update();
3925 personButton->update();
3926 personPlanButton->update();
3927 containerButton->update();
3928 containerPlanButton->update();
3936 myViewNet(viewNet) {
3943 auto gripModes = myViewNet->getViewParent()->getGNEAppWindows()->getToolbarsGrip().modes;
3945 auto tooltipMenu = myViewNet->myViewParent->getGNEAppWindows()->getStaticTooltipMenu();
3948 std::string(
"\t") +
TL(
"Edge data mode") + std::string(
"\t") +
TL(
"Mode for creating edge datas. (E)"),
3950 edgeDataButton->create();
3953 std::string(
"\t") +
TL(
"Edge relation data mode") + std::string(
"\t") +
TL(
"Mode for creating edge relation datas. (R)"),
3955 edgeRelDataButton->create();
3958 std::string(
"\t") +
TL(
"TAZ relation data mode") + std::string(
"\t") +
TL(
"Mode for creating TAZ relation datas. (Z)"),
3960 TAZRelDataButton->create();
3963 std::string(
"\t") +
TL(
"MeanData mode") + std::string(
"\t") +
TL(
"Mode for MeanData elements. (M)"),
3965 meanDataButton->create();
3967 gripModes->recalc();
3973 edgeDataButton->show();
3974 edgeRelDataButton->show();
3975 TAZRelDataButton->show();
3976 meanDataButton->show();
3982 edgeDataButton->hide();
3983 edgeRelDataButton->hide();
3984 TAZRelDataButton->hide();
3985 meanDataButton->hide();
3991 edgeDataButton->setChecked(
false);
3992 edgeRelDataButton->setChecked(
false);
3993 TAZRelDataButton->setChecked(
false);
3994 meanDataButton->setChecked(
false);
4000 edgeDataButton->update();
4001 edgeRelDataButton->update();
4002 TAZRelDataButton->update();
4003 meanDataButton->update();
4018 if (element && (myEditedNetworkElement ==
nullptr)) {
4020 myPreviousNetworkEditMode = myViewNet->myEditModes.networkEditMode;
4024 myEditedNetworkElement = element;
4028 myViewNet->updateViewNet();
4036 if (myEditedNetworkElement !=
nullptr) {
4038 myEditedNetworkElement->setShapeEdited(
false);
4040 myEditedNetworkElement =
nullptr;
4042 if (myViewNet->myEditModes.networkEditMode != myPreviousNetworkEditMode) {
4043 myViewNet->myEditModes.setNetworkEditMode(myPreviousNetworkEditMode);
4052 if (myEditedNetworkElement !=
nullptr) {
4054 stopEditCustomShape();
4061 return myEditedNetworkElement;
4071 const double size,
const double offsetx,
const double offsety) {
4073 if (checkDrawing(d, AC, type, exaggeration)) {
4079 glTranslated(offsetx, offsety, 0);
4081 glRotated(180, 0, 0, 1);
4105 if (exaggeration == 0) {
4109 if (viewNet->getEditModes().isCurrentSupermodeNetwork() &&
4131const std::vector<RGBColor>&
4156 }
else if (value >= max) {
4160 const double procent = ((value - min) * 100) / (max - min);
4164 }
else if (procent >= 100) {
4174std::vector<GUIGlObject*>
4176 std::vector<GUIGlObject*> filteredGLObjects;
4177 if (GLObjects.size() > 0) {
4178 const auto firstLayer = GLObjects.front()->getType();
4179 for (
const auto& GLObject : GLObjects) {
4181 (GLO_RIDE <= GLObject->getType()) && (GLObject->getType() <=
GLO_TRANSHIP)) {
4182 filteredGLObjects.push_back(GLObject);
4184 (GLO_STOP <= GLObject->getType()) && (GLObject->getType() <=
GLO_STOP_PLAN)) {
4185 filteredGLObjects.push_back(GLObject);
4187 (GLO_VEHICLE <= GLObject->getType()) && (GLObject->getType() <=
GLO_ROUTEFLOW)) {
4188 filteredGLObjects.push_back(GLObject);
4190 (GLO_PERSON <= GLObject->getType()) && (GLObject->getType() <=
GLO_PERSONFLOW)) {
4191 filteredGLObjects.push_back(GLObject);
4193 (GLO_CONTAINER <= GLObject->getType()) && (GLObject->getType() <=
GLO_CONTAINERFLOW)) {
4194 filteredGLObjects.push_back(GLObject);
4195 }
else if (GLObject->getType() == firstLayer) {
4196 filteredGLObjects.push_back(GLObject);
4200 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)
bool isInspectingElements() const
check if we're inspecting at least one element
void inspectAC(GNEAttributeCarrier *AC)
void inspectACs(const std::vector< GNEAttributeCarrier * > &ACs)
inspect multiple ACs
bool isACInspected(GNEAttributeCarrier *AC) const
const std::unordered_set< GNEAttributeCarrier * > & getACs() const
get hash table with all inspected ACs
GNEAttributeCarrier * getFirstAC() const
void uninspectAC(GNEAttributeCarrier *AC)
uninspect AC
bool isInspectingSingleElement() const
check if we're inspecting exactly one element
bool isInspectingMultipleElements() const
check if we're inspecting more than one elements
InspectedElements()
constructor
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 GUIGLObject 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 for pack elements sorted by layer
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