45 FXLabel* legendLabel =
nullptr;
94 addTLString(
TL(
"-Requires at least one Entry\n and one Exit"));
97 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
100 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
126 return std::string(str.c_str());
134 GNEFrame(viewParent, viewNet,
TL(
"Additionals")) {
182 myViewNet->setStatusBarText(
TL(
"Current selected additional isn't valid."));
206 WRITE_WARNING(
TL(
"Currently unsupported. Create rerouter elements using rerouter dialog"));
211 WRITE_WARNING(
TL(
"Currently unsupported. Create VSS steps using VSS dialog"));
216 WRITE_WARNING(
TL(
"Currently unsupported. Create calibratorFlows using calibrator dialog"));
221 WRITE_WARNING(
TL(
"Shift + click to create two additionals in the same position"));
243 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
287 WRITE_WARNING(
TL(
"E2 multilane detectors need at least two consecutive lanes"));
307 myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed());
331 if (templateAC->getTagProperty()->isChild()) {
351 }
else if (templateAC->getTagProperty()->hasAttribute(
SUMO_ATTR_LANES)) {
394 auto baseAdditionalTag = tagProperty->
getTag();
422 messageError.clear();
423 for (
int i = 0; i < numParents; i++) {
425 if (i == numParents - 2) {
426 messageError.append(
" or ");
427 }
else if (i < (numParents - 2)) {
428 messageError.append(
", ");
460 const double mousePositionOverLane = firstLane->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / firstLane->getLengthGeometryFactor();
#define GUIDesignLabel(justify)
#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_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_CALIBRATOR_FLOW
a flow definition within in Calibrator
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_ADDITIONAL_FILE
additional save file
@ GNE_ATTR_LANELENGTH
size (used in stopping places)
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
void hideE2MultilaneLegend()
hide Legend modul
void showE2MultilaneLegend()
show Legend modul
E2MultilaneLegendModule(GNEFrame *frameParent)
constructor
~E2MultilaneLegendModule()
destructor
~HelpCreationModule()
destructor
std::map< SumoXMLTag, std::string > myHelpMap
map with tags and their associated help
std::string addTLString(const std::string &str)
add translated string
void showHelpCreationModule(SumoXMLTag XMLTag)
show Legend modul
void hideHelpCreationModule()
hide Legend modul
HelpCreationModule(GNEFrame *frameParent)
constructor
FXLabel * myHelpLabel
help label
GNESelectorParent * mySelectorAdditionalParent
Module for select a single parent additional.
GNETagSelector * getAdditionalTagSelector() const
get additional tag selector
bool initBaseAdditionalObject(const GNETagProperties *tagProperty, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
GNEAttributesEditor * getAttributesEditor() const
get attribtues editor
GNETagSelector * myAdditionalTagSelector
item selector
GNEAttributesEditor * myAdditionalAttributesEditor
additional attributes editor
void resetBaseAdditionalObject()
bool createPath(const bool useLastRoute)
create path
GNEAdditionalFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
bool addAdditional(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add additional element
E2MultilaneLegendModule * myE2MultilaneLegendModule
Module for show E2 Detector legend.
void tagSelected()
Tag selected in GNETagSelector.
GNEViewObjectSelector * getViewObjetsSelector() const
get module for select view objects
HelpCreationModule * myHelpCreationModule
Module for show additional help legend.
~GNEAdditionalFrame()
Destructor.
GNEViewObjectSelector * myViewObjetsSelector
Module for select view objects.
Position myLastClickedPosition
last clicked position
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
GNEConsecutiveSelector * myConsecutiveLaneSelector
Module for select consecutive lanes.
const std::string getID() const override
get ID (all Attribute Carriers have one)
GNEViewNet * getViewNet() const
get view net
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 GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const PositionVector & getLaneShape() const
get elements shape
double getLengthGeometryFactor() const
get length geometry factor
double getLaneShapeLength() const
returns the length of the lane's shape
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isChild() const
properties
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
const std::vector< SumoXMLTag > & getXMLParentTags() const
get XML parent tags
class used to group all variables related with objects under cursor after a click over view
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
void fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObjet) const
fill the given SUMO base object with the current single objects
A single child window which contains a view of the simulation area.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
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
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
A point in 2D or 3D with translation and scaling methods.
static const Position INVALID
used to indicate that a position is valid
double x() const
Returns the x-position.
double z() const
Returns the z-position.
double y() const
Returns the y-position.
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor WHITE
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source