Eclipse SUMO - Simulation of Urban MObility
GNEPolygonFrame.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 // The Widget for add polygons
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
23 
24 // ===========================================================================
25 // class definitions
26 // ===========================================================================
31 class GNEPolygonFrame : public GNEFrame {
32 
33 public:
34 
35  // ===========================================================================
36  // class GEOPOICreator
37  // ===========================================================================
38 
42 
43  public:
45  GEOPOICreator(GNEPolygonFrame* polygonFrameParent);
46 
49 
52 
55 
59  long onCmdSetCoordinates(FXObject*, FXSelector, void*);
60 
62  long onCmdSetFormat(FXObject*, FXSelector, void*);
63 
65  long onCmdCreateGEOPOI(FXObject*, FXSelector, void*);
67 
68  protected:
69  FOX_CONSTRUCTOR(GEOPOICreator)
70 
71  private:
74 
76  FXRadioButton* myLonLatRadioButton;
77 
79  FXRadioButton* myLatLonRadioButton;
80 
82  FXTextField* myCoordinatesTextField;
83 
86 
89 
92  };
93 
98  GNEPolygonFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
99 
102 
104  void show();
105 
111  bool processClick(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor, bool& updateTemporalShape);
112 
114  static std::string getIdsSelected(const FXList* list);
115 
118 
119 protected:
122 
123  // @brief create baseShapeObject
124  void createBaseShapeObject(const SumoXMLTag shapeTag);
125 
130  bool shapeDrawed();
131 
133  void tagSelected();
134 
136  void addShape();
137 
138 private:
141 
144 
147 
150 
153 };
SumoXMLTag
Numbers representing SUMO-XML - element names.
FXGroupBoxModule (based on FXGroupBox)
GEOPOICreator(GNEPolygonFrame *polygonFrameParent)
FOX-declaration.
FXRadioButton * myLonLatRadioButton
radio button for the configuration lon-lat
FXCheckButton * myCenterViewAfterCreationCheckButton
button for enable or disable certer view after creation of GEO POI
FXRadioButton * myLatLonRadioButton
radio button for the configuration lat-lon
GNEPolygonFrame * myPolygonFrameParent
pointer to Shape frame parent
long onCmdCreateGEOPOI(FXObject *, FXSelector, void *)
called when user type in search box
void hideGEOPOICreatorModule()
hide GEOPOICreator Module
FXTextField * myCoordinatesTextField
text field for given geo coordinates
FXButton * myCreateGEOPOIButton
button for create GEO Coordinates
void showGEOPOICreatorModule()
Show list of GEOPOICreator Module.
FXLabel * myLabelCartesianPosition
FXLabel for the equivalent position of GEO Position in Cartesian Position.
long onCmdSetFormat(FXObject *, FXSelector, void *)
called when user select a format radio button
long onCmdSetCoordinates(FXObject *, FXSelector, void *)
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool &updateTemporalShape)
process click over Viewnet
void createBaseShapeObject(const SumoXMLTag shapeTag)
GNEFrameAttributeModules::AttributesCreator * myShapeAttributes
shape internal attributes
CommonXMLStructure::SumoBaseObject * myBaseShape
SumoBaseObject used for create shape.
void show()
show Frame
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
void tagSelected()
Tag selected in TagSelector.
GNEFrameAttributeModules::NeteditAttributes * myNeteditAttributes
Netedit parameter.
GNEFrameModules::DrawingShape * myDrawingShape
Drawing shape.
~GNEPolygonFrame()
Destructor.
GNEFrameModules::TagSelector * myShapeTagSelector
shape tag selector
GNEPolygonFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
GNEFrameModules::DrawingShape * getDrawingShapeModule() const
get drawing mode editor
GEOPOICreator * myGEOPOICreator
GEOPOICreator.
bool shapeDrawed()
build a shaped element using the drawed shape return true if was successfully created
void addShape()
add shape (using base shape)
class used to group all variables related with objects under cursor after a click over view
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37