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-2020 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 
25 #include <utils/geom/Position.h>
33 
34 #include "GNEGeometry.h"
35 
36 // ===========================================================================
37 // enum
38 // ===========================================================================
39 
41 enum class Supermode {
43  NETWORK,
45  DEMAND,
47  DATA
48 };
49 
51 enum class NetworkEditMode {
78 };
79 
81 enum class DemandEditMode {
106 };
107 
109 enum class DataEditMode {
111  DATA_NONE,
113  DATA_INSPECT,
115  DATA_DELETE,
117  DATA_SELECT,
124 };
125 
126 // ===========================================================================
127 // class declarations
128 // ===========================================================================
129 
130 // main elements
131 class GNEAttributeCarrier;
132 class GNEFrame;
133 class GNENet;
134 class GNEUndoList;
135 class GNEViewNet;
136 class GNEViewParent;
137 class GNEMoveElement;
138 class GNEMoveOperation;
139 // network elements
140 class GNENetworkElement;
141 class GNEJunction;
142 class GNEEdge;
143 class GNELane;
144 class GNEConnection;
145 class GNECrossing;
146 class GNEInternalLane;
147 // additional elements
148 class GNEAdditional;
149 class GNETAZElement;
150 class GNEShape;
151 class GNEPoly;
152 class GNEPOI;
153 class GNETAZElement;
154 class GNETAZ;
155 class GNETAZSourceSink;
156 // demand elements
157 class GNEDemandElement;
158 class GNEVehicleType;
159 class GNEFlow;
160 class GNEVehicle;
161 class GNEtrip;
162 // data elements
163 class GNEDataSet;
164 class GNEDataInterval;
165 class GNEGenericData;
166 class GNEEdgeData;
167 class GNEEdgeRelData;
168 
169 // ===========================================================================
170 // classes and structs definitions
171 // ===========================================================================
172 
174 
177 
178  public:
180  ObjectsUnderCursor(GNEViewNet* viewNet);
181 
183  void updateObjectUnderCursor(const std::vector<GUIGlObject*>& GUIGlObjects);
184 
186  void swapLane2Edge();
187 
189  GUIGlID getGlIDFront() const;
190 
193 
196 
199 
202 
205 
207  GNEShape* getShapeFront() const;
208 
211 
214 
217 
219  GNEJunction* getJunctionFront() const;
220 
222  GNEEdge* getEdgeFront() const;
223 
225  GNELane* getLaneFront() const;
226 
228  GNECrossing* getCrossingFront() const;
229 
232 
235 
237  GNETAZ* getTAZFront() const;
238 
240  GNEPOI* getPOIFront() const;
241 
243  GNEPoly* getPolyFront() const;
244 
247 
250 
252  const std::vector<GNEAttributeCarrier*>& getClickedAttributeCarriers() const;
253 
254  protected:
257 
258  public:
261 
263  void clearElements();
264 
266  std::vector<GUIGlObject*> GUIGlObjects;
267 
269  std::vector<GNEAttributeCarrier*> attributeCarriers;
270 
272  std::vector<GNENetworkElement*> networkElements;
273 
275  std::vector<GNEAdditional*> additionals;
276 
278  std::vector<GNEShape*> shapes;
279 
281  std::vector<GNETAZElement*> TAZElements;
282 
284  std::vector<GNEDemandElement*> demandElements;
285 
287  std::vector<GNEGenericData*> genericDatas;
288 
290  std::vector<GNEJunction*> junctions;
291 
293  std::vector<GNEEdge*> edges;
294 
296  std::vector<GNELane*> lanes;
297 
299  std::vector<GNECrossing*> crossings;
300 
302  std::vector<GNEConnection*> connections;
303 
305  std::vector<GNEInternalLane*> internalLanes;
306 
308  std::vector<GNETAZ*> TAZs;
309 
311  std::vector<GNEPOI*> POIs;
312 
314  std::vector<GNEPoly*> polys;
315 
317  std::vector<GNEEdgeData*> edgeDatas;
318 
320  std::vector<GNEEdgeRelData*> edgeRelDatas;
321 
322  private:
325 
328  };
329 
332 
335 
338 
341 
342  private:
344  void sortGUIGlObjects(const std::vector<GUIGlObject*>& GUIGlObjects);
345 
348 
351 
354 
357 
360 
363 
366 
368  void updateGUIGlObjects(ObjectsContainer& container);
369 
372 
375 
378  };
379 
382 
385 
387  void update(void* eventData);
388 
390  bool shiftKeyPressed() const;
391 
393  bool controlKeyPressed() const;
394 
396  bool altKeyPressed() const;
397 
399  bool mouseLeftButtonPressed() const;
400 
402  bool mouseRightButtonPressed() const;
403 
404  private:
406  FXEvent* myEventInfo;
407 
410 
413  };
414 
416  struct SaveElements {
417 
419  SaveElements(GNEViewNet* viewNet);
420 
423 
425  FXButton* saveNetwork;
426 
429 
432 
434  FXButton* saveDataElements;
435 
436  private:
439 
441  SaveElements(const SaveElements&) = delete;
442 
445  };
446 
448  struct EditModes {
449 
451  EditModes(GNEViewNet* viewNet);
452 
454  void buildSuperModeButtons();
455 
457  void setSupermode(Supermode supermode, const bool force);
458 
460  void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
461 
463  void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
464 
466  void setDataEditMode(DataEditMode dataMode, const bool force = false);
467 
469  bool isCurrentSupermodeNetwork() const;
470 
472  bool isCurrentSupermodeDemand() const;
473 
475  bool isCurrentSupermodeData() const;
476 
479 
482 
485 
488 
491 
494 
495  private:
498 
501 
503  EditModes(const EditModes&) = delete;
504 
506  EditModes& operator=(const EditModes&) = delete;
507  };
508 
511 
513  NetworkViewOptions(GNEViewNet* viewNet);
514 
517 
520 
522  void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
523 
525  bool drawSpreadVehicles() const;
526 
528  bool showDemandElements() const;
529 
531  bool selectEdges() const;
532 
534  bool showConnections() const;
535 
537  bool editingElevation() const;
538 
541 
544 
547 
550 
553 
556 
559 
562 
565 
568 
571 
574 
577 
578  private:
581 
584 
587  };
588 
591 
593  DemandViewOptions(GNEViewNet* viewNet);
594 
597 
600 
602  void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
603 
605  bool drawSpreadVehicles() const;
606 
608  bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
609 
611  bool showShapes() const;
612 
614  bool showAllPersonPlans() const;
615 
617  void lockPerson(const GNEDemandElement* person);
618 
620  void unlockPerson();
621 
623  const GNEDemandElement* getLockedPerson() const;
624 
627 
630 
633 
636 
639 
642 
643  private:
646 
649 
652 
655  };
656 
659 
661  DataViewOptions(GNEViewNet* viewNet);
662 
665 
668 
670  void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
671 
673  bool showAdditionals() const;
674 
676  bool showShapes() const;
677 
679  bool showDemandElements() const;
680 
683 
686 
689 
690  private:
693 
696 
699  };
700 
702  class IntervalBar {
703 
704  public:
706  IntervalBar(GNEViewNet* viewNet);
707 
710 
712  void enableIntervalBar();
713 
715  void disableIntervalBar();
716 
719 
722 
724  void showIntervalBar();
725 
727  void hideIntervalBar();
728 
730  void updateIntervalBar();
731 
734 
736  std::string getGenericDataTypeStr() const;
737 
739  std::string getDataSetStr() const;
740 
742  std::string getBeginStr() const;
743 
745  std::string getEndStr() const;
746 
748  std::string getAttributeStr() const;
749 
751 
754 
756  void setGenericDataType();
757 
759  void setDataSet();
760 
762  void setInterval();
763 
765  void setBegin();
766 
768  void setEnd();
769 
771  void setAttribute();
772 
774 
775  private:
778 
781 
784 
786  FXComboBox* myDataSetsComboBox;
787 
790 
792  FXTextField* myBeginTextField;
793 
795  FXTextField* myEndTextField;
796 
799 
801  std::set<std::string> myFilteredAttributes;
802 
804  const FXString myNoGenericDatas;
805 
807  const FXString myAllGenericDatas;
808 
810  const FXString myNoDataSets;
811 
813  const FXString myAllDataSets;
814 
816  const FXString myAllAttributes;
817 
818  private:
821 
823  IntervalBar(const IntervalBar&) = delete;
824 
826  IntervalBar& operator=(const IntervalBar&) = delete;
827  };
828 
831 
834 
837 
840 
843 
845  void moveSingleElement(const bool mouseLeftButtonPressed);
846 
849 
850  protected:
852  Position calculateOffset() const;
853 
855  bool calculateMoveOperationShape(GNEMoveElement* moveElement, const PositionVector& shape, const double radius);
856 
857  private:
860 
863 
866 
868  std::vector<GNEMoveOperation*> myMoveOperations;
869  };
870 
873 
876 
878  void beginMoveSelection();
879 
881  void moveSelection(const bool mouseLeftButtonPressed);
882 
884  void finishMoveSelection();
885 
887  bool isMovingSelection() const;
888 
889  protected:
891  Position calculateOffset() const;
892 
895 
897  void calculateEdgeSelection(const GNEEdge* clickedEdge);
898 
899  private:
902 
905 
907  std::vector<GNEMoveOperation*> myMoveOperations;
908  };
909 
911  struct VehicleOptions {
912 
914  VehicleOptions(GNEViewNet* viewNet);
915 
918 
921 
922  private:
925  };
926 
929 
931  VehicleTypeOptions(GNEViewNet* viewNet);
932 
935 
938 
939  private:
942  };
943 
946  struct SelectingArea {
947 
949  SelectingArea(GNEViewNet* viewNet);
950 
953 
955  void moveRectangleSelection();
956 
959 
962 
964  std::vector<GNEEdge*> processEdgeRectangleSelection();
965 
967  void processShapeSelection(const PositionVector& shape);
968 
970  void drawRectangleSelection(const RGBColor& color) const;
971 
974 
977 
978  private:
980  void processBoundarySelection(const Boundary& boundary);
981 
984 
987 
990  };
991 
993  struct TestingMode {
994 
996  TestingMode(GNEViewNet* viewNet);
997 
999  void initTestingMode();
1000 
1002  void drawTestingElements(GUIMainWindow* mainWindow);
1003 
1005  bool isTestingEnabled() const;
1006 
1007  private:
1010 
1013 
1016 
1019  };
1020 
1023 
1026 
1029 
1032 
1035 
1038 
1041 
1044 
1047 
1050 
1051  private:
1054  };
1055 
1058 
1061 
1064 
1067 
1070 
1073 
1076 
1079 
1082 
1085 
1088 
1091 
1094 
1097 
1100 
1103 
1104  private:
1107  };
1108 
1111 
1114 
1117 
1120 
1123 
1126 
1129 
1132 
1135 
1138 
1141 
1144 
1147 
1150 
1153 
1154  private:
1157  };
1158 
1161 
1163  DataCheckableButtons(GNEViewNet* viewNet);
1164 
1167 
1169  void showDataCheckableButtons();
1170 
1172  void hideDataCheckableButtons();
1173 
1176 
1179 
1182 
1185 
1188 
1189  private:
1192  };
1193 
1196 
1199 
1201  void startEditCustomShape(GNENetworkElement* element);
1202 
1204  void stopEditCustomShape();
1205 
1207  void commitEditedShape();
1208 
1211 
1212  private:
1215 
1218 
1221 
1222  };
1223 
1225  struct LockIcon {
1227  static void drawLockIcon(const GNEAttributeCarrier* AC, const GNEGeometry::Geometry& geometry,
1228  const double exaggeration, const double offsetx, const double offsety,
1229  const bool overlane, const double size = 0.5);
1230 
1231  private:
1233  LockIcon();
1234 
1236  static bool checkDrawing(const GNEAttributeCarrier* AC, const double exaggeration);
1237 
1239  static GUIGlID getLockIcon(const GNEAttributeCarrier* AC);
1240 
1242  LockIcon& operator=(const LockIcon& other) = delete;
1243  };
1244 
1246  static const std::vector<RGBColor>& getRainbowScaledColors();
1247 
1249  static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1250 
1251 private:
1253  static std::vector<RGBColor> myRainbowScaledColors;
1254 };
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_DELETE
mode for deleting demand elements
@ DEMAND_VEHICLETYPES
Mode for editing vehicle types.
@ DEMAND_PERSONTYPES
Mode for editing person types.
@ 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.
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:47
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNECrossing.h:41
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.
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEEdgeData.h:37
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:49
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.
class for NETEDIT geometries over lanes
Definition: GNEGeometry.h:76
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:45
move element
move operation
A NBNetBuilder extended by visualisation and editing capabilities.
Definition: GNENet.h:40
Definition: GNEPOI.h:41
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNETAZElement.h:45
Definition: GNETAZ.h:33
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
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
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 single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:81
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:36
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
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
MFXCheckableButton * menuCheckShowAdditionals
menu check to show Additionals
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 * menuCheckShowDemandElements
menu check to show Demand Elements
bool showShapes() const
check if shapes has to be drawn
DataViewOptions(const DataViewOptions &)=delete
Invalidated copy constructor.
struct used to group all variables related with Demand checkable Buttons
MFXCheckableButton * vehicleTypeButton
chekable button for edit mode create vehicle type
void hideDemandCheckableButtons()
hide all Demand Checkable Buttons
MFXCheckableButton * moveDemandElementsButton
chekable button for edit mode "move demand elements"
MFXCheckableButton * personTypeButton
chekable button for edit mode create person type
DemandCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildDemandCheckableButtons()
build checkable buttons
MFXCheckableButton * vehicleButton
chekable button for edit mode create vehicles
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
void lockPerson(const GNEDemandElement *person)
lock person
bool showAllPersonPlans() const
check all person plans has to be show
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
GNEViewNet * myViewNet
pointer to net
MFXCheckableButton * menuCheckShowGrid
menu check to show grid button
bool showShapes() const
check if shapes has to be drawn
void hideDemandViewOptionsMenuChecks()
hide all options menu checks
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person 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
void getVisibleDemandMenuCommands(std::vector< MFXCheckableButton * > &commands) const
get visible demand menu commands
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
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
Supermode myCurrentSupermode
the current supermode
MFXCheckableButton * dataButton
chekable button for supermode Data
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
EditModes(GNEViewNet *viewNet)
default constructor
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
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 void drawLockIcon(const GNEAttributeCarrier *AC, const GNEGeometry::Geometry &geometry, const double exaggeration, const double offsetx, const double offsety, const bool overlane, const double size=0.5)
draw lock icon
LockIcon & operator=(const LockIcon &other)=delete
Invalidated assignment operator.
static GUIGlID getLockIcon(const GNEAttributeCarrier *AC)
get lock icon
static bool checkDrawing(const GNEAttributeCarrier *AC, const double exaggeration)
check drawing
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
MoveMultipleElementValues(GNEViewNet *viewNet)
constructor
Position myClickedPosition
original clicked position when moveSelection is called (used for calculate offset during moveSelectio...
Position calculateOffset() const
calculate offset
void moveSelection(const bool mouseLeftButtonPressed)
move selection
bool isMovingSelection() const
check if currently there is element being moved
std::vector< GNEMoveOperation * > myMoveOperations
move operations
void finishMoveSelection()
finish moving selection
void calculateEdgeSelection(const GNEEdge *clickedEdge)
calculate edge selection
struct used to group all variables related with movement of single elements
GNEDemandElement * myDemandElementToMove
the demand element which position is being moved
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 calculateMoveOperationShape(GNEMoveElement *moveElement, const PositionVector &shape, const double radius)
calculate move operation for shape
Position calculateOffset() const
calculate offset
bool beginMoveSingleElementDemandMode()
begin move single element in Demand mode
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
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
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
void buildNetworkViewOptionsMenuChecks()
build menu checks
MFXCheckableButton * menuCheckShowGrid
checkable button to show grid button
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 * 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