Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
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// ===========================================================================
37class GNEShapeFrame : public GNEFrame {
38
39public:
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
89
92
95
98 };
99
104 GNEShapeFrame(GNEViewParent* viewParent, GNEViewNet* viewNet);
105
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
125protected:
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
155
156private:
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.
FXRadioButton * myLonLatRadioButton
radio button for the configuration lon-lat
FXTextField * myCoordinatesTextField
text field for given geo coordinates
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
GNEShapeFrame * myShapeFrameParent
pointer to Shape frame parent
void showGEOPOICreatorModule()
Show list of GEOPOICreator Module.
FXRadioButton * myLatLonRadioButton
radio button for the configuration lat-lon
FXButton * myCreateGEOPOIButton
button for create GEO Coordinates
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
bool processClickPOILanes(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click for POILanes
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.
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
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.
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37