39 myStopFrameParent(StopFrameParent) {
65 std::ostringstream information;
67 switch (myStopFrameParent->myStopTagSelector->getCurrentTagProperties().getTag()) {
70 <<
"- Click over a bus stop\n"
71 <<
" to create a stop.";
75 <<
"- Click over a container stop\n"
76 <<
" to create a stop.";
80 <<
"- Click over a charging \n"
81 <<
" station to create a stop.";
85 <<
"- Click over a parking area\n"
86 <<
" to create a stop.";
90 <<
"- Click over a lane to\n"
95 <<
"- No stop parents in\n"
96 <<
" current network.";
100 myInformationLabel->setText(information.str().c_str());
108 GNEFrame(horizontalFrameParent, viewNet,
"Stops") {
136 bool validStopParent =
false;
140 validStopParent =
true;
144 if (validStopParent) {
224 }
else if (stoppingPlace) {
284 if (!stop.
lane.empty()) {
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
#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
const int STOP_DURATION_SET
const int STOP_EXPECTED_SET
const int STOP_PARKING_SET
const int STOP_TRIP_ID_SET
const int STOP_CONTAINER_TRIGGER_SET
const int STOP_EXTENSION_SET
const int STOP_TRIGGER_SET
const int STOP_EXPECTED_CONTAINERS_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ GNE_TAG_PERSONSTOP_BUSSTOP
@ SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ SUMO_TAG_NOTHING
invalid tag
@ SUMO_TAG_CONTAINER_STOP
A container stop.
@ SUMO_TAG_STOP_CHARGINGSTATION
stop placed over a charging station (used in netedit)
@ SUMO_TAG_STOP_LANE
stop placed over a lane (used in netedit)
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_PARKING_AREA
A parking area.
@ GNE_TAG_PERSONSTOP_EDGE
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ GNE_TAG_PERSONTRIP_EDGE_BUSSTOP
@ SUMO_TAG_STOP_BUSSTOP
stop placed over a busStop (used in netedit)
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_STOP_PARKINGAREA
stop placed over a parking area (used in netedit)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_CONTAINER_TRIGGERED
@ SUMO_ATTR_EXPECTED_CONTAINERS
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
An Element which don't belongs to GNENet but has influency in the simulation.
const std::string & getID() const
get ID
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get Tag Property assigned to this object
const std::string & getID() const
get ID
void hideAttributesCreatorModul()
hide group box
void refreshRows()
refresh rows (called after creating an element)
void showAttributesCreatorModul(const GNETagProperties &tagProperties, const std::vector< SumoXMLAttr > &hiddenAttributes)
show AttributesCreator modul
std::map< SumoXMLAttr, std::string > getAttributesAndValues(bool includeAll) const
get attributes and their values
bool areValuesValid() const
check if parameters of attributes are valid
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
void showNeteditAttributesModul(const GNETagProperties &tagValue)
show Netedit attributes modul
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, const GNELane *lane) const
fill valuesMap with netedit attributes
void hideNeteditAttributesModul()
hide Netedit attributes modul
GNEViewNet * myViewNet
View Net.
virtual void show()
show Frame
virtual void hide()
hide Frame
GNEDemandElement * getCurrentDemandElement() const
get current demand element
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
const std::vector< SumoXMLTag > & getAllowedTags() const
void showDemandElementSelector()
show demand element selector
void hideDemandElementSelector()
hide demand element selector
void refreshDemandElementSelector()
refresh demand element selector
void hideTagSelector()
hide item selector
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show
const GNETagProperties & getCurrentTagProperties() const
get current type tag
void showTagSelector()
show item selector
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEEdge * getParentEdge() const
get arent edge
const std::map< SumoXMLTag, std::map< std::string, GNEDemandElement * > > & getDemandElements() const
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
retrieve all attribute carriers of Net
const std::string & getID() const
get ID
static void buildStop(GNENet *net, bool undoDemandElements, const SUMOVehicleParameter::Stop &stopParameters, GNEDemandElement *stopParent)
build stop
void updateHelpCreation()
update HelpCreation
void showHelpCreation()
show HelpCreation
FXLabel * myInformationLabel
Label with creation information.
void hideHelpCreation()
hide HelpCreation
~HelpCreation()
destructor
HelpCreation(GNEStopFrame *StopFrameParent)
constructor
~GNEStopFrame()
Destructor.
GNEFrameModuls::DemandElementSelector * myStopParentSelector
Stop parent selectors.
static bool getStopParameter(SUMOVehicleParameter::Stop &stop, const SumoXMLTag stopTag, GNEViewNet *viewNet, GNEFrameAttributesModuls::AttributesCreator *stopAttributes, const GNEFrameAttributesModuls::NeteditAttributes *myNeteditAttributes, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
GNEFrameAttributesModuls::NeteditAttributes * myNeteditAttributes
Netedit parameter.
GNEFrameModuls::TagSelector * myStopTagSelector
stop tag selector selector (used to select diffent kind of Stops)
void demandElementSelected()
selected demand element in DemandElementSelector
HelpCreation * myHelpCreation
Help creation.
void tagSelected()
Tag selected in TagSelector.
GNEFrameAttributesModuls::AttributesCreator * myStopAttributes
internal Stop attributes
GNEStopFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add Stop element
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
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
Definition of vehicle stop (position and duration)
std::string edge
The edge to stop at (used only in NETEDIT)
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)
std::string parkingarea
(Optional) parking area if one is assigned to the stop
double startPos
The stopping position start.
std::string chargingStation
(Optional) charging station if one is assigned to the stop
int parametersSet
Information for the output which parameter were set.
int index
at which position in the stops list
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.
bool parking
whether the vehicle is removed from the net while stopping
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
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.