Eclipse SUMO - Simulation of Urban MObility
GNEViewNetHelper.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // A file used to reduce the size of GNEViewNet.h grouping structs and classes
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
30 
31 #include "GNEMoveElement.h"
32 
33 // ===========================================================================
34 // enum
35 // ===========================================================================
36 
38 enum class Supermode {
40  NETWORK,
42  DEMAND,
44  DATA
45 };
46 
48 enum class NetworkEditMode {
79 };
80 
82 enum class DemandEditMode {
100  DEMAND_TYPE,
104  DEMAND_STOP,
113 };
114 
116 enum class DataEditMode {
118  DATA_NONE,
120  DATA_INSPECT,
122  DATA_DELETE,
124  DATA_SELECT,
133 };
134 
135 // ===========================================================================
136 // class declarations
137 // ===========================================================================
138 
139 // main elements
140 class GNEAttributeCarrier;
141 class GNEViewNet;
142 // network elements
143 class GNENetworkElement;
144 class GNEJunction;
145 class GNEEdge;
146 class GNELane;
147 class GNEConnection;
148 class GNECrossing;
149 class GNEWalkingArea;
150 class GNEInternalLane;
151 // additional elements
152 class GNEAdditional;
153 class GNEPoly;
154 class GNEPOI;
155 class GNETAZ;
156 // demand elements
157 class GNEDemandElement;
158 // data elements
159 class GNEDataSet;
160 class GNEGenericData;
161 class GNEEdgeData;
162 class GNEEdgeRelData;
163 class GNETAZRelData;
164 
165 // ===========================================================================
166 // classes and structs definitions
167 // ===========================================================================
168 
170 
172  class LockManager {
173 
174  public:
176  LockManager(GNEViewNet* viewNet);
177 
179  ~LockManager();
180 
182  bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;
183 
185  void updateFlags();
186 
188  void updateLockMenuBar();
189 
190  private:
193 
194  public:
196  OperationLocked();
197 
199  OperationLocked(Supermode supermode);
200 
203 
205  Supermode getSupermode() const;
206 
208  bool lock = false;
209 
210  private:
213  };
214 
217 
219  std::map<GUIGlObjectType, OperationLocked> myLockedElements;
220  };
221 
224 
225  public:
228 
230  void updateObjects();
231 
233  void filterEdges();
234 
236  void filterLanes();
237 
239  void filterShapes();
240 
242  void filterAdditionals(const bool includeStoppigPlaces, const bool includeTAZs);
243 
245  void filterDemandElements(const bool includeRoutes);
246 
248  void filterLockedElements(const std::vector<GUIGlObjectType> ignoreFilter = {});
249 
251  const GUIGlObject* getGUIGlObjectFront() const;
252 
255 
258 
261 
264 
267 
269  GNEJunction* getJunctionFront() const;
270 
272  GNEEdge* getEdgeFront() const;
273 
275  GNELane* getLaneFront() const;
276 
279 
281  const std::vector<GNELane*>& getLanes() const;
282 
284  GNECrossing* getCrossingFront() const;
285 
288 
291 
294 
296  GNETAZ* getTAZFront() const;
297 
299  GNEPOI* getPOIFront() const;
300 
302  GNEPoly* getPolyFront() const;
303 
306 
309 
312 
314  const std::vector<GUIGlObject*>& getGLObjects() const;
315 
317  const std::vector<GNEAttributeCarrier*>& getAttributeCarriers() const;
318 
320  const std::vector<GNEJunction*>& getJunctions() const;
321 
323  const std::vector<GNEEdge*>& getEdges() const;
324 
326  const std::vector<GNETAZ*>& getTAZs() const;
327 
329  const std::vector<GNEAdditional*>& getAdditionals() const;
330 
332  const std::vector<GNEDemandElement*>& getDemandElements() const;
333 
334  protected:
337 
338  public:
341 
343  void clearElements();
344 
346  void filterElements(const std::vector<const GUIGlObject*>& objects);
347 
349  std::vector<GUIGlObject*> GUIGlObjects;
350 
352  std::vector<GNEAttributeCarrier*> attributeCarriers;
353 
355  std::vector<GNENetworkElement*> networkElements;
356 
358  std::vector<GNEAdditional*> additionals;
359 
361  std::vector<GNEDemandElement*> demandElements;
362 
364  std::vector<GNEGenericData*> genericDatas;
365 
367  std::vector<GNEJunction*> junctions;
368 
370  std::vector<GNEEdge*> edges;
371 
373  std::vector<GNELane*> lanes;
374 
376  std::vector<GNECrossing*> crossings;
377 
379  std::vector<GNEWalkingArea*> walkingAreas;
380 
382  std::vector<GNEConnection*> connections;
383 
385  std::vector<GNEInternalLane*> internalLanes;
386 
388  std::vector<GNETAZ*> TAZs;
389 
391  std::vector<GNEPOI*> POIs;
392 
394  std::vector<GNEPoly*> polys;
395 
397  std::vector<GNEEdgeData*> edgeDatas;
398 
400  std::vector<GNEEdgeRelData*> edgeRelDatas;
401 
403  std::vector<GNETAZRelData*> TAZRelDatas;
404 
405  private:
408  };
409 
412 
415 
416  private:
418  void updateNetworkElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
419 
421  void updateAdditionalElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
422 
424  void updateShapeElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
425 
427  void updateTAZElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
428 
430  void updateDemandElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
431 
433  void updateGenericDataElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
434 
437 
440 
443 
446  };
447 
450 
453 
455  void update(void* eventData);
456 
458  bool shiftKeyPressed() const;
459 
461  bool controlKeyPressed() const;
462 
464  bool altKeyPressed() const;
465 
467  bool mouseLeftButtonPressed() const;
468 
470  bool mouseRightButtonPressed() const;
471 
472  private:
474  FXEvent* myEventInfo;
475 
478 
481  };
482 
484  struct SaveElements {
485 
487  SaveElements(GNEViewNet* viewNet);
488 
490  ~SaveElements();
491 
494 
496  void setSaveIndividualFiles(bool value);
497 
498  private:
501 
503  FXPopup* mySaveIndividualFilesPopup = nullptr;
504 
507 
510 
513 
516 
519 
522 
525 
528 
530  SaveElements(const SaveElements&) = delete;
531 
534  };
535 
537  struct TimeFormat {
538 
540  TimeFormat(GNEViewNet* viewNet);
541 
543  void buildTimeFormatButtons();
544 
546  void switchTimeFormat();
547 
549  void updateButtonLabel();
550 
551  private:
554 
557 
559  TimeFormat(const TimeFormat&) = delete;
560 
562  TimeFormat& operator=(const TimeFormat&) = delete;
563  };
564 
566  struct EditModes {
567 
569  EditModes(GNEViewNet* viewNet);
570 
572  ~EditModes();
573 
575  void buildSuperModeButtons();
576 
578  void setSupermode(Supermode supermode, const bool force);
579 
581  void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
582 
584  void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
585 
587  void setDataEditMode(DataEditMode dataMode, const bool force = false);
588 
590  bool isCurrentSupermodeNetwork() const;
591 
593  bool isCurrentSupermodeDemand() const;
594 
596  bool isCurrentSupermodeData() const;
597 
599  void setView(FXSelector sel);
600 
602  bool isDefaultView() const;
603 
605  bool isJuPedSimView() const;
606 
609 
612 
615 
618 
621 
624 
627 
628  private:
631 
633  FXPopup* myNeteditViewsPopup = nullptr;
634 
637 
640 
643 
645  EditModes(const EditModes&) = delete;
646 
648  EditModes& operator=(const EditModes&) = delete;
649  };
650 
653 
655  NetworkViewOptions(GNEViewNet* viewNet);
656 
659 
662 
664  void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
665 
667  bool drawSpreadVehicles() const;
668 
670  bool showDemandElements() const;
671 
673  bool selectEdges() const;
674 
676  bool showConnections() const;
677 
679  bool showSubAdditionals() const;
680 
682  bool showTAZElements() const;
683 
685  bool editingElevation() const;
686 
689 
692 
695 
698 
701 
704 
707 
710 
713 
716 
719 
722 
725 
728 
731 
734 
735  private:
738 
741 
744  };
745 
748 
750  DemandViewOptions(GNEViewNet* viewNet);
751 
754 
757 
759  void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
760 
762  bool drawSpreadVehicles() const;
763 
765  bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
766 
768  bool showShapes() const;
769 
771  bool showAllTrips() const;
772 
774  bool showAllPersonPlans() const;
775 
777  void lockPerson(const GNEDemandElement* person);
778 
780  void unlockPerson();
781 
783  const GNEDemandElement* getLockedPerson() const;
784 
786  bool showAllContainerPlans() const;
787 
789  void lockContainer(const GNEDemandElement* container);
790 
792  void unlockContainer();
793 
795  bool showOverlappedRoutes() const;
796 
798  const GNEDemandElement* getLockedContainer() const;
799 
802 
805 
808 
811 
814 
817 
820 
823 
826 
829 
832 
833  private:
836 
839 
842 
845 
848  };
849 
852 
854  DataViewOptions(GNEViewNet* viewNet);
855 
858 
861 
863  void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
864 
866  bool showAdditionals() const;
867 
869  bool showShapes() const;
870 
872  bool showDemandElements() const;
873 
875  bool TAZRelDrawing() const;
876 
878  bool TAZDrawFill() const;
879 
881  bool TAZRelOnlyFrom() const;
882 
884  bool TAZRelOnlyTo() const;
885 
888 
891 
894 
897 
900 
903 
906 
909 
910  private:
913 
916 
919  };
920 
922  class IntervalBar {
923 
924  public:
926  IntervalBar(GNEViewNet* viewNet);
927 
930 
932  void showIntervalBar();
933 
935  void hideIntervalBar();
936 
938  void updateIntervalBar();
939 
940  // @brief mark for update
941  void markForUpdate();
942 
945 
948 
950  GNEDataSet* getDataSet() const;
951 
953  double getBegin() const;
954 
956  double getEnd() const;
957 
959  std::string getParameter() const;
960 
962 
965 
967  void setGenericDataType();
968 
970  void setDataSet();
971 
973  void setInterval();
974 
976  void setBegin();
977 
979  void setEnd();
980 
982  void setParameter();
983 
985 
986  protected:
988  void enableIntervalBar();
989 
991  void disableIntervalBar();
992 
993  private:
996 
998  bool myUpdateInterval = true;
999 
1002 
1005 
1007  FXCheckButton* myIntervalCheckBox = nullptr;
1008 
1010  FXTextField* myBeginTextField = nullptr;
1011 
1013  FXTextField* myEndTextField = nullptr;
1014 
1017 
1019  std::vector<std::string> myDataSets;
1020 
1022  std::set<std::string> myParameters;
1023 
1024  private:
1026  IntervalBar(const IntervalBar&) = delete;
1027 
1029  IntervalBar& operator=(const IntervalBar&) = delete;
1030  };
1031 
1034 
1037 
1040 
1043 
1046 
1048  void moveSingleElement(const bool mouseLeftButtonPressed);
1049 
1051  void finishMoveSingleElement();
1052 
1054  bool isCurrentlyMovingSingleElement() const;
1055 
1058 
1059  protected:
1061  const GNEMoveOffset calculateMoveOffset() const;
1062 
1063  private:
1066 
1069 
1072  };
1073 
1076 
1079 
1081  void beginMoveSelection();
1082 
1084  void moveSelection(const bool mouseLeftButtonPressed);
1085 
1087  void finishMoveSelection();
1088 
1090  bool isMovingSelection() const;
1091 
1093  bool isMovingSelectedEdge() const;
1094 
1096  void resetMovingSelectedEdge();
1097 
1099  double getEdgeOffset() const;
1100 
1102  bool isCurrentlyMovingMultipleElements() const;
1103 
1104  protected:
1106  const GNEMoveOffset calculateMoveOffset() const;
1107 
1110 
1112  void calculateEdgeSelection(const GNEEdge* clickedEdge);
1113 
1114  private:
1117 
1120 
1123 
1126 
1128  std::vector<GNEMoveOperation*> myMoveOperations;
1129  };
1130 
1133 
1135  VehicleOptions(GNEViewNet* viewNet);
1136 
1139 
1142 
1143  private:
1146  };
1147 
1150 
1152  VehicleTypeOptions(GNEViewNet* viewNet);
1153 
1156 
1159 
1160  private:
1163  };
1164 
1167  struct SelectingArea {
1168 
1170  SelectingArea(GNEViewNet* viewNet);
1171 
1173  void beginRectangleSelection();
1174 
1176  void moveRectangleSelection();
1177 
1179  void finishRectangleSelection();
1180 
1183 
1185  std::vector<GNEEdge*> processEdgeRectangleSelection();
1186 
1188  void drawRectangleSelection(const RGBColor& color) const;
1189 
1192 
1195 
1196  private:
1198  void processBoundarySelection(const Boundary& boundary);
1199 
1202 
1205 
1208  };
1209 
1211  struct TestingMode {
1212 
1214  TestingMode(GNEViewNet* viewNet);
1215 
1217  void initTestingMode();
1218 
1220  void drawTestingElements(GUIMainWindow* mainWindow);
1221 
1222  private:
1225 
1228 
1231  };
1232 
1235 
1238 
1241 
1244 
1247 
1250 
1253 
1256 
1259 
1262 
1263  private:
1266  };
1267 
1270 
1273 
1276 
1279 
1282 
1285 
1288 
1291 
1294 
1297 
1300 
1303 
1306 
1309 
1312 
1315 
1318 
1321 
1322  private:
1325  };
1326 
1329 
1332 
1335 
1338 
1341 
1344 
1347 
1350 
1353 
1356 
1359 
1362 
1365 
1368 
1371 
1374 
1377 
1380 
1381  private:
1384  };
1385 
1388 
1390  DataCheckableButtons(GNEViewNet* viewNet);
1391 
1394 
1396  void showDataCheckableButtons();
1397 
1399  void hideDataCheckableButtons();
1400 
1403 
1406 
1409 
1412 
1415 
1418 
1419  private:
1422  };
1423 
1426 
1429 
1431  void startEditCustomShape(GNENetworkElement* element);
1432 
1434  void stopEditCustomShape();
1435 
1437  void commitShapeEdited();
1438 
1441 
1442  private:
1445 
1448 
1451  };
1452 
1454  struct LockIcon {
1456  static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position position,
1457  const double exaggeration, const double size = 0.5,
1458  const double offsetx = 0, const double offsety = 0);
1459 
1461  static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC,
1462  GUIGlObjectType type, const double exaggeration);
1463  private:
1465  LockIcon();
1466 
1468  LockIcon& operator=(const LockIcon& other) = delete;
1469  };
1470 
1472  static const std::vector<RGBColor>& getRainbowScaledColors();
1473 
1475  static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1476 
1478  static std::vector<GUIGlObject*> filterElementsByLayer(const std::vector<GUIGlObject*>& GLObjects);
1479 
1480 private:
1482  static std::vector<RGBColor> myRainbowScaledColors;
1483 };
DataEditMode
enum for data edit modes
@ DATA_MEANDATA
mode for create meanData elements
@ DATA_EDGERELDATA
mode for create edgeRelData elements
@ DATA_NONE
empty Data mode
@ DATA_SELECT
mode for selecting data elements
@ DATA_TAZRELDATA
mode for create TAZRelData elements
@ DATA_INSPECT
mode for inspecting data elements
@ DATA_EDGEDATA
mode for create edgeData 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_SHAPE
Mode for editing Polygons.
@ NETWORK_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ NETWORK_WIRE
Mode for editing wires.
@ NETWORK_ADDITIONAL
Mode for editing additionals.
@ NETWORK_TAZ
Mode for editing TAZ.
@ NETWORK_CREATE_EDGE
mode for creating new edges
@ NETWORK_TLS
mode for editing tls
@ NETWORK_CROSSING
Mode for editing crossing.
@ 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
@ NETWORK_DECAL
Mode for editing decals.
DemandEditMode
@brie enum for demand edit modes
@ DEMAND_PERSONPLAN
Mode for editing person plan.
@ DEMAND_INSPECT
mode for inspecting demand elements
@ DEMAND_CONTAINER
Mode for editing container.
@ DEMAND_DELETE
mode for deleting demand elements
@ DEMAND_ROUTEDISTRIBUTION
Mode for editing route distributions.
@ DEMAND_NONE
empty Demand mode
@ DEMAND_PERSON
Mode for editing person.
@ DEMAND_TYPEDISTRIBUTION
Mode for editing type distributions.
@ DEMAND_SELECT
mode for selecting demand elements
@ DEMAND_ROUTE
Mode for editing routes.
@ DEMAND_VEHICLE
Mode for editing vehicles.
@ DEMAND_MOVE
mode for moving demand elements
@ DEMAND_STOP
Mode for editing stops.
@ DEMAND_CONTAINERPLAN
Mode for editing container plan.
@ DEMAND_TYPE
Mode for editing types.
GUIGlObjectType
SumoXMLTag
Numbers representing SUMO-XML - element names.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEAdditional.h:49
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:44
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNEEdgeData.h:37
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
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.
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.
Definition: GNELane.h:46
move element
move offset
move operation
Definition: GNEPOI.h:43
Definition: GNETAZ.h:34
An Element which don't belong to GNENet but has influence in the simulation.
Definition: GNETAZRelData.h:38
class used to group all variables related to interval bar
IntervalBar(const IntervalBar &)=delete
Invalidated copy constructor.
MFXComboBoxIcon * myParametersComboBox
combo box for filtered parameters
FXCheckButton * myIntervalCheckBox
checkbox for limit data elements by interval
FXTextField * myEndTextField
text field for interval end
std::string getParameter() const
get parameter
std::set< std::string > myParameters
current parameters
void hideIntervalBar()
hide all options menu checks
void setGenericDataType()
set generic data type
GNEViewNet * myViewNet
pointer to net
double getBegin() const
get begin
void showIntervalBar()
show interval option bar
void disableIntervalBar()
disable interval bar
FXTextField * myBeginTextField
text field for interval begin
void updateIntervalBar()
update interval bar
bool myUpdateInterval
flag for update interval bar
void buildIntervalBarElements()
build interval bar elements
GNEDataSet * getDataSet() const
get dataSet
MFXComboBoxIcon * myDataSetsComboBox
combo box for data sets
std::vector< std::string > myDataSets
current dataSets
IntervalBar(GNEViewNet *viewNet)
default constructor
void enableIntervalBar()
enable interval bar
MFXComboBoxIcon * myGenericDataTypesComboBox
combo box for generic data types
void setInterval()
update limit by interval
IntervalBar & operator=(const IntervalBar &)=delete
Invalidated assignment operator.
SumoXMLTag getGenericDataType() const
get generic data type
Supermode mySupermode
supermode associated with this operation locked
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
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
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(const ViewObjectsContainer &)=delete
Invalidated copy constructor.
class used to group all variables related with objects under cursor after a click over view
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
const GNEViewNet * myViewNet
pointer to viewNet
void processGUIGlObjects(const GUIViewObjectsHandler::GLObjectsSortedContainer &objectsContainer)
process GL objects
const std::vector< GNETAZ * > & getTAZs() const
get vector with TAZs
ViewObjectsContainer myViewObjects
objects container with selected objects
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
ViewObjectsSelector(const ViewObjectsSelector &)=delete
Invalidated copy constructor.
void updateAdditionalElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update additional elements
void updateGenericDataElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update generic data elements
void filterDemandElements(const bool includeRoutes)
filter (remove) demand elements
void updateTAZElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update TAZ elements
const std::vector< GNEDemandElement * > & getDemandElements() const
get vector with Demand Elements
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
void filterAdditionals(const bool includeStoppigPlaces, const bool includeTAZs)
filter (remove) additionals
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
void updateNetworkElements(ViewObjectsContainer &container, const GUIGlObject *glObject)
update network elements
GNEGenericData * getGenericDataElementFront() const
get generic data element or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNELane * getLaneFrontNonLocked() const
get front lane or a pointer to nullptr checking if is locked
const GUIGlObject * getGUIGlObjectFront() const
get front attribute carrier or a pointer to nullptr
GNENetworkElement * getNetworkElementFront() const
get front network element or a pointer to nullptr
const std::vector< GNEEdge * > & getEdges() const
get vector with edges
GNECrossing * getCrossingFront() const
get front crossing or a pointer to nullptr
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
ViewObjectsSelector & operator=(const ViewObjectsSelector &)=delete
Invalidated assignment operator.
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...
std::map< double, std::vector< ObjectContainer > > GLObjectsSortedContainer
typedef
ComboBox with icon.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
struct used to group all variables related with common checkable Buttons
CommonCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildCommonCheckableButtons()
build checkable buttons
void updateCommonCheckableButtons()
update Common checkable buttons
void disableCommonCheckableButtons()
hide all options menu checks
MFXCheckableButton * selectButton
checkable button for edit mode select
void hideCommonCheckableButtons()
hide all Common Checkable Buttons
MFXCheckableButton * inspectButton
checkable button for edit mode inspect
void showCommonCheckableButtons()
show all Common Checkable Buttons
MFXCheckableButton * deleteButton
checkable button for edit mode delete
struct used to group all variables related with Data checkable Buttons
void hideDataCheckableButtons()
hide all Data Checkable Buttons
void showDataCheckableButtons()
show all Data Checkable Buttons
void disableDataCheckableButtons()
hide all options menu checks
void buildDataCheckableButtons()
build checkable buttons
GNEViewNet * myViewNet
pointer to net
void updateDataCheckableButtons()
update Data checkable buttons
MFXCheckableButton * edgeDataButton
checkable button for edit mode "edgeData"
MFXCheckableButton * edgeRelDataButton
checkable button for edit mode "edgeRelData"
DataCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * TAZRelDataButton
checkable button for edit mode "TAZRelData"
MFXCheckableButton * meanDataButton
checkable button for edit mode "meanData"
struct used to group all variables related to view options in supermode Data
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
MFXCheckableButton * menuCheckToggleTAZDrawFill
menu check to toggle TAZ draw fill
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool TAZRelOnlyFrom() const
check if toggle TAZRel only from checkbox is enabled
MFXCheckableButton * menuCheckShowAdditionals
menu check to show Additionals
bool TAZDrawFill() const
check if toggle TAZ draw fill checkbox is enabled
MFXCheckableButton * menuCheckShowShapes
menu check to show Shapes
DataViewOptions & operator=(const DataViewOptions &)=delete
Invalidated assignment operator.
MFXCheckableButton * menuCheckToggleTAZRelOnlyFrom
menu check to toggle TAZRel only from
GNEViewNet * myViewNet
pointer to net
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
void buildDataViewOptionsMenuChecks()
build menu checks
void getVisibleDataMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible demand menu commands
MFXCheckableButton * menuCheckToggleTAZRelDrawing
menu check to toggle TAZ Rel drawing
MFXCheckableButton * menuCheckShowDemandElements
menu check to show Demand Elements
bool showShapes() const
check if shapes has to be drawn
DataViewOptions(const DataViewOptions &)=delete
Invalidated copy constructor.
bool TAZRelDrawing() const
check if toggle TAZRel drawing checkbox is enabled
MFXCheckableButton * menuCheckToggleTAZRelOnlyTo
menu check to toggle TAZRel only to
struct used to group all variables related with Demand checkable Buttons
MFXCheckableButton * routeDistributionButton
checkable button for edit mode create route distributions
MFXCheckableButton * containerButton
checkable button for edit mode create containers
void hideDemandCheckableButtons()
hide all Demand Checkable Buttons
MFXCheckableButton * moveDemandElementsButton
checkable button for edit mode "move demand elements"
MFXCheckableButton * typeButton
checkable button for edit mode create type
DemandCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildDemandCheckableButtons()
build checkable buttons
MFXCheckableButton * vehicleButton
checkable button for edit mode create vehicles
MFXCheckableButton * containerPlanButton
checkable button for edit mode create container plans
MFXCheckableButton * routeButton
checkable button for edit mode create routes
void showDemandCheckableButtons()
show all Demand Checkable Buttons
MFXCheckableButton * stopButton
checkable button for edit mode create stops
MFXCheckableButton * personPlanButton
checkable button for edit mode create person plans
MFXCheckableButton * personButton
checkable button for edit mode create persons
void updateDemandCheckableButtons()
update Demand checkable buttons
MFXCheckableButton * typeDistributionButton
checkable button for edit mode create type distribution
void disableDemandCheckableButtons()
hide all options menu checks
struct used to group all variables related to view options in supermode Demand
MFXCheckableButton * menuCheckShowAllTrips
show all trips
void lockPerson(const GNEDemandElement *person)
lock person
bool showAllPersonPlans() const
check all person plans has to be show
MFXCheckableButton * menuCheckToggleGrid
menu check to show grid button
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
void lockContainer(const GNEDemandElement *container)
lock container
DemandViewOptions(const DemandViewOptions &)=delete
Invalidated copy constructor.
void buildDemandViewOptionsMenuChecks()
build menu checks
const GNEDemandElement * myLockedPerson
pointer to locked person
const GNEDemandElement * getLockedPerson() const
get locked person
MFXCheckableButton * menuCheckDrawSpreadVehicles
menu check to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowOverlappedRoutes
show overlapped routes
GNEViewNet * myViewNet
pointer to net
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
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person plans
const GNEDemandElement * myLockedContainer
pointer to locked container
MFXCheckableButton * menuCheckShowAllContainerPlans
show all container plans
MFXCheckableButton * menuCheckHideNonInspectedDemandElements
Hide non inspected demand elements.
MFXCheckableButton * menuCheckHideShapes
Hide shapes (Polygons and POIs)
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
MFXCheckableButton * menuCheckLockPerson
Lock Person.
DemandViewOptions & operator=(const DemandViewOptions &)=delete
Invalidated assignment operator.
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
MFXCheckableButton * menuCheckLockContainer
Lock Container.
struct used to group all variables related with Supermodes
DataEditMode dataEditMode
the current Data edit mode
EditModes & operator=(const EditModes &)=delete
Invalidated assignment operator.
void buildSuperModeButtons()
build checkable buttons
bool isDefaultView() const
check if default view is enabled
DemandEditMode demandEditMode
the current Demand edit mode
Supermode currentSupermode
the current supermode
FXPopup * myNeteditViewsPopup
The netedit views menu.
MFXMenuButtonTooltip * myNeteditViewsButton
The netedit views button.
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
MFXCheckableButton * dataButton
checkable button for supermode Data
MFXButtonTooltip * myJuPedSimViewButton
The jupedsim view button.
bool isCurrentSupermodeData() const
@check if current supermode is Data
void setView(FXSelector sel)
set view
EditModes(const EditModes &)=delete
Invalidated copy constructor.
GNEViewNet * myViewNet
pointer to net
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
MFXCheckableButton * networkButton
checkable button for supermode Network
bool isJuPedSimView() const
check if default view is enabled
void setSupermode(Supermode supermode, const bool force)
set supermode
MFXCheckableButton * demandButton
checkable button for supermode Demand
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
MFXButtonTooltip * myDefaultViewButton
The default view button.
struct used to group all variables related with edit shapes of NetworkElements
GNENetworkElement * getEditedNetworkElement() const
pointer to edited network element
GNEViewNet * myViewNet
pointer to viewNet
EditNetworkElementShapes(GNEViewNet *viewNet)
default constructor
NetworkEditMode myPreviousNetworkEditMode
the previous edit mode before edit NetworkElement's shapes
GNENetworkElement * myEditedNetworkElement
pointer to edited network element
void startEditCustomShape(GNENetworkElement *element)
start edit custom shape
struct for pack all variables and functions related with Block Icon
static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier *AC, GUIGlObjectType type, const double exaggeration)
check if icon can be drawn
LockIcon & operator=(const LockIcon &other)=delete
Invalidated assignment operator.
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
class used to group all variables related with mouse buttons and key pressed after certain events
MouseButtonKeyPressed & operator=(const MouseButtonKeyPressed &)=delete
Invalidated assignment operator.
bool shiftKeyPressed() const
check if SHIFT is pressed during current event
bool altKeyPressed() const
check if ALT is pressed during current event
MouseButtonKeyPressed(const MouseButtonKeyPressed &)=delete
Invalidated copy constructor.
void update(void *eventData)
update status of MouseButtonKeyPressed during current event
bool mouseRightButtonPressed() const
check if mouse right button is pressed during current event
bool controlKeyPressed() const
check if CONTROL is pressed during current event
FXEvent * myEventInfo
information of event (must be updated)
bool mouseLeftButtonPressed() const
check if mouse left button is pressed during current event
struct used to group all variables related with movement of groups of elements
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
bool isMovingSelection() const
check if currently there is element being moved
bool myMovingSelectedEdge
flag for enable moving edge
void resetMovingSelectedEdge()
reset flag for moving edge
std::vector< GNEMoveOperation * > myMoveOperations
move operations
void calculateJunctionSelection()
calculate junction selection
MoveMultipleElementModul(GNEViewNet *viewNet)
constructor
bool isMovingSelectedEdge() const
flag for moving edge
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
struct used to group all variables related with movement of single elements
GNEMoveOperation * myMoveOperation
move operations
const GNEMoveOffset calculateMoveOffset() const
calculate offset
Position myRelativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
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
struct used to group all variables related with Network checkable Buttons
void updateNetworkCheckableButtons()
update network checkable buttons
MFXCheckableButton * trafficLightButton
checkable button for edit mode traffic light
MFXCheckableButton * moveNetworkElementsButton
checkable button for edit mode "move network elements"
void showNetworkCheckableButtons()
show all Network Checkable Buttons
MFXCheckableButton * additionalButton
checkable button for edit mode additional
MFXCheckableButton * crossingButton
checkable button for edit mode crossing
MFXCheckableButton * createEdgeButton
checkable button for edit mode create edge
MFXCheckableButton * prohibitionButton
checkable button for edit mode prohibition
void buildNetworkCheckableButtons()
build checkable buttons
NetworkCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * shapeButton
checkable button for edit mode shape
MFXCheckableButton * connectionButton
checkable button for edit mode connection
void hideNetworkCheckableButtons()
hide all Network Checkable Buttons
MFXCheckableButton * TAZButton
checkable button for edit mode TAZ
void disableNetworkCheckableButtons()
hide all options menu checks
MFXCheckableButton * wireButton
checkable button for edit mode wires
MFXCheckableButton * decalButton
checkable button for edit mode decals
struct used to group all variables related to view options in supermode Network
MFXCheckableButton * menuCheckSelectEdges
checkable button to select only edges
NetworkViewOptions & operator=(const NetworkViewOptions &)=delete
Invalidated assignment operator.
MFXCheckableButton * menuCheckChainEdges
checkable button to the endpoint for a created edge should be set as the new source
MFXCheckableButton * menuCheckShowDemandElements
checkable button to show Demand Elements
bool showConnections() const
check if select show connections checkbox is enabled
MFXCheckableButton * menuCheckMoveElevation
checkable button to apply movement to elevation
NetworkViewOptions(const NetworkViewOptions &)=delete
Invalidated copy constructor.
MFXCheckableButton * menuCheckShowTAZElements
checkable button to show TAZ elements
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
MFXCheckableButton * menuCheckAutoOppositeEdge
check checkable to create auto create opposite edge
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool showSubAdditionals() const
check if show sub-additionals
MFXCheckableButton * menuCheckDrawSpreadVehicles
checkable button to draw vehicles in begin position or spread in lane
MFXCheckableButton * menuCheckShowConnections
checkable button to show connections
MFXCheckableButton * menuCheckHideConnections
checkable button to hide connections in connect mode
MFXCheckableButton * menuCheckToggleDrawJunctionShape
checkable button to show junction shapes
MFXCheckableButton * menuCheckToggleGrid
checkable button to show grid button
bool selectEdges() const
check if select edges checkbox is enabled
MFXCheckableButton * menuCheckShowJunctionBubble
checkable button to show connection as bubble in "Move" mode.
bool showTAZElements() const
check if show TAZ Elements
NetworkViewOptions(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * menuCheckWarnAboutMerge
checkable button to we should warn about merging junctions
void hideNetworkViewOptionsMenuChecks()
hide all options menu checks
MFXCheckableButton * menuCheckShowAdditionalSubElements
checkable button to show additional sub-elements
void buildNetworkViewOptionsMenuChecks()
build menu checks
MFXCheckableButton * menuCheckChangeAllPhases
checkable button to set change all phases
GNEViewNet * myViewNet
pointer to net
MFXCheckableButton * menuCheckExtendSelection
checkable button to extend to edge nodes
struct used to group all variables related with save elements
MFXButtonTooltip * mySaveMeanDataElements
checkable button for save meanData elements
MFXButtonTooltip * mySaveDataElements
checkable button for save genericdata elements
GNEViewNet * myViewNet
pointer to net
MFXButtonTooltip * mySaveNetwork
checkable button for save network
MFXButtonTooltip * mySaveAdditionalElements
checkable button for save additional elements
SaveElements(GNEViewNet *viewNet)
default constructor
SaveElements & operator=(const SaveElements &)=delete
Invalidated assignment operator.
SaveElements(const SaveElements &)=delete
Invalidated copy constructor.
MFXButtonTooltip * mySaveSumoConfig
checkable button for save SUMO config
MFXButtonTooltip * mySaveDemandElements
checkable button for save demand elements
FXPopup * mySaveIndividualFilesPopup
The locator menu.
void setSaveIndividualFiles(bool value)
enable or disable save individual files
MFXButtonTooltip * mySaveNeteditConfig
checkable button for save netedit config
MFXMenuButtonTooltip * mySaveIndividualFiles
checkable button for save individual files
void buildSaveElementsButtons()
build save buttons
struct used to group all variables related with selecting using a square or polygon
void finishRectangleSelection()
finish rectangle selection
void drawRectangleSelection(const RGBColor &color) const
draw rectangle selection
Position selectionCorner1
first corner of the rectangle-selection
void beginRectangleSelection()
begin rectangle selection
bool selectingUsingRectangle
whether we have started rectangle-selection
void moveRectangleSelection()
move rectangle selection
GNEViewNet * myViewNet
pointer to net
void processBoundarySelection(const Boundary &boundary)
Process boundary Selection.
Position selectionCorner2
second corner of the rectangle-selection
bool startDrawing
whether we have started rectangle-selection
void processRectangleSelection()
process rectangle Selection
std::vector< GNEEdge * > processEdgeRectangleSelection()
process rectangle Selection (only limited to Edges)
SelectingArea(GNEViewNet *viewNet)
default constructor
struct used to group all variables related with testing
GNEViewNet * myViewNet
pointer to net
int myTestingHeight
Height of net in testing mode.
void drawTestingElements(GUIMainWindow *mainWindow)
draw testing element
int myTestingWidth
Width of net in testing mode.
TestingMode(GNEViewNet *viewNet)
default constructor
void initTestingMode()
init testing mode
struct used to group all variables related with time format
void buildTimeFormatButtons()
build time format buttons
TimeFormat(const TimeFormat &)=delete
Invalidated copy constructor.
GNEViewNet * myViewNet
pointer to net
TimeFormat & operator=(const TimeFormat &)=delete
Invalidated assignment operator.
TimeFormat(GNEViewNet *viewNet)
default constructor
MFXButtonTooltip * mySwitchButton
checkable button for switch between timeSteps and HH:MM:SS
void switchTimeFormat()
switch time format
void updateButtonLabel()
update button label
struct used to group all variables related with movement of groups of elements
void buildVehicleOptionsMenuChecks()
build menu checks
VehicleOptions(GNEViewNet *viewNet)
constructor
void hideVehicleOptionsMenuChecks()
hide all options menu checks
GNEViewNet * myViewNet
pointer to net
struct used to group all variables related with movement of groups of elements
VehicleTypeOptions(GNEViewNet *viewNet)
constructor
GNEViewNet * myViewNet
pointer to net
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