40 myStopFrameParent(StopFrameParent) {
66 std::ostringstream information;
68 if (myStopFrameParent->myStopTagSelector->getCurrentTemplateAC()) {
69 switch (myStopFrameParent->myStopTagSelector->getCurrentTemplateAC()->getTagProperty().getTag()) {
73 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
74 <<
"- " <<
TL(
"Click over a bus stop to create a stop.");
79 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
80 <<
"- " <<
TL(
"Click over a train stop to create a stop.");
85 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
86 <<
"- " <<
TL(
"Click over a container stop to create a stop.");
91 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
92 <<
"- " <<
TL(
"Click over a charging station to create a stop.");
97 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
98 <<
"- " <<
TL(
"Click over a parking area to create a stop.");
103 <<
"- " <<
TL(
"Shift+Click to select parent") <<
"\n"
104 <<
"- " <<
TL(
"Click over a lane to create a stop.");
108 <<
"- " <<
TL(
"No stop parents in current network.");
113 myInformationLabel->setText(information.str().c_str());
122 myRouteHandler(
"", viewNet->getNet(),
myViewNet->getViewParent()->getGNEAppWindows()->isUndoRedoAllowed(), false),
153 bool validStopParent =
false;
157 validStopParent =
true;
161 if (validStopParent) {
260 }
else if (stoppingPlace) {
353 if (stopParent->
isRoute() && lane) {
374 WRITE_WARNING(
TL(
"Stop must be placed over an embedded route's edge"));
396 if (!stop.
edge.empty() || !stop.
lane.empty()) {
439 if (stop.
until >= 0) {
463 if (expected.size() > 0) {
465 for (
const auto&
id : expected) {
470 for (
const auto&
id : expected) {
479 if (stop.
join.size() > 0) {
485 if (permitted.size() > 0) {
487 for (
const auto& permit : permitted) {
505 if (stop.
jump >= 0) {
511 if (stop.
split.size() > 0) {
517 if (stop.
tripId.size() > 0) {
523 if (stop.
line.size() > 0) {
535 if (stop.
speed > 0) {
555 stopBaseObject->
setTag(stopTag);
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
#define WRITE_WARNINGF(...)
#define WRITE_WARNING(msg)
const int STOP_DURATION_SET
const int STOP_POSLAT_SET
const int STOP_EXPECTED_SET
const int STOP_PARKING_SET
const int STOP_TRIP_ID_SET
const int STOP_PERMITTED_SET
const int STOP_CONTAINER_TRIGGER_SET
const int STOP_EXTENSION_SET
const int STOP_TRIGGER_SET
const int STOP_ONDEMAND_SET
const int STOP_EXPECTED_CONTAINERS_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_WAYPOINT_PARKINGAREA
@ GNE_TAG_STOP_PARKINGAREA
stop placed over a parking area
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ GNE_TAG_STOP_BUSSTOP
stop placed over a busStop
@ GNE_TAG_WAYPOINT_TRAINSTOP
@ GNE_TAG_WAYPOINT_CONTAINERSTOP
@ GNE_TAG_STOPCONTAINER_EDGE
@ GNE_TAG_WAYPOINT_BUSSTOP
@ SUMO_TAG_BUS_STOP
A bus stop.
@ GNE_TAG_WAYPOINT_CHARGINGSTATION
@ GNE_TAG_STOPPERSON_BUSSTOP
@ GNE_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ SUMO_TAG_TRAIN_STOP
A train stop (alias for bus stop)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ GNE_TAG_STOP_LANE
stop placed over a lane
@ GNE_TAG_STOPPERSON_TRAINSTOP
@ GNE_TAG_STOP_TRAINSTOP
stop placed over a trainStop
@ GNE_TAG_STOP_CHARGINGSTATION
stop placed over a charging station
@ GNE_TAG_STOPPERSON_EDGE
@ SUMO_TAG_EDGE
begin/end of the description of an edge
const double INVALID_DOUBLE
invalid double
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
std::string toTrainStop
to trainStop
std::string toParkingArea
to parkingArea
std::string toEdge
to edge
void clear()
clear parameters
std::string toBusStop
to busStop
std::string toChargingStation
to chargingStation
std::string toContainerStop
to containerStop
SUMOTime getTimeAttribute(const SumoXMLAttr attr) const
get time attribute
bool hasBoolAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given bool attribute
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
bool hasTimeAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given time attribute
SumoXMLTag getTag() const
get XML myTag
bool hasDoubleAttribute(const SumoXMLAttr attr) const
check if current SumoBaseObject has the given double attribute
bool getBoolAttribute(const SumoXMLAttr attr) const
get bool attribute
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
void setStopParameter(const SUMOVehicleParameter::Stop &stopParameter)
add stop parameters
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
void clear()
clear SumoBaseObject
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
const std::vector< SumoBaseObject * > & getSumoBaseObjectChildren() const
get SumoBaseObject children
An Element which don't belong to GNENet but has influence in the simulation.
const std::string getID() const
get ID (all Attribute Carriers have one)
const std::string & getTagStr() const
get tag assigned to this object in string format
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
virtual std::string getAttribute(SumoXMLAttr key) const =0
void showDemandElementSelector()
show demand element selector
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
void refreshDemandElementSelector()
refresh demand element selector
GNEDemandElement * getCurrentDemandElement() const
get current demand element
const std::vector< SumoXMLTag > & getAllowedTags() const
void hideDemandElementSelector()
hide demand element selector
GNEViewNet * myViewNet
FOX need this.
virtual void show()
show Frame
virtual void hide()
hide Frame
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
double getSpeed() const
returns the current speed of lane
GNEEdge * getParentEdge() const
get parent edge
const std::unordered_map< SumoXMLTag, std::unordered_map< const GUIGlObject *, GNEDemandElement * > > & getDemandElements() const
get demand elements
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
bool isRoute() const
check if pathElement is a route
bool buildStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const CommonXMLStructure::PlanParameters &planParameters, const SUMOVehicleParameter::Stop &stopParameters)
build stop
void updateHelpCreation()
update HelpCreation
void showHelpCreation()
show HelpCreation
void hideHelpCreation()
hide HelpCreation
~HelpCreation()
destructor
HelpCreation(GNEStopFrame *StopFrameParent)
constructor
MFXDynamicLabel * myInformationLabel
Label with creation information.
CommonXMLStructure::SumoBaseObject * myStopParentBaseObject
stop parent base object
GNERouteHandler myRouteHandler
route handler
bool getStopParameter(const SumoXMLTag stopTag, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
~GNEStopFrame()
Destructor.
CommonXMLStructure::PlanParameters myPlanParameters
plan parameters
GNEStopFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
GNEDemandElementSelector * myStopParentSelector
Stop parent selectors.
void demandElementSelected()
selected demand element in DemandElementSelector
GNETagSelector * myStopTagSelector
stop tag selector selector (used to select diffent kind of Stops)
HelpCreation * myHelpCreation
Help creation.
void tagSelected()
Tag selected in GNETagSelector.
GNEAttributesCreator * myStopAttributes
internal Stop attributes
GNEDemandElementSelector * getStopParentSelector() const
get stop parent selector
bool addStop(const GNEViewNetHelper::ViewObjectsSelector &viewObjects, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add Stop element
GNENeteditAttributes * myNeteditAttributes
Netedit parameter.
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isVehicle() const
return true if tag correspond to a vehicle element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
bool isVehicleStop() const
return true if tag correspond to a vehicle stop element
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
void showTagSelector()
show item selector
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
void hideTagSelector()
hide item 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
GNEAdditional * getAdditionalFront() const
get front additional element or a pointer to nullptr
GNEDemandElement * getDemandElementFront() const
get front demand element or a pointer to nullptr
GNENet * getNet() const
get the net object
void resetLastClickedPosition()
reset last clicked position
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
A single child window which contains a view of the simulation area.
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)
Definition of vehicle stop (position and duration)
std::string edge
The edge to stop at.
ParkingType parking
whether the vehicle is removed from the net while stopping
std::string lane
The lane to stop at.
SUMOTime extension
The maximum time extension for boarding / loading.
bool friendlyPos
enable or disable friendly position (used by netedit)
double speed
the speed at which this stop counts as reached (waypoint mode)
std::string parkingarea
(Optional) parking area if one is assigned to the stop
std::string split
the id of the vehicle (train portion) that splits of upon reaching this stop
double startPos
The stopping position start.
std::string line
the new line id of the trip within a cyclical public transport route
double posLat
the lateral offset when stopping
bool onDemand
whether the stop may be skipped
std::string chargingStation
(Optional) charging station if one is assigned to the stop
std::set< std::string > permitted
IDs of persons or containers that may board/load at this stop.
int parametersSet
Information for the output which parameter were set.
int index
at which position in the stops list
SUMOTime jump
transfer time if there shall be a jump from this stop to the next route edge
std::string join
the id of the vehicle (train portion) to which this vehicle shall be joined
SUMOTime until
The time at which the vehicle may continue its journey.
std::string actType
act Type (only used by Persons) (used by netedit)
bool triggered
whether an arriving person lets the vehicle continue
double endPos
The stopping position end.
std::set< std::string > awaitedPersons
IDs of persons the vehicle has to wait for until departing.
std::set< std::string > awaitedContainers
IDs of containers the vehicle has to wait for until departing.
std::string busstop
(Optional) bus stop if one is assigned to the stop
bool joinTriggered
whether an joined vehicle lets this vehicle continue
std::string tripId
id of the trip within a cyclical public transport route
std::string containerstop
(Optional) container stop if one is assigned to the stop
bool containerTriggered
whether an arriving container lets the vehicle continue
SUMOTime duration
The stopping duration.
MFXCheckableButton * menuCheckShowAllTrips
show all trips
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person plans