43 FXLabel* legendLabel =
nullptr;
78#define TLSX(string) std::string(gettext((string)))
96 addTLString(
TL(
"-Requires at least one Entry\n and one Exit"));
99 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
102 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
111 if (myHelpMap.count(XMLTag) > 0) {
112 myHelpLabel->setText(myHelpMap.at(XMLTag).c_str());
128 return std::string(str.c_str());
136 GNEFrame(viewParent, viewNet,
TL(
"Additionals")) {
265 WRITE_WARNING(
TL(
"E2 multilane detectors need at least two consecutive lanes"));
316 if (templateAC->getTagProperty().isChild()) {
336 }
else if (templateAC->getTagProperty().hasAttribute(
SUMO_ATTR_LANES)) {
503 if (lane !=
nullptr) {
555 WRITE_WARNING(
TL(
"Currently unsupported. Create rerouter elements using rerouter dialog"));
560 WRITE_WARNING(
TL(
"Currently unsupported. Create VSS steps using VSS dialog"));
565 WRITE_WARNING(
TL(
"Currently unsupported. Create calibratorFlows using calibrator dialog"));
590 for (
const auto& additionalChild : VSSParent->getChildAdditionals()) {
591 if (!additionalChild->getTagProperty().isSymbol()) {
592 step = additionalChild;
#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)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ SUMO_TAG_REROUTER
A rerouter.
@ 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_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_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_CALIBRATOR
A calibrator placed over edge.
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_VSS
A variable speed sign.
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_END
weights: time range end
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
SumoXMLTag getTag() const
get XML myTag
void addTimeAttribute(const SumoXMLAttr attr, const SUMOTime value)
add time attribute into current SumoBaseObject node
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
double getDoubleAttribute(const SumoXMLAttr attr) const
get double attribute
const std::vector< std::string > & getStringListAttribute(const SumoXMLAttr attr) const
get string list attribute
bool hasStringListAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given string list attribute
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
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.
bool buildAdditionalOverLane(GNELane *lane, const GNETagProperties &tagValues)
build additional over a single lane
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
GNETagSelector * myAdditionalTagSelector
item selector
GNENetworkSelector * getLanesSelector() const
get edges selector
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.
GNENetworkSelector * getEdgesSelector() const
get edges selector
void tagSelected()
Tag selected in GNETagSelector.
GNENetworkSelector * myLanesSelector
Module for select lanes.
bool buildAdditionalOverView(const GNETagProperties &tagValues)
build additional over view
GNENeteditAttributes * getNeteditAttributes() const
get Netedit parameter
bool buildAdditionalCommonAttributes(const GNETagProperties &tagValues)
build common additional attributes
HelpCreationModule * myHelpCreationModule
Module for show additional help legend.
GNEAttributesCreator * myAdditionalAttributes
internal additional attributes
~GNEAdditionalFrame()
Destructor.
GNENetworkSelector * myEdgesSelector
Module for select edges.
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
bool createBaseAdditionalObject(const GNETagProperties &tagProperty)
GNENeteditAttributes * myNeteditAttributes
Netedit parameter.
bool buildAdditionalOverEdge(GNELane *lane, const GNETagProperties &tagValues)
build additional over an edge (parent of lane)
GNEConsecutiveSelector * myConsecutiveLaneSelector
Module for select consecutive lanes.
Builds additional objects for GNENet (busStops, chargingStations, detectors, etc.....
An Element which don't belong to GNENet but has influence in the simulation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool isUndoRedoAllowed() const
const std::string getID() const
get ID (all Attribute Carriers have one)
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
void getAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, bool includeAll) const
get attributes and their values
bool areValuesValid() const
check if parameters of attributes are valid
void showAttributesCreatorModule(GNEAttributeCarrier *templateAC, const std::vector< SumoXMLAttr > &hiddenAttributes)
show GNEAttributesCreator modul
void hideAttributesCreatorModule()
hide group box
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
void refreshAttributesCreator()
refresh attribute creator
bool addLane(GNELane *lane)
add lane
void abortPathCreation()
abort path creation
void showConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::pair< GNELane *, double > > & getLanePath() const
get vector with lanes and clicked positions
void hideConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::string > getLaneIDPath() const
get lane IDs
GNEViewNet * getViewNet() const
get view net
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
const PositionVector & getLaneShape() const
get elements shape
double getLengthGeometryFactor() const
get length geometry factor
GNEEdge * getParentEdge() const
get parent edge
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false)
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
void showNeteditAttributesModule(GNEAttributeCarrier *templateAC)
show Netedit attributes modul
void hideNeteditAttributesModule()
hide Netedit attributes modul
bool getNeteditAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, const GNELane *lane) const
fill valuesMap with netedit attributes
void hideNetworkElementsSelector()
hide GNENetworkSelector Module
bool toggleSelectedElement(const GNENetworkElement *networkElement)
toggle selected networkElement
bool isShown() const
return true if module is shown
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
void showNetworkElementsSelector()
show GNENetworkSelector Module
std::vector< std::string > getSelectedIDs() const
get selected IDs
void setIDSelected(const std::string &id)
select manually a element of the list
void showSelectorParentModule(const std::vector< SumoXMLTag > &parentTags)
Show list of GNESelectorParent Module.
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
std::string getIdSelected() const
get currently parent additional selected
void hideSelectorParentModule()
hide GNESelectorParent Module
const std::vector< SumoXMLTag > & getParentTags() const
get parent tags
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
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
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
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNENet * getNet() const
get the net object
GNEViewParent * getViewParent() const
get the net object
void resetLastClickedPosition()
reset last clicked position
const GNEViewNetHelper::ViewObjectsSelector & getViewObjectsSelector() const
get objects under cursor
void setStatusBarText(const std::string &text)
set statusBar text
A single child window which contains a view of the simulation area.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
A point in 2D or 3D with translation and scaling methods.
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