45 FXLabel* legendLabel =
nullptr;
80#define TLSX(string) std::string(gettext((string)))
98 addTLString(
TL(
"-Requires at least one Entry\n and one Exit"));
101 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
104 addTLString(
TL(
"-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
113 if (myHelpMap.count(XMLTag) > 0) {
114 myHelpLabel->setText(myHelpMap.at(XMLTag).c_str());
130 return std::string(str.c_str());
138 GNEFrame(viewParent, viewNet,
TL(
"Additionals")) {
210 WRITE_WARNING(
TL(
"Currently unsupported. Create rerouter elements using rerouter dialog"));
215 WRITE_WARNING(
TL(
"Currently unsupported. Create VSS steps using VSS dialog"));
220 WRITE_WARNING(
TL(
"Currently unsupported. Create calibratorFlows using calibrator dialog"));
225 WRITE_WARNING(
TL(
"Shift + click to create two additionals in the same position"));
291 WRITE_WARNING(
TL(
"E2 multilane detectors need at least two consecutive lanes"));
335 if (templateAC->getTagProperty()->isChild()) {
355 }
else if (templateAC->getTagProperty()->hasAttribute(
SUMO_ATTR_LANES)) {
398 auto baseAdditionalTag = tagProperty->
getTag();
451 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)
bool hasParentID(const SumoXMLTag tag) const
check if current SumoBaseObject has the given parent ID
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)
const std::string & getParentID(const SumoXMLTag tag) const
get parent ID
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
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.
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.
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
SumoXMLAttr fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
fill sumo Base object
void showAttributesEditor(GNEAttributeCarrier *AC, const bool primaryAttributeEditor)
edit attributes of the given AC (usually the edited template AC)
void refreshAttributesEditor()
refresh attribute editor
bool checkAttributes(const bool showWarning)
check if current edited attributes are valid
void hideAttributesEditor()
hide attribute editor
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
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
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...
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::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"
const std::vector< SumoXMLTag > & getXMLParentTags() const
get XML parent tags
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
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
GNENet * getNet() const
get the net object
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
GNEViewParent * getViewParent() const
get the net object
void setStatusBarText(const std::string &text)
set statusBar text
bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
@brie fill SUMO base object
void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute)
show GNEViewObjectSelector Module
void clearSelection()
clear selection
bool toggleSelectedLane(const GNELane *lane)
toggle selected lane
void hideNetworkElementsSelector()
hide GNEViewObjectSelector Module
bool toggleSelectedElement(const GNEAttributeCarrier *AC)
toggle selected element
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.
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