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.org/sumo
3 // Copyright (C) 2001-2022 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 
26 
27 #include "GNEMoveElement.h"
28 // ===========================================================================
29 // enum
30 // ===========================================================================
31 
33 enum class Supermode {
35  NETWORK,
37  DEMAND,
39  DATA
40 };
41 
43 enum class NetworkEditMode {
70 };
71 
73 enum class DemandEditMode {
100 };
101 
103 enum class DataEditMode {
105  DATA_NONE,
107  DATA_INSPECT,
109  DATA_DELETE,
111  DATA_SELECT,
118 };
119 
120 // ===========================================================================
121 // class declarations
122 // ===========================================================================
123 
124 // main elements
125 class GNEAttributeCarrier;
126 class GNEViewNet;
127 // network elements
128 class GNENetworkElement;
129 class GNEJunction;
130 class GNEEdge;
131 class GNELane;
132 class GNEConnection;
133 class GNECrossing;
134 class GNEInternalLane;
135 // additional elements
136 class GNEAdditional;
137 class GNETAZElement;
138 class GNEShape;
139 class GNEPoly;
140 class GNEPOI;
141 class GNETAZ;
142 // demand elements
143 class GNEDemandElement;
144 // data elements
145 class GNEGenericData;
146 class GNEEdgeData;
147 class GNEEdgeRelData;
148 
149 // ===========================================================================
150 // classes and structs definitions
151 // ===========================================================================
152 
154 
157 
158  public:
160  ObjectsUnderCursor(GNEViewNet* viewNet);
161 
163  void updateObjectUnderCursor(const std::vector<GUIGlObject*>& GUIGlObjects);
164 
166  void swapLane2Edge();
167 
169  GUIGlID getGlIDFront() const;
170 
173 
176 
179 
182 
185 
187  GNEShape* getShapeFront() const;
188 
191 
194 
197 
199  GNEJunction* getJunctionFront() const;
200 
202  GNEEdge* getEdgeFront() const;
203 
205  GNELane* getLaneFront() const;
206 
208  const std::vector<GNELane*>& getLanes() const;
209 
211  GNECrossing* getCrossingFront() const;
212 
215 
218 
220  GNETAZ* getTAZFront() const;
221 
223  GNEPOI* getPOIFront() const;
224 
226  GNEPoly* getPolyFront() const;
227 
230 
233 
235  const std::vector<GNEAttributeCarrier*>& getClickedAttributeCarriers() const;
236 
237  protected:
240 
241  public:
244 
246  void clearElements();
247 
249  std::vector<GUIGlObject*> GUIGlObjects;
250 
252  std::vector<GNEAttributeCarrier*> attributeCarriers;
253 
255  std::vector<GNENetworkElement*> networkElements;
256 
258  std::vector<GNEAdditional*> additionals;
259 
261  std::vector<GNEShape*> shapes;
262 
264  std::vector<GNETAZElement*> TAZElements;
265 
267  std::vector<GNEDemandElement*> demandElements;
268 
270  std::vector<GNEGenericData*> genericDatas;
271 
273  std::vector<GNEJunction*> junctions;
274 
276  std::vector<GNEEdge*> edges;
277 
279  std::vector<GNELane*> lanes;
280 
282  std::vector<GNECrossing*> crossings;
283 
285  std::vector<GNEConnection*> connections;
286 
288  std::vector<GNEInternalLane*> internalLanes;
289 
291  std::vector<GNETAZ*> TAZs;
292 
294  std::vector<GNEPOI*> POIs;
295 
297  std::vector<GNEPoly*> polys;
298 
300  std::vector<GNEEdgeData*> edgeDatas;
301 
303  std::vector<GNEEdgeRelData*> edgeRelDatas;
304 
305  private:
308 
311  };
312 
315 
318 
321 
324 
325  private:
327  void sortGUIGlObjects(const std::vector<GUIGlObject*>& GUIGlObjects);
328 
331 
334 
337 
340 
343 
346 
349 
351  void updateGUIGlObjects(ObjectsContainer& container);
352 
355 
358 
361  };
362 
365 
368 
370  void update(void* eventData);
371 
373  bool shiftKeyPressed() const;
374 
376  bool controlKeyPressed() const;
377 
379  bool altKeyPressed() const;
380 
382  bool mouseLeftButtonPressed() const;
383 
385  bool mouseRightButtonPressed() const;
386 
387  private:
389  FXEvent* myEventInfo;
390 
393 
396  };
397 
399  struct SaveElements {
400 
402  SaveElements(GNEViewNet* viewNet);
403 
406 
408  FXButton* saveAll;
409 
411  FXButton* saveNetwork;
412 
415 
418 
420  FXButton* saveDataElements;
421 
422  private:
425 
427  SaveElements(const SaveElements&) = delete;
428 
431  };
432 
434  struct EditModes {
435 
437  EditModes(GNEViewNet* viewNet, const bool newNet);
438 
440  void buildSuperModeButtons();
441 
443  void setSupermode(Supermode supermode, const bool force);
444 
446  void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
447 
449  void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
450 
452  void setDataEditMode(DataEditMode dataMode, const bool force = false);
453 
455  bool isCurrentSupermodeNetwork() const;
456 
458  bool isCurrentSupermodeDemand() const;
459 
461  bool isCurrentSupermodeData() const;
462 
465 
468 
471 
474 
477 
480 
483 
484  private:
487 
489  EditModes(const EditModes&) = delete;
490 
492  EditModes& operator=(const EditModes&) = delete;
493  };
494 
497 
499  NetworkViewOptions(GNEViewNet* viewNet);
500 
503 
506 
508  void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
509 
511  bool drawSpreadVehicles() const;
512 
514  bool showDemandElements() const;
515 
517  bool selectEdges() const;
518 
520  bool showConnections() const;
521 
523  bool showSubAdditionals() const;
524 
526  bool editingElevation() const;
527 
530 
533 
536 
539 
542 
545 
548 
551 
554 
557 
560 
563 
566 
569 
570  private:
573 
576 
579  };
580 
583 
585  DemandViewOptions(GNEViewNet* viewNet);
586 
589 
592 
594  void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
595 
597  bool drawSpreadVehicles() const;
598 
600  bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
601 
603  bool showShapes() const;
604 
606  bool showAllTrips() const;
607 
609  bool showAllPersonPlans() const;
610 
612  void lockPerson(const GNEDemandElement* person);
613 
615  void unlockPerson();
616 
618  const GNEDemandElement* getLockedPerson() const;
619 
621  bool showAllContainerPlans() const;
622 
624  void lockContainer(const GNEDemandElement* container);
625 
627  void unlockContainer();
628 
630  bool showOverlappedRoutes() const;
631 
633  const GNEDemandElement* getLockedContainer() const;
634 
637 
640 
643 
646 
649 
652 
655 
658 
661 
664 
665  private:
668 
671 
674 
677 
680  };
681 
684 
686  DataViewOptions(GNEViewNet* viewNet);
687 
690 
693 
695  void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
696 
698  bool showAdditionals() const;
699 
701  bool showShapes() const;
702 
704  bool showDemandElements() const;
705 
707  bool TAZRelDrawing() const;
708 
710  bool TAZDrawFill() const;
711 
713  bool TAZRelOnlyFrom() const;
714 
716  bool TAZRelOnlyTo() const;
717 
720 
723 
726 
729 
732 
735 
738 
739  private:
742 
745 
748  };
749 
751  class IntervalBar {
752 
753  public:
755  IntervalBar(GNEViewNet* viewNet);
756 
759 
761  void enableIntervalBar();
762 
764  void disableIntervalBar();
765 
768 
771 
773  void showIntervalBar();
774 
776  void hideIntervalBar();
777 
779  void updateIntervalBar();
780 
783 
785  std::string getGenericDataTypeStr() const;
786 
788  std::string getDataSetStr() const;
789 
791  std::string getBeginStr() const;
792 
794  std::string getEndStr() const;
795 
797  std::string getAttributeStr() const;
798 
800 
803 
805  void setGenericDataType();
806 
808  void setDataSet();
809 
811  void setInterval();
812 
814  void setBegin();
815 
817  void setEnd();
818 
820  void setAttribute();
821 
823 
824  private:
827 
830 
833 
835  FXComboBox* myDataSetsComboBox;
836 
839 
841  FXTextField* myBeginTextField;
842 
844  FXTextField* myEndTextField;
845 
848 
850  std::set<std::string> myFilteredAttributes;
851 
853  const FXString myNoGenericDatas;
854 
856  const FXString myAllGenericDatas;
857 
859  const FXString myNoDataSets;
860 
862  const FXString myAllDataSets;
863 
865  const FXString myAllAttributes;
866 
867  private:
870 
872  IntervalBar(const IntervalBar&) = delete;
873 
875  IntervalBar& operator=(const IntervalBar&) = delete;
876  };
877 
880 
883 
886 
889 
892 
894  void moveSingleElement(const bool mouseLeftButtonPressed);
895 
898 
899  protected:
901  const GNEMoveOffset calculateMoveOffset() const;
902 
903  private:
906 
909 
911  std::vector<GNEMoveOperation*> myMoveOperations;
912  };
913 
916 
919 
921  void beginMoveSelection();
922 
924  void moveSelection(const bool mouseLeftButtonPressed);
925 
927  void finishMoveSelection();
928 
930  bool isMovingSelection() const;
931 
933  bool isMovingSelectedEdge() const;
934 
937 
939  double getEdgeOffset() const;
940 
941  protected:
943  const GNEMoveOffset calculateMoveOffset() const;
944 
947 
949  void calculateEdgeSelection(const GNEEdge* clickedEdge);
950 
951  private:
954 
957 
960 
962  double myEdgeOffset;
963 
965  std::vector<GNEMoveOperation*> myMoveOperations;
966  };
967 
969  struct VehicleOptions {
970 
972  VehicleOptions(GNEViewNet* viewNet);
973 
976 
979 
980  private:
983  };
984 
987 
989  VehicleTypeOptions(GNEViewNet* viewNet);
990 
993 
996 
997  private:
1000  };
1001 
1004  struct SelectingArea {
1005 
1007  SelectingArea(GNEViewNet* viewNet);
1008 
1010  void beginRectangleSelection();
1011 
1013  void moveRectangleSelection();
1014 
1016  void finishRectangleSelection();
1017 
1020 
1022  std::vector<GNEEdge*> processEdgeRectangleSelection();
1023 
1025  void processShapeSelection(const PositionVector& shape);
1026 
1028  void drawRectangleSelection(const RGBColor& color) const;
1029 
1032 
1035 
1036  private:
1038  void processBoundarySelection(const Boundary& boundary);
1039 
1042 
1045 
1048  };
1049 
1051  struct TestingMode {
1052 
1054  TestingMode(GNEViewNet* viewNet);
1055 
1057  void initTestingMode();
1058 
1060  void drawTestingElements(GUIMainWindow* mainWindow);
1061 
1063  bool isTestingEnabled() const;
1064 
1065  private:
1068 
1071 
1074 
1077  };
1078 
1081 
1084 
1087 
1090 
1093 
1096 
1099 
1102 
1105 
1108 
1109  private:
1112  };
1113 
1116 
1119 
1122 
1125 
1128 
1131 
1134 
1137 
1140 
1143 
1146 
1149 
1152 
1155 
1158 
1161 
1162  private:
1165  };
1166 
1169 
1172 
1175 
1178 
1181 
1184 
1187 
1190 
1193 
1196 
1199 
1202 
1205 
1208 
1211 
1214 
1215  private:
1218  };
1219 
1222 
1224  DataCheckableButtons(GNEViewNet* viewNet);
1225 
1228 
1230  void showDataCheckableButtons();
1231 
1233  void hideDataCheckableButtons();
1234 
1237 
1240 
1243 
1246 
1249 
1250  private:
1253  };
1254 
1257 
1260 
1262  void startEditCustomShape(GNENetworkElement* element);
1263 
1265  void stopEditCustomShape();
1266 
1268  void commitEditedShape();
1269 
1272 
1273  private:
1276 
1279 
1282 
1283  };
1284 
1286  struct LockIcon {
1288  static void drawLockIcon(const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position viewPosition,
1289  const double exaggeration, const double size = 0.5,
1290  const double offsetx = 0, const double offsety = 0);
1291 
1293  static bool checkDrawing(const GNEAttributeCarrier* AC, GUIGlObjectType type, const double exaggeration);
1294 
1295  private:
1297  LockIcon();
1298 
1300  LockIcon& operator=(const LockIcon& other) = delete;
1301  };
1302 
1304  class LockManager {
1305 
1306  public:
1308  LockManager(GNEViewNet* viewNet);
1309 
1311  ~LockManager();
1312 
1314  bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;
1315 
1317  void updateFlags();
1318 
1320  void updateLockMenuBar();
1321 
1322  private:
1325 
1326  public:
1328  OperationLocked();
1329 
1331  OperationLocked(Supermode supermode);
1332 
1334  ~OperationLocked();
1335 
1337  Supermode getSupermode() const;
1338 
1340  bool lock = false;
1341 
1342  private:
1345  };
1346 
1349 
1351  std::map<GUIGlObjectType, OperationLocked> myLockedElements;
1352  };
1353 
1355  static const std::vector<RGBColor>& getRainbowScaledColors();
1356 
1358  static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1359 
1360 private:
1362  static std::vector<RGBColor> myRainbowScaledColors;
1363 };
DataEditMode
@brie enum for data edit modes
@ 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_DELETE
mode for deleting network elements
@ NETWORK_MOVE
mode for moving network elements
@ 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_POLYGON
Mode for editing Polygons.
@ NETWORK_SELECT
mode for selecting network elements
@ NETWORK_INSPECT
mode for inspecting network elements
@ NETWORK_PROHIBITION
Mode for editing connection prohibitions.
@ NETWORK_NONE
empty Network mode
@ NETWORK_CONNECT
mode for connecting lanes
DemandEditMode
@brie enum for demand edit modes
@ DEMAND_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_NONE
empty Demand mode
@ DEMAND_PERSON
Mode for editing person.
@ 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.
unsigned int GUIGlID
Definition: GUIGlObject.h:40
GUIGlObjectType
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:39
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:42
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEEdgeData.h:38
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
An Element which don't belongs to GNENet but has influency in the simulation.
An Element which don't belongs to GNENet but has influency 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
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNETAZElement.h:45
Definition: GNETAZ.h:34
class used to group all variables related to interval bar
std::string getAttributeStr() const
set attribute
IntervalBar(const IntervalBar &)=delete
Invalidated copy constructor.
void enableIntervalBarUpdate()
enable interval bar update
const FXString myNoGenericDatas
string with wildcard for no generic datas
std::string getDataSetStr() const
get dataSet
FXTextField * myEndTextField
text field for interval end
std::string getBeginStr() const
get begin
void hideIntervalBar()
hide all options menu checks
void setGenericDataType()
set generic data type
GNEViewNet * myViewNet
pointer to net
const FXString myAllGenericDatas
string with wildcard for all generic datas
void showIntervalBar()
show interval option bar
void disableIntervalBar()
disable interval bar
FXTextField * myBeginTextField
text field for interval begin
FXComboBox * myDataSetsComboBox
combo box for data sets
void updateIntervalBar()
update interval bar
void updateComboBoxAttributes()
update combo box attributes
FXComboBox * myFilteredAttributesComboBox
combo box for filtered attributes
void disableIntervalBarUpdate()
enable interval bar update
const FXString myNoDataSets
string with wildcard for no dataSets
void buildIntervalBarElements()
build interval bar elements
std::set< std::string > myFilteredAttributes
set for attribuets
bool myIntervalBarUpdate
flag to enable or disable update interval bar
std::string getGenericDataTypeStr() const
get generic data type
FXCheckButton * myLimitByIntervalCheckBox
checkbox for limit data elements by interval
IntervalBar(GNEViewNet *viewNet)
default constructor
std::string getEndStr() const
get end
const FXString myAllAttributes
string with wildcard for all attributes
void enableIntervalBar()
enable interval bar
const FXString myAllDataSets
string with wildcard for all dataSets
void setInterval()
update limit by interval
IntervalBar & operator=(const IntervalBar &)=delete
Invalidated assignment operator.
FXComboBox * myGenericDataTypesComboBox
combo box for generic data types
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< GNEEdgeRelData * > edgeRelDatas
vector with the clicked edge relation datas
std::vector< GNENetworkElement * > networkElements
vector with the clicked network elements
std::vector< GNEEdge * > edges
vector with the clicked edges
std::vector< GNEGenericData * > genericDatas
vector with the clicked generic datas
std::vector< GNEJunction * > junctions
vector with the clicked junctions
std::vector< GNEConnection * > connections
vector with the clicked connections
std::vector< GNEEdgeData * > edgeDatas
vector with the clicked edge datas
std::vector< GNECrossing * > crossings
vector with the clicked crossings
std::vector< GNEPOI * > POIs
vector with the clicked POIs
std::vector< GNETAZElement * > TAZElements
vector with the clicked TAZ elements
ObjectsContainer(const ObjectsContainer &)=delete
Invalidated copy constructor.
std::vector< GNEDemandElement * > demandElements
vector with the clicked demand elements
std::vector< GNEAttributeCarrier * > attributeCarriers
vector with the clicked attribute carriers
std::vector< GNEPoly * > polys
vector with the clicked polys
std::vector< GNELane * > lanes
vector with the clicked lanes
ObjectsContainer & operator=(const ObjectsContainer &)=delete
Invalidated assignment operator.
std::vector< GNEInternalLane * > internalLanes
vector with the clicked internal lanes
std::vector< GNETAZ * > TAZs
vector with the clicked TAZ elements
std::vector< GNEAdditional * > additionals
vector with the clicked additional elements
std::vector< GUIGlObject * > GUIGlObjects
vector with the clicked GUIGlObjects
std::vector< GNEShape * > shapes
vector with the clicked shape elements (Poly and POIs)
class used to group all variables related with objects under cursor after a click over view
GNEPoly * getPolyFront() const
get front Poly or a pointer to nullptr
void updateObjectUnderCursor(const std::vector< GUIGlObject * > &GUIGlObjects)
update objects under cursor (Called only in onLeftBtnPress(...) function)
void updateNetworkElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update network elements
void sortGUIGlObjects(const std::vector< GUIGlObject * > &GUIGlObjects)
sort by altitude and update GUIGlObjects
bool mySwapLane2edge
flag to enable/disable swap lane to edge
GUIGlID getGlIDFront() const
get front GUI GL ID or a pointer to nullptr
void updateAdditionalElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update additional elements
GNEGenericData * getGenericDataElementFront() const
get generic data element or a pointer to nullptr
const GNEViewNet * myViewNet
pointer to viewNet
GNENetworkElement * getNetworkElementFront() const
get front network element or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNEInternalLane * getInternalLaneFront() const
get front internal lane or a pointer to nullptr
GNECrossing * getCrossingFront() const
get front crossing or a pointer to nullptr
void updateShapeElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update shape elements
void updateTAZElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update TAZ elements
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNETAZElement * getTAZElementFront() const
get front TAZElement or a pointer to nullptr
void updateGenericDataElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update generic data elements
void updateGUIGlObjects(ObjectsContainer &container)
updateGUIGlObjects
GNEEdgeData * getEdgeDataElementFront() const
get edge data element or a pointer to nullptr
void updateDemandElements(ObjectsContainer &container, GNEAttributeCarrier *AC)
update demand elements
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type or a pointer to nullptr
ObjectsContainer myEdgeObjects
objectContainer for objects selecting edges
GNEJunction * getJunctionFront() const
get front junction or a pointer to nullptr
GNEDemandElement * getDemandElementFront() const
get front demand element or a pointer to nullptr
const std::vector< GNELane * > & getLanes() const
get lanes
ObjectsContainer myLaneObjects
objectContainer for objects selecting lanes
void updateAttributeCarriers(ObjectsContainer &container, GNEAttributeCarrier *AC)
update attribute carrier elements
GNEShape * getShapeFront() const
get front shape element or a pointer to nullptr
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
ObjectsUnderCursor & operator=(const ObjectsUnderCursor &)=delete
Invalidated assignment operator.
GUIGlObject * getGUIGlObjectFront() const
get front attribute carrier or a pointer to nullptr
GNETAZ * getTAZFront() const
get front TAZ or a pointer to nullptr
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
GNEEdgeRelData * getEdgeRelDataElementFront() const
get edge rel data element or a pointer to nullptr
GNEConnection * getConnectionFront() const
get front connection or a pointer to nullptr
GNEPOI * getPOIFront() const
get front POI or a pointer to nullptr
ObjectsUnderCursor(const ObjectsUnderCursor &)=delete
Invalidated copy constructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
A list of positions.
struct used to group all variables related with common chekable 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
chekable button for edit mode select
void hideCommonCheckableButtons()
hide all Common Checkable Buttons
MFXCheckableButton * inspectButton
chekable button for edit mode inspect
void showCommonCheckableButtons()
show all Common Checkable Buttons
MFXCheckableButton * deleteButton
chekable 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
chekable button for edit mode "edgeData"
MFXCheckableButton * edgeRelDataButton
chekable button for edit mode "edgeRelData"
DataCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * TAZRelDataButton
chekable button for edit mode "TAZRelData"
struct used to group all variables related to view options in supermode Data
DataViewOptions(GNEViewNet *viewNet)
default constructor
bool TAZRelOnlyTo() const
check if toogle TAZRel only to checkbox is enabled
void hideDataViewOptionsMenuChecks()
hide all options menu checks
bool showAdditionals() const
check if additionals has to be drawn
bool showDemandElements() const
check if show demand elements checkbox is enabled
bool TAZRelOnlyFrom() const
check if toogle TAZRel only from checkbox is enabled
MFXCheckableButton * menuCheckShowAdditionals
menu check to show Additionals
bool TAZDrawFill() const
check if toogle TAZ draw fill checkbox is enabled
MFXCheckableButton * menuCheckShowShapes
menu check to show Shapes
DataViewOptions & operator=(const DataViewOptions &)=delete
Invalidated assignment operator.
GNEViewNet * myViewNet
pointer to net
void buildDataViewOptionsMenuChecks()
build menu checks
void getVisibleDataMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible demand menu commands
MFXCheckableButton * menuCheckToogleTAZRelOnlyTo
menu check to toogle TAZRel only to
MFXCheckableButton * menuCheckShowDemandElements
menu check to show Demand Elements
bool showShapes() const
check if shapes has to be drawn
MFXCheckableButton * menuCheckToogleTAZRelOnlyFrom
menu check to toogle TAZRel only from
DataViewOptions(const DataViewOptions &)=delete
Invalidated copy constructor.
MFXCheckableButton * menuCheckToogleTAZDrawFill
menu check to toogle TAZ draw fill
bool TAZRelDrawing() const
check if toogle TAZRel drawing checkbox is enabled
MFXCheckableButton * menuCheckToogleTAZRelDrawing
menu check to toogle TAZ Rel drawing
struct used to group all variables related with Demand checkable Buttons
MFXCheckableButton * containerButton
chekable button for edit mode create containers
void hideDemandCheckableButtons()
hide all Demand Checkable Buttons
MFXCheckableButton * moveDemandElementsButton
chekable button for edit mode "move demand elements"
MFXCheckableButton * typeButton
chekable button for edit mode create type
DemandCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildDemandCheckableButtons()
build checkable buttons
MFXCheckableButton * vehicleButton
chekable button for edit mode create vehicles
MFXCheckableButton * containerPlanButton
chekable button for edit mode create container plans
MFXCheckableButton * routeButton
chekable button for edit mode create routes
void showDemandCheckableButtons()
show all Demand Checkable Buttons
MFXCheckableButton * stopButton
chekable button for edit mode create stops
MFXCheckableButton * personPlanButton
chekable button for edit mode create person plans
MFXCheckableButton * personButton
chekable button for edit mode create persons
void updateDemandCheckableButtons()
update Demand checkable buttons
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
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
DemandEditMode demandEditMode
the current Demand edit mode
Supermode currentSupermode
the current supermode
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
chekable button for supermode Data
EditModes(GNEViewNet *viewNet, const bool newNet)
default constructor
bool isCurrentSupermodeData() const
@check if current supermode is Data
EditModes(const EditModes &)=delete
Invalidated copy constructor.
GNEViewNet * myViewNet
pointer to net
bool isCurrentSupermodeNetwork() const
@check if current supermode is Network
MFXCheckableButton * networkButton
chekable button for supermode Network
void setSupermode(Supermode supermode, const bool force)
set supermode
MFXCheckableButton * demandButton
chekable button for supermode Demand
void setNetworkEditMode(NetworkEditMode networkMode, const bool force=false)
set Network edit mode
void setDataEditMode(DataEditMode dataMode, const bool force=false)
set Data edit mode
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
LockIcon & operator=(const LockIcon &other)=delete
Invalidated assignment operator.
static void drawLockIcon(const GNEAttributeCarrier *AC, GUIGlObjectType type, const Position viewPosition, const double exaggeration, const double size=0.5, const double offsetx=0, const double offsety=0)
draw lock icon
static bool checkDrawing(const GNEAttributeCarrier *AC, GUIGlObjectType type, const double exaggeration)
check if icon can be drawn
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 calculateJunctionSelection()
calculate junction selection
bool myMovingSelectedEdge
flag for enable moving edge
MoveMultipleElementValues(GNEViewNet *viewNet)
constructor
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
const GNEMoveOffset calculateMoveOffset() const
calculate move offset
void moveSelection(const bool mouseLeftButtonPressed)
move selection
bool isMovingSelection() const
check if currently there is element being moved
bool isMovingSelectedEdge() const
flag for moving edge
std::vector< GNEMoveOperation * > myMoveOperations
move operations
void finishMoveSelection()
finish moving selection
void calculateEdgeSelection(const GNEEdge *clickedEdge)
calculate edge selection
void resetMovingSelectedEdge()
reset flag for moving edge
struct used to group all variables related with movement of single elements
void finishMoveSingleElement()
finish moving single elements in Network AND Demand mode
void moveSingleElement(const bool mouseLeftButtonPressed)
move single element in Network AND Demand mode
MoveSingleElementValues(GNEViewNet *viewNet)
constructor
bool beginMoveSingleElementNetworkMode()
begin move single element in Network mode
bool beginMoveNetworkElementShape()
begin move network elementshape
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
const GNEMoveOffset calculateMoveOffset() const
calculate offset
std::vector< GNEMoveOperation * > myMoveOperations
move operations
Position myRelativeClickedPosition
relative position of Clicked Position regarding to originalGeometryPointPosition (Used when user does...
struct used to group all variables related with Network chekable Buttons
void updateNetworkCheckableButtons()
update network checkable buttons
MFXCheckableButton * trafficLightButton
chekable button for edit mode traffic light
MFXCheckableButton * moveNetworkElementsButton
chekable button for edit mode "move network elements"
void showNetworkCheckableButtons()
show all Network Checkable Buttons
MFXCheckableButton * additionalButton
chekable button for edit mode additional
MFXCheckableButton * crossingButton
chekable button for edit mode crossing
MFXCheckableButton * createEdgeButton
chekable button for edit mode create edge
MFXCheckableButton * prohibitionButton
checkable button for edit mode polygon
void buildNetworkCheckableButtons()
build checkable buttons
NetworkCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * shapeButton
chekable button for edit mode shape
MFXCheckableButton * connectionButton
chekable button for edit mode connection
void hideNetworkCheckableButtons()
hide all Network Checkable Buttons
MFXCheckableButton * TAZButton
chekable button for edit mode TAZ
void disableNetworkCheckableButtons()
hide all options menu checks
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.
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 * 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 buuble in "Move" mode.
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
GNEViewNet * myViewNet
pointer to net
SaveElements(GNEViewNet *viewNet)
default constructor
SaveElements & operator=(const SaveElements &)=delete
Invalidated assignment operator.
SaveElements(const SaveElements &)=delete
Invalidated copy constructor.
FXButton * saveNetwork
chekable button for save network
FXButton * saveAll
chekable button for save all
FXButton * saveAdditionalElements
chekable button for save additional elements
FXButton * saveDataElements
chekable button for save data elements
FXButton * saveDemandElements
chekable button for save demand elements
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
firstcorner 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.
void processShapeSelection(const PositionVector &shape)
process shape 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
bool isTestingEnabled() const
check if testing mode is enabled
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.
bool myTestingEnabled
flag to enable or disable testing mode
TestingMode(GNEViewNet *viewNet)
default constructor
void initTestingMode()
init testing mode
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 const std::vector< RGBColor > & getRainbowScaledColors()
get scaled rainbow colors