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 };
GNEPolygonFrame::GEOPOICreator::myCoordinatesTextField
FXTextField * myCoordinatesTextField
text field for given geo coordinates
Definition: GNEPolygonFrame.h:82
GNEPolygonFrame::GEOPOICreator::myCreateGEOPOIButton
FXButton * myCreateGEOPOIButton
button for create GEO Coordinates
Definition: GNEPolygonFrame.h:88
GNEPolygonFrame::myDrawingShape
GNEFrameModules::DrawingShape * myDrawingShape
Drawing shape.
Definition: GNEPolygonFrame.h:149
GNEPolygonFrame::GEOPOICreator::myCenterViewAfterCreationCheckButton
FXCheckButton * myCenterViewAfterCreationCheckButton
button for enable or disable certer view after creation of GEO POI
Definition: GNEPolygonFrame.h:85
GNEPolygonFrame::GEOPOICreator::myLatLonRadioButton
FXRadioButton * myLatLonRadioButton
radio button for the configuration lat-lon
Definition: GNEPolygonFrame.h:79
GNEPolygonFrame::myBaseShape
CommonXMLStructure::SumoBaseObject * myBaseShape
SumoBaseObject used for create shape.
Definition: GNEPolygonFrame.h:121
GNEPolygonFrame::myShapeTagSelector
GNEFrameModules::TagSelector * myShapeTagSelector
shape tag selector
Definition: GNEPolygonFrame.h:140
GNEPolygonFrame::addShape
void addShape()
add shape (using base shape)
Definition: GNEPolygonFrame.cpp:473
GNEPolygonFrame::GNEPolygonFrame
GNEPolygonFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNEPolygonFrame.cpp:216
CommonXMLStructure::SumoBaseObject
SumoBaseObject.
Definition: CommonXMLStructure.h:39
GNEPolygonFrame::myNeteditAttributes
GNEFrameAttributeModules::NeteditAttributes * myNeteditAttributes
Netedit parameter.
Definition: GNEPolygonFrame.h:146
GNEPolygonFrame::getIdsSelected
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
Definition: GNEPolygonFrame.cpp:370
GNEFrameAttributeModules::AttributesCreator
Definition: GNEFrameAttributeModules.h:150
GNEFrame
Definition: GNEFrame.h:33
GNEViewNet
Definition: GNEViewNet.h:43
GNEPolygonFrame::GEOPOICreator::showGEOPOICreatorModule
void showGEOPOICreatorModule()
Show list of GEOPOICreator Module.
Definition: GNEPolygonFrame.cpp:80
GNEPolygonFrame::shapeDrawed
bool shapeDrawed()
build a shaped element using the drawed shape return true if was successfully created
Definition: GNEPolygonFrame.cpp:406
GNEPolygonFrame::GEOPOICreator::hideGEOPOICreatorModule
void hideGEOPOICreatorModule()
hide GEOPOICreator Module
Definition: GNEPolygonFrame.cpp:97
SumoXMLTag
SumoXMLTag
Numbers representing SUMO-XML - element names.
Definition: SUMOXMLDefinitions.h:39
GNEFrameAttributeModules::NeteditAttributes
Definition: GNEFrameAttributeModules.h:640
GNEPolygonFrame::show
void show()
show Frame
Definition: GNEPolygonFrame.cpp:246
GNEPolygonFrame::GEOPOICreator::GEOPOICreator
GEOPOICreator(GNEPolygonFrame *polygonFrameParent)
FOX-declaration.
Definition: GNEPolygonFrame.cpp:57
GNEFrameModules::TagSelector
Definition: GNEFrameModules.h:48
GNEPolygonFrame::myGEOPOICreator
GEOPOICreator * myGEOPOICreator
GEOPOICreator.
Definition: GNEPolygonFrame.h:152
GNEPolygonFrame::GEOPOICreator::onCmdSetCoordinates
long onCmdSetCoordinates(FXObject *, FXSelector, void *)
Definition: GNEPolygonFrame.cpp:103
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:157
GNEPolygonFrame::getDrawingShapeModule
GNEFrameModules::DrawingShape * getDrawingShapeModule() const
get drawing mode editor
Definition: GNEPolygonFrame.cpp:386
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
GNEPolygonFrame::~GNEPolygonFrame
~GNEPolygonFrame()
Destructor.
Definition: GNEPolygonFrame.cpp:237
GNEFrameModules::DrawingShape
Definition: GNEFrameModules.h:318
GNEPolygonFrame::GEOPOICreator
Definition: GNEPolygonFrame.h:39
GNEPolygonFrame::GEOPOICreator::~GEOPOICreator
~GEOPOICreator()
destructor
Definition: GNEPolygonFrame.cpp:76
GNEPolygonFrame
Definition: GNEPolygonFrame.h:31
FXGroupBoxModule
FXGroupBoxModule (based on FXGroupBox)
Definition: FXGroupBoxModule.h:27
GNEPolygonFrame::GEOPOICreator::myLabelCartesianPosition
FXLabel * myLabelCartesianPosition
FXLabel for the equivalent position of GEO Position in Cartesian Position.
Definition: GNEPolygonFrame.h:91
config.h
GNEPolygonFrame::GEOPOICreator::myLonLatRadioButton
FXRadioButton * myLonLatRadioButton
radio button for the configuration lon-lat
Definition: GNEPolygonFrame.h:76
GNEFrame.h
GNEPolygonFrame::tagSelected
void tagSelected()
Tag selected in TagSelector.
Definition: GNEPolygonFrame.cpp:444
GNEPolygonFrame::myShapeAttributes
GNEFrameAttributeModules::AttributesCreator * myShapeAttributes
shape internal attributes
Definition: GNEPolygonFrame.h:143
GNEPolygonFrame::GEOPOICreator::myPolygonFrameParent
GNEPolygonFrame * myPolygonFrameParent
pointer to Shape frame parent
Definition: GNEPolygonFrame.h:73
GNEPolygonFrame::createBaseShapeObject
void createBaseShapeObject(const SumoXMLTag shapeTag)
Definition: GNEPolygonFrame.cpp:392
GNEPolygonFrame::GEOPOICreator::onCmdSetFormat
long onCmdSetFormat(FXObject *, FXSelector, void *)
called when user select a format radio button
Definition: GNEPolygonFrame.cpp:143
GNEPolygonFrame::processClick
bool processClick(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, bool &updateTemporalShape)
process click over Viewnet
Definition: GNEPolygonFrame.cpp:255
GNEPolygonFrame::GEOPOICreator::onCmdCreateGEOPOI
long onCmdCreateGEOPOI(FXObject *, FXSelector, void *)
called when user type in search box
Definition: GNEPolygonFrame.cpp:159