65 const Position& pos,
bool geo,
double layer,
double angle,
const std::string& imgFile,
66 double width,
double height,
bool movementBlocked) :
67 GUIPointOfInterest(id, type, color, pos, geo,
"", 0, 0, layer, angle, imgFile, width, height),
227 return canParse<RGBColor>(value);
237 return canParse<bool>(value);
241 return canParse<double>(value);
252 return canParse<double>(value);
254 return canParse<double>(value);
256 return canParse<double>(value);
258 return canParse<bool>(value);
273 std::string oldID =
myID;
279 myColor = parse<RGBColor>(value);
298 myGeo = parse<bool>(value);
304 myLayer = parse<double>(value);
GNEPOI(GNENet *net, const std::string &id, const std::string &type, const RGBColor &color, const Position &pos, bool geo, double layer, double angle, const std::string &imgFile, double width, double height, bool movementBlocked)
Constructor.
Transform POI to POILane, and viceversa.
const std::string & getParentName() const
Returns the name of the parent object.
Position getPositionInView() const
Returns position of additional in view.
void buildShapePopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI ...
void moveGeometry(const Position &oldPos, const Position &offset)
change the position of the element geometry without saving in undoList
begin/end of the description of a single lane
void add(const Position &pos)
Adds the given position to this one.
void refreshElement(GUIGlObject *o)
refreshes boundary information for o and update
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
GUIGlID getGlID() const
Returns the numerical id of the object.
Stores the information about how to visualize structures.
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
method for setting the attribute and letting the object perform additional changes ...
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
static void drawText(const std::string &text, const Position &pos, const double layer, const double size, const RGBColor &col=RGBColor::BLACK, const double angle=0, int align=0, double width=-1)
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
A NBNetBuilder extended by visualisation and editing capabilities.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
double getHeight() const
Returns the image height of the POI.
RGBColor invertedColor() const
obtain inverted of current RGBColor
static bool isValidFilename(const std::string &value)
true if value is a valid file value
GNENet * myNet
the net to inform about updates
A class that stores a 2D geometrical boundary.
std::string myType
The type of the Shape.
void drawLockIcon(const Position &pos, double layer, double size=0.5) const
draw lock icon
void cartesian2geo(Position &cartesian) const
Converts the given cartesian (shifted) position to its geo (lat/long) representation.
void p_add(GNEChange_Attribute *cmd)
special method, avoid empty changes, always execute
void writeXML(OutputDevice &out, const bool geo=false, const double zOffset=0., const std::string laneID="", const double pos=0., const double posLat=0.)
static bool isValidID(const std::string &value)
true if value is a valid sumo ID
void commitGeometryMoving(const Position &oldPos, GNEUndoList *undoList)
commit geometry changes in the attributes of an element after use of moveGeometry(...)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double getNaviDegree() const
Returns the angle of the Shape in navigational degrees.
bool isValid(SumoXMLAttr key, const std::string &value)
method for checking if the key and their correspond attribute are valids
bool myBlockMovement
flag to block movement
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
A point in 2D or 3D with translation and scaling methods.
friend class GNEChange_Attribute
declare friend class
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
block movement of a graphic element
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
void changeShapeID(GNEShape *s, const std::string &OldID)
change Shape ID
double getWidth() const
Returns the image width of the POI.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::string myID
The name of the object.
Position myGEOPosition
Position of POI in GEO coordinates.
void setHeight(double height)
set the image height of the POI
void updateGeometry()
update pre-computed geometry information
void setWidth(double width)
set the image width of the POI
void setNaviDegree(const double angle)
Sets a new angle in navigational degrees.
std::string myImgFile
The angle of the Shape.
RGBColor myColor
The color of the Shape.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
std::string getAttribute(SumoXMLAttr key) const
method for getting the Attribute of an XML key
double myLayer
The layer of the Shape.
GUIGlID getGlID() const
Returns the numerical id of the object.
void writeShape(OutputDevice &device)
writte shape element into a xml file
Static storage of an output device and its base (abstract) implementation.
bool x2cartesian_const(Position &from) const
Converts the given coordinate into a cartesian using the previous initialisation. ...
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
bool myGeo
flag to check if POI was loaded as GEO Position (main used by netedit)
Position()
default constructor
A window containing a gl-object's parameter.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static PositionVector parseShapeReporting(const std::string &shpdef, const std::string &objecttype, const char *objectid, bool &ok, bool allowEmpty, bool report=true)
Builds a PositionVector from a string representation, reporting occured errors.
SumoXMLTag getTag() const
get XML Tag assigned to this object