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 
164 // ===========================================================================
165 // classes and structs definitions
166 // ===========================================================================
167 
169 
171  class LockManager {
172 
173  public:
175  LockManager(GNEViewNet* viewNet);
176 
178  ~LockManager();
179 
181  bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;
182 
184  void updateFlags();
185 
187  void updateLockMenuBar();
188 
189  private:
192 
193  public:
195  OperationLocked();
196 
198  OperationLocked(Supermode supermode);
199 
202 
204  Supermode getSupermode() const;
205 
207  bool lock = false;
208 
209  private:
212  };
213 
216 
218  std::map<GUIGlObjectType, OperationLocked> myLockedElements;
219  };
220 
223 
224  public:
227 
229  void updateObjects();
230 
232  void filterEdges();
233 
235  void filterLanes();
236 
238  void filterLockedElements(const std::vector<GUIGlObjectType> ignoreFilter = {});
239 
241  const GUIGlObject* getGUIGlObjectFront() const;
242 
245 
248 
251 
254 
257 
259  GNEJunction* getJunctionFront() const;
260 
262  GNEEdge* getEdgeFront() const;
263 
265  GNELane* getLaneFront() const;
266 
269 
271  const std::vector<GNELane*>& getLanes() const;
272 
274  GNECrossing* getCrossingFront() const;
275 
278 
281 
284 
286  GNETAZ* getTAZFront() const;
287 
289  GNEPOI* getPOIFront() const;
290 
292  GNEPoly* getPolyFront() const;
293 
296 
299 
301  const std::vector<GUIGlObject*>& getGLObjects() const;
302 
304  const std::vector<GNEAttributeCarrier*>& getAttributeCarriers() const;
305 
307  const std::vector<GNEJunction*>& getJunctions() const;
308 
310  const std::vector<GNEEdge*>& getEdges() const;
311 
313  const std::vector<GNETAZ*>& getTAZs() const;
314 
316  const std::vector<GNEAdditional*>& getAdditionals() const;
317 
319  const std::vector<GNEDemandElement*>& getDemandElements() const;
320 
321  protected:
324 
325  public:
328 
330  void clearElements();
331 
333  void filterElements(const std::vector<const GUIGlObject*>& objects);
334 
336  std::vector<GUIGlObject*> GUIGlObjects;
337 
339  std::vector<GNEAttributeCarrier*> attributeCarriers;
340 
342  std::vector<GNENetworkElement*> networkElements;
343 
345  std::vector<GNEAdditional*> additionals;
346 
348  std::vector<GNEDemandElement*> demandElements;
349 
351  std::vector<GNEGenericData*> genericDatas;
352 
354  std::vector<GNEJunction*> junctions;
355 
357  std::vector<GNEEdge*> edges;
358 
360  std::vector<GNELane*> lanes;
361 
363  std::vector<GNECrossing*> crossings;
364 
366  std::vector<GNEWalkingArea*> walkingAreas;
367 
369  std::vector<GNEConnection*> connections;
370 
372  std::vector<GNEInternalLane*> internalLanes;
373 
375  std::vector<GNETAZ*> TAZs;
376 
378  std::vector<GNEPOI*> POIs;
379 
381  std::vector<GNEPoly*> polys;
382 
384  std::vector<GNEEdgeData*> edgeDatas;
385 
387  std::vector<GNEEdgeRelData*> edgeRelDatas;
388 
389  private:
392  };
393 
396 
399 
400  private:
402  void updateNetworkElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
403 
405  void updateAdditionalElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
406 
408  void updateShapeElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
409 
411  void updateTAZElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
412 
414  void updateDemandElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
415 
417  void updateGenericDataElements(ViewObjectsContainer& container, const GUIGlObject* glObject);
418 
421 
424 
427 
430  };
431 
434 
437 
439  void update(void* eventData);
440 
442  bool shiftKeyPressed() const;
443 
445  bool controlKeyPressed() const;
446 
448  bool altKeyPressed() const;
449 
451  bool mouseLeftButtonPressed() const;
452 
454  bool mouseRightButtonPressed() const;
455 
456  private:
458  FXEvent* myEventInfo;
459 
462 
465  };
466 
468  struct SaveElements {
469 
471  SaveElements(GNEViewNet* viewNet);
472 
474  ~SaveElements();
475 
478 
480  void setSaveIndividualFiles(bool value);
481 
482  private:
485 
487  FXPopup* mySaveIndividualFilesPopup = nullptr;
488 
491 
494 
497 
500 
503 
506 
509 
512 
514  SaveElements(const SaveElements&) = delete;
515 
518  };
519 
521  struct TimeFormat {
522 
524  TimeFormat(GNEViewNet* viewNet);
525 
527  void buildTimeFormatButtons();
528 
530  void switchTimeFormat();
531 
533  void updateButtonLabel();
534 
535  private:
538 
541 
543  TimeFormat(const TimeFormat&) = delete;
544 
546  TimeFormat& operator=(const TimeFormat&) = delete;
547  };
548 
550  struct EditModes {
551 
553  EditModes(GNEViewNet* viewNet);
554 
556  ~EditModes();
557 
559  void buildSuperModeButtons();
560 
562  void setSupermode(Supermode supermode, const bool force);
563 
565  void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
566 
568  void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
569 
571  void setDataEditMode(DataEditMode dataMode, const bool force = false);
572 
574  bool isCurrentSupermodeNetwork() const;
575 
577  bool isCurrentSupermodeDemand() const;
578 
580  bool isCurrentSupermodeData() const;
581 
583  void setView(FXSelector sel);
584 
586  bool isDefaultView() const;
587 
589  bool isJuPedSimView() const;
590 
593 
596 
599 
602 
605 
608 
611 
612  private:
615 
617  FXPopup* myNeteditViewsPopup = nullptr;
618 
621 
624 
627 
629  EditModes(const EditModes&) = delete;
630 
632  EditModes& operator=(const EditModes&) = delete;
633  };
634 
637 
639  NetworkViewOptions(GNEViewNet* viewNet);
640 
643 
646 
648  void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
649 
651  bool drawSpreadVehicles() const;
652 
654  bool showDemandElements() const;
655 
657  bool selectEdges() const;
658 
660  bool showConnections() const;
661 
663  bool showSubAdditionals() const;
664 
666  bool showTAZElements() const;
667 
669  bool editingElevation() const;
670 
673 
676 
679 
682 
685 
688 
691 
694 
697 
700 
703 
706 
709 
712 
715 
718 
719  private:
722 
725 
728  };
729 
732 
734  DemandViewOptions(GNEViewNet* viewNet);
735 
738 
741 
743  void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
744 
746  bool drawSpreadVehicles() const;
747 
749  bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
750 
752  bool showShapes() const;
753 
755  bool showAllTrips() const;
756 
758  bool showAllPersonPlans() const;
759 
761  void lockPerson(const GNEDemandElement* person);
762 
764  void unlockPerson();
765 
767  const GNEDemandElement* getLockedPerson() const;
768 
770  bool showAllContainerPlans() const;
771 
773  void lockContainer(const GNEDemandElement* container);
774 
776  void unlockContainer();
777 
779  bool showOverlappedRoutes() const;
780 
782  const GNEDemandElement* getLockedContainer() const;
783 
786 
789 
792 
795 
798 
801 
804 
807 
810 
813 
816 
817  private:
820 
823 
826 
829 
832  };
833 
836 
838  DataViewOptions(GNEViewNet* viewNet);
839 
842 
845 
847  void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
848 
850  bool showAdditionals() const;
851 
853  bool showShapes() const;
854 
856  bool showDemandElements() const;
857 
859  bool TAZRelDrawing() const;
860 
862  bool TAZDrawFill() const;
863 
865  bool TAZRelOnlyFrom() const;
866 
868  bool TAZRelOnlyTo() const;
869 
872 
875 
878 
881 
884 
887 
890 
893 
894  private:
897 
900 
903  };
904 
906  class IntervalBar {
907 
908  public:
910  IntervalBar(GNEViewNet* viewNet);
911 
914 
916  void showIntervalBar();
917 
919  void hideIntervalBar();
920 
922  void updateIntervalBar();
923 
924  // @brief mark for update
925  void markForUpdate();
926 
929 
932 
934  GNEDataSet* getDataSet() const;
935 
937  double getBegin() const;
938 
940  double getEnd() const;
941 
943  std::string getParameter() const;
944 
946 
949 
951  void setGenericDataType();
952 
954  void setDataSet();
955 
957  void setInterval();
958 
960  void setBegin();
961 
963  void setEnd();
964 
966  void setParameter();
967 
969 
970  protected:
972  void enableIntervalBar();
973 
975  void disableIntervalBar();
976 
977  private:
980 
982  bool myUpdateInterval = true;
983 
986 
989 
991  FXCheckButton* myIntervalCheckBox = nullptr;
992 
994  FXTextField* myBeginTextField = nullptr;
995 
997  FXTextField* myEndTextField = nullptr;
998 
1001 
1003  std::vector<std::string> myDataSets;
1004 
1006  std::set<std::string> myParameters;
1007 
1008  private:
1010  IntervalBar(const IntervalBar&) = delete;
1011 
1013  IntervalBar& operator=(const IntervalBar&) = delete;
1014  };
1015 
1018 
1021 
1024 
1027 
1030 
1032  void moveSingleElement(const bool mouseLeftButtonPressed);
1033 
1035  void finishMoveSingleElement();
1036 
1038  bool isMovingElements() const;
1039 
1040  protected:
1042  const GNEMoveOffset calculateMoveOffset() const;
1043 
1044  private:
1047 
1050 
1052  std::vector<GNEMoveOperation*> myMoveOperations;
1053  };
1054 
1057 
1060 
1062  void beginMoveSelection();
1063 
1065  void moveSelection(const bool mouseLeftButtonPressed);
1066 
1068  void finishMoveSelection();
1069 
1071  bool isMovingSelection() const;
1072 
1074  bool isMovingSelectedEdge() const;
1075 
1077  void resetMovingSelectedEdge();
1078 
1080  double getEdgeOffset() const;
1081 
1083  bool isMovingElements() const;
1084 
1085  protected:
1087  const GNEMoveOffset calculateMoveOffset() const;
1088 
1091 
1093  void calculateEdgeSelection(const GNEEdge* clickedEdge);
1094 
1095  private:
1098 
1101 
1104 
1107 
1109  std::vector<GNEMoveOperation*> myMoveOperations;
1110  };
1111 
1114 
1116  VehicleOptions(GNEViewNet* viewNet);
1117 
1120 
1123 
1124  private:
1127  };
1128 
1131 
1133  VehicleTypeOptions(GNEViewNet* viewNet);
1134 
1137 
1140 
1141  private:
1144  };
1145 
1148  struct SelectingArea {
1149 
1151  SelectingArea(GNEViewNet* viewNet);
1152 
1154  void beginRectangleSelection();
1155 
1157  void moveRectangleSelection();
1158 
1160  void finishRectangleSelection();
1161 
1164 
1166  std::vector<GNEEdge*> processEdgeRectangleSelection();
1167 
1169  void drawRectangleSelection(const RGBColor& color) const;
1170 
1173 
1176 
1177  private:
1179  void processBoundarySelection(const Boundary& boundary);
1180 
1183 
1186 
1189  };
1190 
1192  struct TestingMode {
1193 
1195  TestingMode(GNEViewNet* viewNet);
1196 
1198  void initTestingMode();
1199 
1201  void drawTestingElements(GUIMainWindow* mainWindow);
1202 
1203  private:
1206 
1209 
1212  };
1213 
1216 
1219 
1222 
1225 
1228 
1231 
1234 
1237 
1240 
1243 
1244  private:
1247  };
1248 
1251 
1254 
1257 
1260 
1263 
1266 
1269 
1272 
1275 
1278 
1281 
1284 
1287 
1290 
1293 
1296 
1299 
1302 
1303  private:
1306  };
1307 
1310 
1313 
1316 
1319 
1322 
1325 
1328 
1331 
1334 
1337 
1340 
1343 
1346 
1349 
1352 
1355 
1358 
1361 
1362  private:
1365  };
1366 
1369 
1371  DataCheckableButtons(GNEViewNet* viewNet);
1372 
1375 
1377  void showDataCheckableButtons();
1378 
1380  void hideDataCheckableButtons();
1381 
1384 
1387 
1390 
1393 
1396 
1399 
1400  private:
1403  };
1404 
1407 
1410 
1412  void startEditCustomShape(GNENetworkElement* element);
1413 
1415  void stopEditCustomShape();
1416 
1418  void commitEditedShape();
1419 
1422 
1423  private:
1426 
1429 
1432 
1433  };
1434 
1436  struct LockIcon {
1438  static void drawLockIcon(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position position,
1439  const double exaggeration, const double size = 0.5,
1440  const double offsetx = 0, const double offsety = 0);
1441 
1443  static bool checkDrawing(const GUIVisualizationSettings::Detail d, const GNEAttributeCarrier* AC,
1444  GUIGlObjectType type, const double exaggeration);
1445  private:
1447  LockIcon();
1448 
1450  LockIcon& operator=(const LockIcon& other) = delete;
1451  };
1452 
1454  static const std::vector<RGBColor>& getRainbowScaledColors();
1455 
1457  static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1458 
1460  static std::vector<GUIGlObject*> filterElementsByLayer(const std::vector<GUIGlObject*>& GLObjects);
1461 
1462 private:
1464  static std::vector<RGBColor> myRainbowScaledColors;
1465 };
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 offset
Definition: GNEPOI.h:43
Definition: GNETAZ.h:34
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< 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 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
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
const std::vector< GUIGlObject * > & getGLObjects() const
get vector with GL objects
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
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
bool isMovingElements() const
check if there are moving elements
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
std::vector< GNEMoveOperation * > myMoveOperations
move operations
const GNEMoveOffset calculateMoveOffset() const
calculate offset
Position myRelativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
bool isMovingElements() const
check if there are moving elements
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
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