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
27
28#include "GNEMoveElement.h"
29// ===========================================================================
30// enum
31// ===========================================================================
32
34enum class Supermode {
36 NETWORK,
38 DEMAND,
40 DATA
41};
42
44enum class NetworkEditMode {
73};
74
76enum class DemandEditMode {
103};
104
106enum class DataEditMode {
108 DATA_NONE,
121};
122
123// ===========================================================================
124// class declarations
125// ===========================================================================
126
127// main elements
129class GNEViewNet;
130// network elements
132class GNEJunction;
133class GNEEdge;
134class GNELane;
135class GNEConnection;
136class GNECrossing;
137class GNEWalkingArea;
138class GNEInternalLane;
139// additional elements
140class GNEAdditional;
141class GNEPoly;
142class GNEPOI;
143class GNETAZ;
144// demand elements
145class GNEDemandElement;
146// data elements
147class GNEDataSet;
148class GNEGenericData;
149class GNEEdgeData;
150class GNEEdgeRelData;
151
152// ===========================================================================
153// classes and structs definitions
154// ===========================================================================
155
157
160
161 public:
163 LockManager(GNEViewNet* viewNet);
164
166 ~LockManager();
167
169 bool isObjectLocked(GUIGlObjectType objectType, const bool selected) const;
170
172 void updateFlags();
173
175 void updateLockMenuBar();
176
177 private:
180
181 public:
184
186 OperationLocked(Supermode supermode);
187
190
192 Supermode getSupermode() const;
193
195 bool lock = false;
196
197 private:
200 };
201
204
206 std::map<GUIGlObjectType, OperationLocked> myLockedElements;
207 };
208
211
212 public:
215
217 void updateObjectUnderCursor(const std::vector<GUIGlObject*>& GUIGlObjects);
218
220 void swapLane2Edge();
221
223 void filterLockedElements(const GNEViewNetHelper::LockManager& lockManager, std::vector<GUIGlObjectType> forcedIgnoredTiped = {});
224
226 GUIGlID getGlIDFront() const;
227
230
233
236
239
242
245
248
251
253 GNEEdge* getEdgeFront() const;
254
256 GNELane* getLaneFront() const;
257
260
262 const std::vector<GNELane*>& getLanes() const;
263
266
269
272
275
277 GNETAZ* getTAZFront() const;
278
280 GNEPOI* getPOIFront() const;
281
283 GNEPoly* getPolyFront() const;
284
287
290
292 const std::vector<GUIGlObject*>& getClickedGLObjects() const;
293
295 const std::vector<GNEAttributeCarrier*>& getClickedAttributeCarriers() const;
296
298 const std::vector<GNEDemandElement*>& getClickedDemandElements() const;
299
300 protected:
303
304 public:
307
309 void clearElements();
310
312 std::vector<GUIGlObject*> GUIGlObjects;
313
315 std::vector<GNEAttributeCarrier*> attributeCarriers;
316
318 std::vector<GNENetworkElement*> networkElements;
319
321 std::vector<GNEAdditional*> additionals;
322
324 std::vector<GNEDemandElement*> demandElements;
325
327 std::vector<GNEGenericData*> genericDatas;
328
330 std::vector<GNEJunction*> junctions;
331
333 std::vector<GNEEdge*> edges;
334
336 std::vector<GNELane*> lanes;
337
339 std::vector<GNECrossing*> crossings;
340
342 std::vector<GNEWalkingArea*> walkingAreas;
343
345 std::vector<GNEConnection*> connections;
346
348 std::vector<GNEInternalLane*> internalLanes;
349
351 std::vector<GNETAZ*> TAZs;
352
354 std::vector<GNEPOI*> POIs;
355
357 std::vector<GNEPoly*> polys;
358
360 std::vector<GNEEdgeData*> edgeDatas;
361
363 std::vector<GNEEdgeRelData*> edgeRelDatas;
364
365 private:
368
371 };
372
375
378
381
384
385 private:
387 void sortGUIGlObjects(const std::vector<GUIGlObject*>& GUIGlObjects);
388
391
394
397
400
403
406
409
411 void updateGUIGlObjects(ObjectsContainer& container);
412
414 void processGUIGlObjects();
415
418
421
424 };
425
428
431
433 void update(void* eventData);
434
436 bool shiftKeyPressed() const;
437
439 bool controlKeyPressed() const;
440
442 bool altKeyPressed() const;
443
445 bool mouseLeftButtonPressed() const;
446
448 bool mouseRightButtonPressed() const;
449
450 private:
452 FXEvent* myEventInfo;
453
456
459 };
460
463
465 SaveElements(GNEViewNet* viewNet);
466
469
472
475
478
481
484
485 private:
488
490 SaveElements(const SaveElements&) = delete;
491
494 };
495
497 struct EditModes {
498
500 EditModes(GNEViewNet* viewNet, const bool newNet);
501
504
506 void setSupermode(Supermode supermode, const bool force);
507
509 void setNetworkEditMode(NetworkEditMode networkMode, const bool force = false);
510
512 void setDemandEditMode(DemandEditMode demandMode, const bool force = false);
513
515 void setDataEditMode(DataEditMode dataMode, const bool force = false);
516
518 bool isCurrentSupermodeNetwork() const;
519
521 bool isCurrentSupermodeDemand() const;
522
524 bool isCurrentSupermodeData() const;
525
528
531
534
537
540
543
546
547 private:
550
552 EditModes(const EditModes&) = delete;
553
555 EditModes& operator=(const EditModes&) = delete;
556 };
557
560
563
566
569
571 void getVisibleNetworkMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
572
574 bool drawSpreadVehicles() const;
575
577 bool showDemandElements() const;
578
580 bool selectEdges() const;
581
583 bool showConnections() const;
584
586 bool showSubAdditionals() const;
587
589 bool showTAZElements() const;
590
592 bool editingElevation() const;
593
596
599
602
605
608
611
614
617
620
623
626
629
632
635
638
641
642 private:
645
648
651 };
652
655
658
661
664
666 void getVisibleDemandMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
667
669 bool drawSpreadVehicles() const;
670
672 bool showNonInspectedDemandElements(const GNEDemandElement* demandElement) const;
673
675 bool showShapes() const;
676
678 bool showAllTrips() const;
679
681 bool showAllPersonPlans() const;
682
684 void lockPerson(const GNEDemandElement* person);
685
687 void unlockPerson();
688
690 const GNEDemandElement* getLockedPerson() const;
691
693 bool showAllContainerPlans() const;
694
696 void lockContainer(const GNEDemandElement* container);
697
699 void unlockContainer();
700
702 bool showOverlappedRoutes() const;
703
706
709
712
715
718
721
724
727
730
733
736
739
740 private:
743
746
749
752
755 };
756
759
761 DataViewOptions(GNEViewNet* viewNet);
762
765
768
770 void getVisibleDataMenuCommands(std::vector<MFXCheckableButton*>& commands) const;
771
773 bool showAdditionals() const;
774
776 bool showShapes() const;
777
779 bool showDemandElements() const;
780
782 bool TAZRelDrawing() const;
783
785 bool TAZDrawFill() const;
786
788 bool TAZRelOnlyFrom() const;
789
791 bool TAZRelOnlyTo() const;
792
795
798
801
804
807
810
813
816
817 private:
820
823
826 };
827
830
831 public:
833 IntervalBar(GNEViewNet* viewNet);
834
837
839 void showIntervalBar();
840
842 void hideIntervalBar();
843
845 void updateIntervalBar();
846
847 // @brief mark for update
848 void markForUpdate();
849
852
855
857 GNEDataSet* getDataSet() const;
858
860 double getBegin() const;
861
863 double getEnd() const;
864
866 std::string getParameter() const;
867
869
872
874 void setGenericDataType();
875
877 void setDataSet();
878
880 void setInterval();
881
883 void setBegin();
884
886 void setEnd();
887
889 void setParameter();
890
892
893 protected:
895 void enableIntervalBar();
896
898 void disableIntervalBar();
899
900 private:
903
906
909
912
914 FXCheckButton* myIntervalCheckBox;
915
917 FXTextField* myBeginTextField;
918
920 FXTextField* myEndTextField;
921
924
926 std::vector<std::string> myDataSets;
927
929 std::set<std::string> myParameters;
930
931 private:
933 IntervalBar(const IntervalBar&) = delete;
934
937 };
938
941
944
947
950
953
955 void moveSingleElement(const bool mouseLeftButtonPressed);
956
959
960 protected:
963
964 private:
967
970
972 std::vector<GNEMoveOperation*> myMoveOperations;
973 };
974
977
980
982 void beginMoveSelection();
983
985 void moveSelection(const bool mouseLeftButtonPressed);
986
988 void finishMoveSelection();
989
991 bool isMovingSelection() const;
992
994 bool isMovingSelectedEdge() const;
995
998
1000 double getEdgeOffset() const;
1001
1002 protected:
1004 const GNEMoveOffset calculateMoveOffset() const;
1005
1008
1010 void calculateEdgeSelection(const GNEEdge* clickedEdge);
1011
1012 private:
1015
1018
1021
1024
1026 std::vector<GNEMoveOperation*> myMoveOperations;
1027 };
1028
1031
1033 VehicleOptions(GNEViewNet* viewNet);
1034
1037
1040
1041 private:
1044 };
1045
1048
1051
1054
1057
1058 private:
1061 };
1062
1066
1068 SelectingArea(GNEViewNet* viewNet);
1069
1072
1075
1078
1081
1083 std::vector<GNEEdge*> processEdgeRectangleSelection();
1084
1086 void processShapeSelection(const PositionVector& shape);
1087
1089 void drawRectangleSelection(const RGBColor& color) const;
1090
1093
1096
1097 private:
1099 void processBoundarySelection(const Boundary& boundary);
1100
1103
1106
1109 };
1110
1113
1115 TestingMode(GNEViewNet* viewNet);
1116
1118 void initTestingMode();
1119
1121 void drawTestingElements(GUIMainWindow* mainWindow);
1122
1124 bool isTestingEnabled() const;
1125
1126 private:
1129
1132
1135
1138 };
1139
1142
1145
1148
1151
1154
1157
1160
1163
1166
1169
1170 private:
1173 };
1174
1177
1180
1183
1186
1189
1192
1195
1198
1201
1204
1207
1210
1213
1216
1219
1222
1225
1226 private:
1229 };
1230
1233
1236
1239
1242
1245
1248
1251
1254
1257
1260
1263
1266
1269
1272
1275
1278
1279 private:
1282 };
1283
1286
1289
1292
1295
1298
1301
1304
1307
1310
1313
1314 private:
1317 };
1318
1321
1324
1327
1329 void stopEditCustomShape();
1330
1332 void commitEditedShape();
1333
1336
1337 private:
1340
1343
1346
1347 };
1348
1350 struct LockIcon {
1352 static void drawLockIcon(const GNEAttributeCarrier* AC, GUIGlObjectType type, const Position viewPosition,
1353 const double exaggeration, const double size = 0.5,
1354 const double offsetx = 0, const double offsety = 0);
1355
1357 static bool checkDrawing(const GNEAttributeCarrier* AC, GUIGlObjectType type, const double exaggeration);
1358
1359 private:
1361 LockIcon();
1362
1364 LockIcon& operator=(const LockIcon& other) = delete;
1365 };
1366
1368 static const std::vector<RGBColor>& getRainbowScaledColors();
1369
1371 static const RGBColor& getRainbowScaledColor(const double min, const double max, const double value);
1372
1374 static std::vector<GUIGlObject*> filterElementsByLayer(const std::vector<GUIGlObject*>& GLObjects);
1375
1376private:
1378 static std::vector<RGBColor> myRainbowScaledColors;
1379};
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_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_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.
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 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:38
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:53
An Element which don't belong to GNENet but has influence in the simulation.
An Element which don't belong to GNENet but has influence in the simulation.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
move offset
Definition: GNEPOI.h:43
Definition: GNETAZ.h:34
class used to group all variables related to interval bar
IntervalBar(const IntervalBar &)=delete
Invalidated copy constructor.
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
IntervalBar(GNEViewNet *viewNet)
default constructor
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
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< 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 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
ObjectsUnderCursor & operator=(const ObjectsUnderCursor &)=delete
Invalidated assignment operator.
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
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
CommonCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildCommonCheckableButtons()
build checkable buttons
void updateCommonCheckableButtons()
update Common checkable buttons
void disableCommonCheckableButtons()
hide all options menu checks
MFXCheckableButton * selectButton
checkable button for edit mode select
void hideCommonCheckableButtons()
hide all Common Checkable Buttons
MFXCheckableButton * inspectButton
checkable button for edit mode inspect
void showCommonCheckableButtons()
show all Common Checkable Buttons
MFXCheckableButton * deleteButton
checkable button for edit mode delete
struct used to group all variables related with Data checkable Buttons
void hideDataCheckableButtons()
hide all Data Checkable Buttons
void showDataCheckableButtons()
show all Data Checkable Buttons
void disableDataCheckableButtons()
hide all options menu checks
void buildDataCheckableButtons()
build checkable buttons
GNEViewNet * myViewNet
pointer to net
void updateDataCheckableButtons()
update Data checkable buttons
MFXCheckableButton * edgeDataButton
checkable button for edit mode "edgeData"
MFXCheckableButton * edgeRelDataButton
checkable button for edit mode "edgeRelData"
DataCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * TAZRelDataButton
checkable button for edit mode "TAZRelData"
struct used to group all variables related to view options in supermode Data
DataViewOptions(GNEViewNet *viewNet)
default constructor
bool TAZRelOnlyTo() const
check if toggle TAZRel only to checkbox is enabled
void hideDataViewOptionsMenuChecks()
hide all options menu checks
bool showAdditionals() const
check if additionals has to be drawn
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
DemandCheckableButtons(GNEViewNet *viewNet)
default constructor
void buildDemandCheckableButtons()
build checkable buttons
MFXCheckableButton * vehicleButton
checkable button for edit mode create vehicles
MFXCheckableButton * containerPlanButton
checkable button for edit mode create container plans
MFXCheckableButton * routeButton
checkable button for edit mode create routes
void showDemandCheckableButtons()
show all Demand Checkable Buttons
MFXCheckableButton * stopButton
checkable button for edit mode create stops
MFXCheckableButton * personPlanButton
checkable button for edit mode create person plans
MFXCheckableButton * personButton
checkable button for edit mode create persons
void updateDemandCheckableButtons()
update Demand checkable buttons
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.
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
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
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
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
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
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
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
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 checkable Buttons
void updateNetworkCheckableButtons()
update network checkable buttons
MFXCheckableButton * trafficLightButton
checkable button for edit mode traffic light
MFXCheckableButton * moveNetworkElementsButton
checkable button for edit mode "move network elements"
void showNetworkCheckableButtons()
show all Network Checkable Buttons
MFXCheckableButton * additionalButton
checkable button for edit mode additional
MFXCheckableButton * crossingButton
checkable button for edit mode crossing
MFXCheckableButton * createEdgeButton
checkable button for edit mode create edge
MFXCheckableButton * prohibitionButton
checkable button for edit mode prohibition
void buildNetworkCheckableButtons()
build checkable buttons
NetworkCheckableButtons(GNEViewNet *viewNet)
default constructor
MFXCheckableButton * shapeButton
checkable button for edit mode shape
MFXCheckableButton * connectionButton
checkable button for edit mode connection
void hideNetworkCheckableButtons()
hide all Network Checkable Buttons
MFXCheckableButton * TAZButton
checkable button for edit mode TAZ
void disableNetworkCheckableButtons()
hide all options menu checks
MFXCheckableButton * wireButton
checkable button for edit mode wires
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
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
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
GNEViewNet * myViewNet
pointer to net
SaveElements(GNEViewNet *viewNet)
default constructor
SaveElements(const SaveElements &)=delete
Invalidated copy constructor.
MFXButtonTooltip * saveDemandElements
checkable button for save demand elements
MFXButtonTooltip * saveAll
checkable button for save all
MFXButtonTooltip * saveAdditionalElements
checkable button for save additional elements
MFXButtonTooltip * saveDataElements
checkable button for save data elements
MFXButtonTooltip * saveNetwork
checkable button for save network
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)
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 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