Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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-2023 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
28
29#include "GNEMoveElement.h"
30// ===========================================================================
31// enum
32// ===========================================================================
33
35enum class Supermode {
37 NETWORK,
39 DEMAND,
41 DATA
42};
43
75
107
127
128// ===========================================================================
129// class declarations
130// ===========================================================================
131
132// main elements
134class GNEViewNet;
135// network elements
137class GNEJunction;
138class GNEEdge;
139class GNELane;
140class GNEConnection;
141class GNECrossing;
142class GNEWalkingArea;
143class GNEInternalLane;
144// additional elements
145class GNEAdditional;
146class GNEPoly;
147class GNEPOI;
148class GNETAZ;
149// demand elements
150class GNEDemandElement;
151// data elements
152class GNEDataSet;
153class GNEGenericData;
154class GNEEdgeData;
155class GNEEdgeRelData;
156
157// ===========================================================================
158// classes and structs definitions
159// ===========================================================================
160
162
165
166 public:
168 LockManager(GNEViewNet* viewNet);
169
171 ~LockManager();
172
174 bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;
175
177 void updateFlags();
178
180 void updateLockMenuBar();
181
182 private:
185
186 public:
189
191 OperationLocked(Supermode supermode);
192
195
197 Supermode getSupermode() const;
198
200 bool lock = false;
201
202 private:
205 };
206
209
211 std::map<GUIGlObjectType, OperationLocked> myLockedElements;
212 };
213
216
217 public:
220
222 void updateObjectUnderCursor(const std::vector<GUIGlObject*>& GUIGlObjects);
223
225 void swapLane2Edge();
226
228 void filterLockedElements(const GNEViewNetHelper::LockManager& lockManager, std::vector<GUIGlObjectType> forcedIgnoredTiped = {});
229
231 void shortDataElements();
232
234 GUIGlID getGlIDFront() const;
235
238
241
244
247
250
253
256
259
261 GNEEdge* getEdgeFront() const;
262
264 GNELane* getLaneFront() const;
265
268
270 const std::vector<GNELane*>& getLanes() const;
271
274
277
280
283
285 GNETAZ* getTAZFront() const;
286
288 GNEPOI* getPOIFront() const;
289
291 GNEPoly* getPolyFront() const;
292
295
298
300 const std::vector<GUIGlObject*>& getClickedGLObjects() const;
301
303 const std::vector<GNEAttributeCarrier*>& getClickedAttributeCarriers() const;
304
306 const std::vector<GNEJunction*>& getClickedJunctions() const;
307
309 const std::vector<GNEDemandElement*>& getClickedDemandElements() const;
310
311 protected:
314
315 public:
318
320 void clearElements();
321
323 std::vector<GUIGlObject*> GUIGlObjects;
324
326 std::vector<GNEAttributeCarrier*> attributeCarriers;
327
329 std::vector<GNENetworkElement*> networkElements;
330
332 std::vector<GNEAdditional*> additionals;
333
335 std::vector<GNEDemandElement*> demandElements;
336
338 std::vector<GNEGenericData*> genericDatas;
339
341 std::vector<GNEJunction*> junctions;
342
344 std::vector<GNEEdge*> edges;
345
347 std::vector<GNELane*> lanes;
348
350 std::vector<GNECrossing*> crossings;
351
353 std::vector<GNEWalkingArea*> walkingAreas;
354
356 std::vector<GNEConnection*> connections;
357
359 std::vector<GNEInternalLane*> internalLanes;
360
362 std::vector<GNETAZ*> TAZs;
363
365 std::vector<GNEPOI*> POIs;
366
368 std::vector<GNEPoly*> polys;
369
371 std::vector<GNEEdgeData*> edgeDatas;
372
374 std::vector<GNEEdgeRelData*> edgeRelDatas;
375
376 private:
379
382 };
383
386
389
392
395
396 private:
398 std::vector<GUIGlObject*> filterDuplicatedObjects(const std::vector<GUIGlObject*>& GUIGlObjects) const;
399
401 void sortGUIGlObjects(const std::vector<GUIGlObject*>& GUIGlObjects);
402
405
408
411
414
417
420
423
425 void updateGUIGlObjects(ObjectsContainer& container);
426
428 void processGUIGlObjects();
429
432
435
438 };
439
442
445
447 void update(void* eventData);
448
450 bool shiftKeyPressed() const;
451
453 bool controlKeyPressed() const;
454
456 bool altKeyPressed() const;
457
459 bool mouseLeftButtonPressed() const;
460
462 bool mouseRightButtonPressed() const;
463
464 private:
466 FXEvent* myEventInfo;
467
470
473 };
474
527
529 struct EditModes {
530
532 EditModes(GNEViewNet* viewNet);
533
536
538 void setSupermode(Supermode supermode, const bool force);
539
541 void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
542
544 void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
545
547 void setDataEditMode(DataEditMode dataMode, const bool force = false);
548
550 bool isCurrentSupermodeNetwork() const;
551
553 bool isCurrentSupermodeDemand() const;
554
556 bool isCurrentSupermodeData() const;
557
560
563
566
569
572
575
578
579 private:
582
584 EditModes(const EditModes&) = delete;
585
587 EditModes& operator=(const EditModes&) = delete;
588 };
589
592
595
598
601
603 void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
604
606 bool drawSpreadVehicles() const;
607
609 bool showDemandElements() const;
610
612 bool selectEdges() const;
613
615 bool showConnections() const;
616
618 bool showSubAdditionals() const;
619
621 bool showTAZElements() const;
622
624 bool editingElevation() const;
625
628
631
634
637
640
643
646
649
652
655
658
661
664
667
670
673
674 private:
677
680
683 };
684
687
690
693
696
698 void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
699
701 bool drawSpreadVehicles() const;
702
704 bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
705
707 bool showShapes() const;
708
710 bool showAllTrips() const;
711
713 bool showAllPersonPlans() const;
714
716 void lockPerson(const GNEDemandElement* person);
717
719 void unlockPerson();
720
722 const GNEDemandElement* getLockedPerson() const;
723
725 bool showAllContainerPlans() const;
726
728 void lockContainer(const GNEDemandElement* container);
729
731 void unlockContainer();
732
734 bool showOverlappedRoutes() const;
735
738
741
744
747
750
753
756
759
762
765
768
771
772 private:
775
778
781
784
787 };
788
859
862
863 public:
865 IntervalBar(GNEViewNet* viewNet);
866
869
871 void showIntervalBar();
872
874 void hideIntervalBar();
875
877 void updateIntervalBar();
878
879 // @brief mark for update
880 void markForUpdate();
881
884
887
889 GNEDataSet* getDataSet() const;
890
892 double getBegin() const;
893
895 double getEnd() const;
896
898 std::string getParameter() const;
899
901
904
906 void setGenericDataType();
907
909 void setDataSet();
910
912 void setInterval();
913
915 void setBegin();
916
918 void setEnd();
919
921 void setParameter();
922
924
925 protected:
927 void enableIntervalBar();
928
930 void disableIntervalBar();
931
932 private:
935
938
941
944
946 FXCheckButton* myIntervalCheckBox;
947
949 FXTextField* myBeginTextField;
950
952 FXTextField* myEndTextField;
953
956
958 std::vector<std::string> myDataSets;
959
961 std::set<std::string> myParameters;
962
963 private:
965 IntervalBar(const IntervalBar&) = delete;
966
969 };
970
973
976
979
982
985
987 void moveSingleElement(const bool mouseLeftButtonPressed);
988
991
992 protected:
995
996 private:
999
1002
1004 std::vector<GNEMoveOperation*> myMoveOperations;
1005 };
1006
1009
1012
1014 void beginMoveSelection();
1015
1017 void moveSelection(const bool mouseLeftButtonPressed);
1018
1020 void finishMoveSelection();
1021
1023 bool isMovingSelection() const;
1024
1026 bool isMovingSelectedEdge() const;
1027
1030
1032 double getEdgeOffset() const;
1033
1034 protected:
1036 const GNEMoveOffset calculateMoveOffset() const;
1037
1040
1042 void calculateEdgeSelection(const GNEEdge* clickedEdge);
1043
1044 private:
1047
1050
1053
1056
1058 std::vector<GNEMoveOperation*> myMoveOperations;
1059 };
1060
1063
1065 VehicleOptions(GNEViewNet* viewNet);
1066
1069
1072
1073 private:
1076 };
1077
1080
1083
1086
1089
1090 private:
1093 };
1094
1098
1100 SelectingArea(GNEViewNet* viewNet);
1101
1104
1107
1110
1113
1115 std::vector<GNEEdge*> processEdgeRectangleSelection();
1116
1118 void processShapeSelection(const PositionVector& shape);
1119
1121 void drawRectangleSelection(const RGBColor& color) const;
1122
1125
1128
1129 private:
1131 void processBoundarySelection(const Boundary& boundary);
1132
1135
1138
1141 };
1142
1145
1147 TestingMode(GNEViewNet* viewNet);
1148
1150 void initTestingMode();
1151
1153 void drawTestingElements(GUIMainWindow* mainWindow);
1154
1155 private:
1158
1161
1164 };
1165
1200
1256
1312
1350
1380
1382 struct LockIcon {
1384 static void drawLockIcon(const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position viewPosition,
1385 const double exaggeration, const double size = 0.5,
1386 const double offsetx = 0, const double offsety = 0);
1387
1389 static bool checkDrawing(const GNEAttributeCarrier* AC, GUIGlObjectType type, const double exaggeration);
1390
1391 private:
1393 LockIcon();
1394
1396 LockIcon& operator=(const LockIcon& other) = delete;
1397 };
1398
1400 static const std::vector<RGBColor>& getRainbowScaledColors();
1401
1403 static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1404
1406 static std::vector<GUIGlObject*> filterElementsByLayer(const std::vector<GUIGlObject*>& GLObjects);
1407
1408private:
1410 static std::vector<RGBColor> myRainbowScaledColors;
1411};
DataEditMode
@brie 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
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_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.
unsigned int GUIGlID
Definition GUIGlObject.h:43
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.
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.
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
class used to group all variables related to interval bar
IntervalBar(const IntervalBar &)=delete
Invalidated copy constructor.
FXCheckButton * myIntervalCheckBox
checkbox for limit data elements by interval
IntervalBar & operator=(const IntervalBar &)=delete
Invalidated assignment operator.
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
FXComboBox * myDataSetsComboBox
combo box for data sets
void updateIntervalBar()
update interval bar
bool myUpdateInterval
flag for update interval bar
void buildIntervalBarElements()
build interval bar elements
GNEDataSet * getDataSet() const
get dataSet
std::vector< std::string > myDataSets
current dataSets
FXComboBox * myParametersComboBox
combo box for filtered parameters
void enableIntervalBar()
enable interval bar
void setInterval()
update limit by interval
FXComboBox * myGenericDataTypesComboBox
combo box for generic data types
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
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< GNEWalkingArea * > walkingAreas
vector with the clicked walkingAreas
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
ObjectsContainer(const ObjectsContainer &)=delete
Invalidated copy constructor.
std::vector< GNEDemandElement * > demandElements
vector with the clicked demand elements
ObjectsContainer & operator=(const ObjectsContainer &)=delete
Invalidated assignment operator.
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
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
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
const std::vector< GUIGlObject * > & getClickedGLObjects() const
get vector with clicked GL objects
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
const std::vector< GNEDemandElement * > & getClickedDemandElements() const
get vector with clicked Demand Elements
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
void processGUIGlObjects()
process GL objects
GNEDemandElement * getDemandElementFront() const
get front demand element or a pointer to nullptr
const std::vector< GNELane * > & getLanes() const
get lanes
void shortDataElements()
short data elements by begin
void filterLockedElements(const GNEViewNetHelper::LockManager &lockManager, std::vector< GUIGlObjectType > forcedIgnoredTiped={})
filter locked elements
ObjectsContainer myLaneObjects
objectContainer for objects selecting lanes
void updateAttributeCarriers(ObjectsContainer &container, GNEAttributeCarrier *AC)
update attribute carrier elements
std::vector< GUIGlObject * > filterDuplicatedObjects(const std::vector< GUIGlObject * > &GUIGlObjects) const
filter duplicated objects
ObjectsUnderCursor & operator=(const ObjectsUnderCursor &)=delete
Invalidated assignment operator.
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
const std::vector< GNEJunction * > & getClickedJunctions() const
get vector with clicked junctions
GNEWalkingArea * getWalkingAreaFront() const
get front walkingArea or a pointer to nullptr
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
GNELane * getLaneFrontNonLocked() const
get front lane or a pointer to nullptr checking if is locked
ObjectsUnderCursor(const ObjectsUnderCursor &)=delete
Invalidated copy constructor.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
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 checkable Buttons
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
void updateDataCheckableButtons()
update Data checkable buttons
MFXCheckableButton * edgeDataButton
checkable button for edit mode "edgeData"
MFXCheckableButton * edgeRelDataButton
checkable button for edit mode "edgeRelData"
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
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
DataViewOptions & operator=(const DataViewOptions &)=delete
Invalidated assignment operator.
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
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 * 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
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 & operator=(const DemandViewOptions &)=delete
Invalidated assignment operator.
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.
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
void buildSuperModeButtons()
build checkable buttons
DemandEditMode demandEditMode
the current Demand edit mode
Supermode currentSupermode
the current supermode
EditModes & operator=(const EditModes &)=delete
Invalidated assignment operator.
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
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
checkable button for supermode Network
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
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
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
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.
bool mouseRightButtonPressed() const
check if mouse right button is pressed during current event
MouseButtonKeyPressed & operator=(const MouseButtonKeyPressed &)=delete
Invalidated assignment operator.
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
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
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 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
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
struct used to group all variables related to view options in supermode Network
MFXCheckableButton * menuCheckSelectEdges
checkable button to select only edges
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
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
NetworkViewOptions & operator=(const NetworkViewOptions &)=delete
Invalidated assignment operator.
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(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
SaveElements & operator=(const SaveElements &)=delete
Invalidated assignment operator.
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)
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.
void initTestingMode()
init testing mode
struct used to group all variables related with movement of groups of elements
void buildVehicleOptionsMenuChecks()
build menu checks
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
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