72 (
TL(
"Cartesian equivalence:") + std::string(
"\n") +
73 TL(
"- X = give valid longitude") + std::string(
"\n") +
74 TL(
"- Y = give valid latitude")).c_str(),
109 std::string inputWithoutSpaces;
110 for (
const auto& i : input) {
112 inputWithoutSpaces.push_back(i);
116 if (input.size() != inputWithoutSpaces.size()) {
119 if (inputWithoutSpaces.size() > 0) {
137 (
TL(
"Cartesian equivalence:") + std::string(
"\n- X = ") +
toString(geoPos.
x()) + std::string(
"\n- Y = ") +
toString(geoPos.
y())).c_str());
141 (
TL(
"Cartesian equivalence:") + std::string(
"\n") +
142 TL(
"- X = give valid longitude") + std::string(
"\n") +
143 TL(
"- Y = give valid latitude")).c_str());
170 if (geoPosStr.empty()) {
202 myShapeFrameParent->myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
210 centerPosition.
add(geoPos);
211 centerPosition = centerPosition.
grow(10);
264 updateTemporalShape =
false;
285 myViewNet->setStatusBarText(
TL(
"Current selected shape isn't valid."));
293 std::string vectorOfIds;
294 for (
int i = 0; i < list->getNumItems(); i++) {
295 if (list->isItemSelected(i)) {
296 if (vectorOfIds.size() > 0) {
299 vectorOfIds += (list->getItem(i)->getText()).text();
351 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
400 updateTemporalShape =
true;
426 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
457 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
491 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
FXDEFMAP(GNEShapeFrame::GEOPOICreator) GEOPOICreatorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_GNE_CREATE
create element
#define GUIDesignTextColorRed
red color (for invalid text)
#define GUIDesignTextField
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignTextColorBlack
black color (for correct text)
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignRadioButton
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNING(msg)
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_POI
begin/end of the description of a Point of interest
@ GNE_TAG_POIGEO
Point of interest over view with GEO attributes.
@ SUMO_TAG_POLY
begin/end of the description of a polygon
@ GNE_TAG_POILANE
Point of interest over Lane.
@ GNE_TAG_JPS_OBSTACLE
polygon used for draw juPedSim obstacles
@ GNE_TAG_JPS_WALKABLEAREA
polygon used for draw juPedSim walkable areas
@ GNE_ATTR_DEMAND_FILE
demand demand file
@ GNE_ATTR_ADDITIONAL_FILE
additional save file
@ GNE_ATTR_CLOSE_SHAPE
Close shape of a polygon (Used by GNEPolys).
@ SUMO_ATTR_SHAPE
edge: the shape in xml-definition
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
A class that stores a 2D geometrical boundary.
void add(double x, double y, double z=0)
Makes the boundary include the given coordinate.
Boundary & grow(double by)
extends the boundary by the given amount
const std::string getID() const override
get ID (all Attribute Carriers have one)
static T parse(const std::string &string)
parses a value of type T from string (used for basic types: int, double, bool, etc....
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEFrame(GNEViewParent *viewParent, GNEViewNet *viewNet, const std::string &frameLabel)
Constructor.
const PositionVector & getLaneShape() const
get elements shape
double getLengthGeometryFactor() const
get length geometry factor
FXLabel * myLabelCartesianPosition
FXLabel for the equivalent position of GEO Position in Cartesian Position.
~GEOPOICreator()
destructor
FXRadioButton * myLonLatRadioButton
radio button for the configuration lon-lat
GEOPOICreator(GNEShapeFrame *polygonFrameParent)
FOX-declaration.
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.
bool processClickPOIGeo(const Position &clickedPosition)
process click for POIGeo
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
bool processClickPOILanes(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
process click for POILanes
bool processClickPOI(SumoXMLTag POITag, const Position &clickedPosition)
process click for POIs over view
void createBaseShapeObject(const SumoXMLTag shapeTag)
GNEDrawingShape * myDrawingShape
Drawing shape.
CommonXMLStructure::SumoBaseObject * myBaseShape
SumoBaseObject used for create shape.
GEOPOICreator * myGEOPOICreator
GEOPOICreator.
~GNEShapeFrame()
Destructor.
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
GNEShapeFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
GNEAttributesEditor * myShapeAttributesEditor
shape attributes editor
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
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
A single child window which contains a view of the simulation area.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static std::string copyFromClipboard(const FXApp &app)
Copies text from the clipboard.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation.
A list item which allows for custom coloring.
MFXGroupBoxModule (based on FXGroupBox).
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
MFXGroupBoxModule(GNEFrame *frame, const std::string &text, const int options=Options::COLLAPSIBLE)
constructor for frames
A point in 2D or 3D with translation and scaling methods.
double x() const
Returns the x-position.
void swapXY()
swap position X and Y
double y() const
Returns the y-position.
void closePolygon()
ensures that the last position equals the first
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D