Eclipse SUMO - Simulation of Urban MObility
GNEShapeFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // The Widget for add polygons
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
28 
29 
30 // ===========================================================================
31 // class definitions
32 // ===========================================================================
37 class GNEShapeFrame : public GNEFrame {
38 
39 public:
40 
41  // ===========================================================================
42  // class GEOPOICreator
43  // ===========================================================================
44 
48 
49  public:
51  GEOPOICreator(GNEShapeFrame* polygonFrameParent);
52 
55 
58 
61 
65  long onCmdSetCoordinates(FXObject*, FXSelector, void*);
66 
68  long onCmdSetFormat(FXObject*, FXSelector, void*);
69 
71  long onCmdCreateGEOPOI(FXObject*, FXSelector, void*);
73 
74  protected:
75  FOX_CONSTRUCTOR(GEOPOICreator)
76 
77  private:
80 
82  FXRadioButton* myLonLatRadioButton;
83 
85  FXRadioButton* myLatLonRadioButton;
86 
88  FXTextField* myCoordinatesTextField;
89 
92 
95 
98  };
99 
104  GNEShapeFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
105 
107  ~GNEShapeFrame();
108 
110  void show();
111 
117  bool processClick(const Position& clickedPosition, const GNEViewNetHelper::ViewObjectsSelector& viewObjects, bool& updateTemporalShape);
118 
120  static std::string getIdsSelected(const FXList* list);
121 
124 
125 protected:
128 
129  // @brief create baseShapeObject
130  void createBaseShapeObject(const SumoXMLTag shapeTag);
131 
136  bool shapeDrawed();
137 
139  void tagSelected();
140 
142  void addShape();
143 
145  bool processClickPolygons(const Position& clickedPosition, bool& updateTemporalShape);
146 
148  bool processClickPOI(SumoXMLTag POITag, const Position& clickedPosition, const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
149 
151  bool processClickPOIGeo(const Position& clickedPosition, const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
152 
154  bool processClickPOILanes(const Position& clickedPosition, const GNEViewNetHelper::ViewObjectsSelector& viewObjects);
155 
156 private:
159 
162 
165 
168 
171 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
FXLabel * myLabelCartesianPosition
FXLabel for the equivalent position of GEO Position in Cartesian Position.
Definition: GNEShapeFrame.h:97
FXRadioButton * myLonLatRadioButton
radio button for the configuration lon-lat
Definition: GNEShapeFrame.h:82
GEOPOICreator(GNEShapeFrame *polygonFrameParent)
FOX-declaration.
FXTextField * myCoordinatesTextField
text field for given geo coordinates
Definition: GNEShapeFrame.h:88
long onCmdSetFormat(FXObject *, FXSelector, void *)
called when user select a format radio button
void hideGEOPOICreatorModule()
hide GEOPOICreator Module
long onCmdSetCoordinates(FXObject *, FXSelector, void *)
FXCheckButton * myCenterViewAfterCreationCheckButton
button for enable or disable certer view after creation of GEO POI
Definition: GNEShapeFrame.h:91
GNEShapeFrame * myShapeFrameParent
pointer to Shape frame parent
Definition: GNEShapeFrame.h:79
void showGEOPOICreatorModule()
Show list of GEOPOICreator Module.
FXRadioButton * myLatLonRadioButton
radio button for the configuration lat-lon
Definition: GNEShapeFrame.h:85
FXButton * myCreateGEOPOIButton
button for create GEO Coordinates
Definition: GNEShapeFrame.h:94
long onCmdCreateGEOPOI(FXObject *, FXSelector, void *)
called when user type in search box
void tagSelected()
Tag selected in GNETagSelector.
void show()
show Frame
bool processClickPOI(SumoXMLTag POITag, const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click for POIs over view
bool processClickPolygons(const Position &clickedPosition, bool &updateTemporalShape)
process click for Polygons
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects, bool &updateTemporalShape)
process click over Viewnet
GNEDrawingShape * getDrawingShapeModule() const
get drawing mode editor
GNEAttributesCreator * myShapeAttributes
shape internal attributes
void addShape()
add shape (using base shape)
void createBaseShapeObject(const SumoXMLTag shapeTag)
GNEDrawingShape * myDrawingShape
Drawing shape.
CommonXMLStructure::SumoBaseObject * myBaseShape
SumoBaseObject used for create shape.
GEOPOICreator * myGEOPOICreator
GEOPOICreator.
~GNEShapeFrame()
Destructor.
bool processClickPOILanes(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click for POILanes
GNENeteditAttributes * myNeteditAttributes
Netedit parameter.
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
bool processClickPOIGeo(const Position &clickedPosition, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click for POIGeo
GNEShapeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
bool shapeDrawed()
build a shaped element using the drawed shape return true if was successfully created
GNETagSelector * myShapeTagSelector
shape tag selector
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
Definition: GNEViewParent.h:88
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37