Eclipse SUMO - Simulation of Urban MObility
GNEStopFrame.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
18 // The Widget for add Stops elements
19 /****************************************************************************/
20 #include <config.h>
21 
22 #include <netedit/GNENet.h>
23 #include <netedit/GNEViewNet.h>
26 
27 #include "GNEStopFrame.h"
28 
29 // ===========================================================================
30 // method definitions
31 // ===========================================================================
32 
33 // ---------------------------------------------------------------------------
34 // GNEStopFrame::HelpCreation - methods
35 // ---------------------------------------------------------------------------
36 
38  FXGroupBoxModule(StopFrameParent->myContentFrame, "Help"),
39  myStopFrameParent(StopFrameParent) {
41 }
42 
43 
45 
46 
47 void
49  // first update help cration
50  updateHelpCreation();
51  // show modul
52  show();
53 }
54 
55 
56 void
58  hide();
59 }
60 
61 
62 void
64  // create information label
65  std::ostringstream information;
66  // set text depending of selected Stop type
67  if (myStopFrameParent->myStopTagSelector->getCurrentTemplateAC()) {
68  switch (myStopFrameParent->myStopTagSelector->getCurrentTemplateAC()->getTagProperty().getTag()) {
70  information
71  << "- Click over a bus stop\n"
72  << " to create a stop.";
73  break;
75  information
76  << "- Click over a container stop\n"
77  << " to create a stop.";
78  break;
80  information
81  << "- Click over a charging \n"
82  << " station to create a stop.";
83  break;
85  information
86  << "- Click over a parking area\n"
87  << " to create a stop.";
88  break;
89  case SUMO_TAG_STOP_LANE:
90  information
91  << "- Click over a lane to\n"
92  << " create a stop.";
93  break;
94  default:
95  information
96  << "- No stop parents in\n"
97  << " current network.";
98  break;
99  }
100  }
101  // set information label
102  myInformationLabel->setText(information.str().c_str());
103 }
104 
105 // ---------------------------------------------------------------------------
106 // GNEStopFrame - methods
107 // ---------------------------------------------------------------------------
108 
109 GNEStopFrame::GNEStopFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet) :
110  GNEFrame(horizontalFrameParent, viewNet, "Stops"),
111  myRouteHandler("", viewNet->getNet(), true),
112  myStopParentBaseObject(new CommonXMLStructure::SumoBaseObject(nullptr)) {
113 
114  // Create Stop parent selector
115  myStopParentSelector = new GNEFrameModules::DemandElementSelector(this, {GNETagProperties::TagType::PERSON, GNETagProperties::TagType::VEHICLE, GNETagProperties::TagType::ROUTE});
116 
117  // Create item Selector modul for Stops
118  myStopTagSelector = new GNEFrameModules::TagSelector(this, GNETagProperties::TagType::STOP, SUMO_TAG_STOP_LANE);
119 
120  // Create Stop parameters
122 
123  // Create Netedit parameter
125 
126  // Create Help Creation Module
127  myHelpCreation = new HelpCreation(this);
128 
129  // refresh myStopParentMatchBox
131 }
132 
133 
135  delete myStopParentBaseObject;
136 }
137 
138 
139 void
141  // first check if stop frame moduls can be shown
142  bool validStopParent = false;
143  // check if at least there an item that supports an stop
144  for (auto i = myStopParentSelector->getAllowedTags().begin(); (i != myStopParentSelector->getAllowedTags().end()) && (validStopParent == false); i++) {
145  if (myViewNet->getNet()->getAttributeCarriers()->getDemandElements().at(*i).size() > 0) {
146  validStopParent = true;
147  }
148  }
149  // show or hidde moduls depending of validStopParent
150  if (validStopParent) {
153  // refresh tag selector
155  // refresh vType selector
157  // refresh tag selector
159  } else {
160  // hide moduls (except help creation)
165  // show help creation modul
167  }
168  // show frame
169  GNEFrame::show();
170 }
171 
172 
173 bool
175  // check if we're selecting a new stop parent
176  if (mouseButtonKeyPressed.shiftKeyPressed()) {
177  if (objectsUnderCursor.getDemandElementFront() &&
178  (objectsUnderCursor.getDemandElementFront()->getTagProperty().isVehicle() || objectsUnderCursor.getDemandElementFront()->getTagProperty().getTag() == SUMO_TAG_ROUTE)) {
180  WRITE_WARNING("Selected " + objectsUnderCursor.getDemandElementFront()->getTagStr() + " '" + objectsUnderCursor.getDemandElementFront()->getID() + "' as stop parent.");
181  return true;
182  } else {
183  WRITE_WARNING("Selected Stop parent isn't valid.");
184  return false;
185  }
186 
187  } else {
188  // now check if stop parent selector is valid
189  if (myStopParentSelector->getCurrentDemandElement() == nullptr) {
190  WRITE_WARNING("Current selected Stop parent isn't valid.");
191  return false;
192  }
193  // create stop base object
195  objectsUnderCursor.getLaneFront(), objectsUnderCursor.getAdditionalFront());
198  myStopParentBaseObject->getSumoBaseObjectChildren().front()->getStopParameter());
199  // show all trips
202  } else {
204  }
205  // stop sucesfully created, then return true
206  return true;
207  } else {
208  return false;
209  }
210  }
211 }
212 
213 bool
214 GNEStopFrame::getStopParameter(const SumoXMLTag stopTag, const GNELane* lane, const GNEAdditional* stoppingPlace) {
215  // first clear stop base object
217  // declare stop parameters
219  // first check that current selected Stop is valid
220  if (stopTag == SUMO_TAG_NOTHING) {
221  WRITE_WARNING("Current selected Stop type isn't valid.");
222  return false;
223  } else if (stopTag == SUMO_TAG_STOP_LANE) {
224  if (lane) {
225  stop.lane = lane->getID();
226  } else {
227  WRITE_WARNING("Click over a " + toString(SUMO_TAG_LANE) + " to create a stop placed in a " + toString(SUMO_TAG_LANE));
228  return false;
229  }
230  } else if (stopTag == GNE_TAG_STOPPERSON_EDGE) {
231  if (lane) {
232  stop.edge = lane->getParentEdge()->getID();
233  } else {
234  WRITE_WARNING("Click over a " + toString(SUMO_TAG_EDGE) + " to create a stop placed in a " + toString(SUMO_TAG_EDGE));
235  return false;
236  }
237  } else if (stoppingPlace) {
238  if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_BUS_STOP) {
239  if ((stopTag != SUMO_TAG_STOP_BUSSTOP) && (stopTag != GNE_TAG_STOPPERSON_BUSSTOP)) {
240  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
241  return false;
242  } else {
243  stop.busstop = stoppingPlace->getID();
244  stop.startPos = 0;
245  stop.endPos = 0;
246  }
247  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_CONTAINER_STOP) {
248  if (stopTag != SUMO_TAG_STOP_CONTAINERSTOP) {
249  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
250  return false;
251  } else {
252  stop.containerstop = stoppingPlace->getID();
253  stop.startPos = 0;
254  stop.endPos = 0;
255  }
256  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_CHARGING_STATION) {
257  if (stopTag != SUMO_TAG_STOP_CHARGINGSTATION) {
258  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
259  return false;
260  } else {
261  stop.chargingStation = stoppingPlace->getID();
262  stop.startPos = 0;
263  stop.endPos = 0;
264  }
265  } else if (stoppingPlace->getTagProperty().getTag() == SUMO_TAG_PARKING_AREA) {
266  if (stopTag != SUMO_TAG_STOP_PARKINGAREA) {
267  WRITE_WARNING("Invalid clicked stopping place to create a stop placed in a " + stoppingPlace->getTagProperty().getTagStr());
268  return false;
269  } else {
270  stop.parkingarea = stoppingPlace->getID();
271  stop.startPos = 0;
272  stop.endPos = 0;
273  }
274  }
275  } else {
276  if (stopTag == SUMO_TAG_STOP_BUSSTOP) {
277  WRITE_WARNING("Click over a " + toString(SUMO_TAG_STOP_BUSSTOP) + " to create a stop placed in a " + toString(SUMO_TAG_STOP_BUSSTOP));
278  } else if (stopTag == SUMO_TAG_STOP_CONTAINERSTOP) {
279  WRITE_WARNING("Click over a " + toString(SUMO_TAG_CONTAINER_STOP) + " to create a stop placed in a " + toString(SUMO_TAG_CONTAINER_STOP));
280  } else if (stopTag == SUMO_TAG_CHARGING_STATION) {
281  WRITE_WARNING("Click over a " + toString(SUMO_TAG_CHARGING_STATION) + " to create a stop placed in a " + toString(SUMO_TAG_CHARGING_STATION));
282  } else if (stopTag == SUMO_TAG_STOP_PARKINGAREA) {
283  WRITE_WARNING("Click over a " + toString(SUMO_TAG_PARKING_AREA) + " to create a stop placed in a " + toString(SUMO_TAG_PARKING_AREA));
284  } else if (stopTag == GNE_TAG_PERSONTRIP_BUSSTOP) {
285  WRITE_WARNING("Click over a " + toString(SUMO_TAG_STOP_BUSSTOP) + " to create a person stop placed in a " + toString(SUMO_TAG_STOP_BUSSTOP));
286  }
287  return false;
288  }
289  // check if stop attributes are valid
292  return false;
293  }
294  // get stop parent
296  // if stopParent is a route, check that stop is placed over a route's edge
297  if (stopParent->isRoute() && lane) {
298  bool found = false;
299  for (const auto& edge : stopParent->getParentEdges()) {
300  if (edge == lane->getParentEdge()) {
301  found = true;
302  }
303  }
304  if (!found) {
305  WRITE_WARNING("Stop must be placed over a route's edge");
306  return false;
307  }
308  }
309  // same if stoParent is a vehicle/flow with embedded route
310  if (stopParent->getChildDemandElements().size() > 0 && stopParent->getChildDemandElements().front()->getTagProperty().isRoute() && lane) {
311  bool found = false;
312  for (const auto& edge : stopParent->getChildDemandElements().front()->getParentEdges()) {
313  if (edge == lane->getParentEdge()) {
314  found = true;
315  }
316  }
317  if (!found) {
318  WRITE_WARNING("Stop must be placed over an embeded route's edge");
319  return false;
320  }
321  }
322  // set parent tag and id
325  // add route, from and to attributes
326  if (stopParent->getTagProperty().hasAttribute(SUMO_ATTR_ROUTE)) {
328  }
329  if (stopParent->getTagProperty().hasAttribute(SUMO_ATTR_FROM)) {
331  }
332  if (stopParent->getTagProperty().hasAttribute(SUMO_ATTR_TO)) {
334  }
335  // create stop object
337  // get stop attributes
338  myStopAttributes->getAttributesAndValues(stopBaseObject, true);
339  // add netedit values
340  if (!stop.lane.empty()) {
341  myNeteditAttributes->getNeteditAttributesAndValues(stopBaseObject, lane);
342  // check if start position can be parsed
343  if (stopBaseObject->hasDoubleAttribute(SUMO_ATTR_STARTPOS)) {
344  stop.startPos = stopBaseObject->getDoubleAttribute(SUMO_ATTR_STARTPOS);
346  }
347  // check if end position can be parsed
348  if (stopBaseObject->hasDoubleAttribute(SUMO_ATTR_ENDPOS)) {
349  stop.endPos = stopBaseObject->getDoubleAttribute(SUMO_ATTR_ENDPOS);
350  stop.parametersSet |= STOP_END_SET;
351  }
352  }
353  // obtain friendly position
354  if (stopBaseObject->hasBoolAttribute(SUMO_ATTR_FRIENDLY_POS)) {
355  stop.friendlyPos = stopBaseObject->getBoolAttribute(SUMO_ATTR_FRIENDLY_POS);
356  }
357  // obtain actType
358  if (stopBaseObject->hasStringAttribute(SUMO_ATTR_ACTTYPE)) {
359  stop.actType = stopBaseObject->getStringAttribute(SUMO_ATTR_ACTTYPE);
360  }
361  // fill rest of parameters depending if it was edited
362  if (stopBaseObject->hasTimeAttribute(SUMO_ATTR_DURATION)) {
363  stop.duration = stopBaseObject->getTimeAttribute(SUMO_ATTR_DURATION);
365  } else {
366  stop.duration = -1;
368  }
369  if (stopBaseObject->hasTimeAttribute(SUMO_ATTR_UNTIL)) {
370  stop.until = stopBaseObject->getTimeAttribute(SUMO_ATTR_UNTIL);
372  } else {
373  stop.until = -1;
374  stop.parametersSet &= ~STOP_UNTIL_SET;
375  }
376  if (stopBaseObject->hasTimeAttribute(SUMO_ATTR_EXTENSION)) {
377  stop.extension = stopBaseObject->getTimeAttribute(SUMO_ATTR_EXTENSION);
379  }
380  if (stopBaseObject->hasStringAttribute(SUMO_ATTR_TRIGGERED)) {
381  if ((stopBaseObject->getStringAttribute(SUMO_ATTR_TRIGGERED) == "true") || (stopBaseObject->getStringAttribute(SUMO_ATTR_TRIGGERED) == "person")) {
382  stop.triggered = true;
384  } else {
386  }
387  }
388  if (stopBaseObject->hasBoolAttribute(SUMO_ATTR_CONTAINER_TRIGGERED)) {
391  }
392  if (stopBaseObject->hasBoolAttribute(SUMO_ATTR_PARKING)) {
393  stop.parking = stopBaseObject->getBoolAttribute(SUMO_ATTR_PARKING);
395  }
396  if (stopBaseObject->hasStringListAttribute(SUMO_ATTR_EXPECTED)) {
397  const auto expected = stopBaseObject->getStringListAttribute(SUMO_ATTR_EXPECTED);
398  for (const auto& id : expected) {
399  stop.awaitedPersons.insert(id);
400  }
402  }
404  const auto expected = stopBaseObject->getStringListAttribute(SUMO_ATTR_EXPECTED_CONTAINERS);
405  for (const auto& id : expected) {
406  stop.awaitedPersons.insert(id);
407  }
409  }
410  if (stopBaseObject->hasStringAttribute(SUMO_ATTR_TRIP_ID)) {
411  stop.tripId = stopBaseObject->getStringAttribute(SUMO_ATTR_TRIP_ID);
413  }
414  if (stopBaseObject->hasStringAttribute(SUMO_ATTR_INDEX)) {
415  if (stopBaseObject->getStringAttribute(SUMO_ATTR_INDEX) == "fit") {
416  stop.index = STOP_INDEX_FIT;
417  } else if (stopBaseObject->getStringAttribute(SUMO_ATTR_INDEX) == "end") {
418  stop.index = STOP_INDEX_END;
419  } else if (GNEAttributeCarrier::canParse<int>(stopBaseObject->getStringAttribute(SUMO_ATTR_INDEX))) {
420  stop.index = GNEAttributeCarrier::parse<int>(stopBaseObject->getStringAttribute(SUMO_ATTR_INDEX));
421  } else {
422  stop.index = STOP_INDEX_END;
423  }
424  } else {
425  stop.index = STOP_INDEX_END;
426  }
427  // refresh stop attributes
429  // set tag
430  stopBaseObject->setTag(stopTag);
431  stopBaseObject->setStopParameter(stop);
432  return true;
433 }
434 
435 // ===========================================================================
436 // protected
437 // ===========================================================================
438 
439 void
442  // show Stop type selector modul
446  } else {
447  // hide all moduls if stop parent isn't valid
451  }
452 }
453 
454 
455 void
457  // show or hidde moduls depending if current selected stop parent is valid
461  // show moduls
465  } else {
469  }
470  } else {
471  // hide moduls
476  }
477 }
478 
479 
480 /****************************************************************************/
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition: GUIDesigns.h:244
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:280
const int STOP_DURATION_SET
const int STOP_INDEX_END
const int STOP_EXPECTED_SET
const int STOP_UNTIL_SET
const int STOP_PARKING_SET
const int STOP_TRIP_ID_SET
const int STOP_START_SET
const int STOP_CONTAINER_TRIGGER_SET
const int STOP_EXTENSION_SET
const int STOP_INDEX_FIT
const int STOP_TRIGGER_SET
const int STOP_END_SET
const int STOP_EXPECTED_CONTAINERS_SET
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_STOP_CONTAINERSTOP
stop placed over a containerStop (used in netedit)
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
@ GNE_TAG_PERSONTRIP_BUSSTOP
@ 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.
@ GNE_TAG_STOPPERSON_BUSSTOP
@ SUMO_TAG_PARKING_AREA
A parking area.
@ SUMO_TAG_ROUTE
begin/end of the description of a route
@ 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)
@ GNE_TAG_STOPPERSON_EDGE
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_CONTAINER_TRIGGERED
@ SUMO_ATTR_STARTPOS
@ SUMO_ATTR_PARKING
@ SUMO_ATTR_EXTENSION
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_ACTTYPE
@ SUMO_ATTR_EXPECTED
@ SUMO_ATTR_INDEX
@ SUMO_ATTR_TRIP_ID
@ SUMO_ATTR_TO
@ SUMO_ATTR_FROM
@ SUMO_ATTR_FRIENDLY_POS
@ SUMO_ATTR_EXPECTED_CONTAINERS
@ SUMO_ATTR_ROUTE
@ SUMO_ATTR_ID
@ SUMO_ATTR_UNTIL
@ SUMO_ATTR_TRIGGERED
@ SUMO_ATTR_DURATION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:46
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
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)
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
FXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toogled)
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:48
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 tagProperty associated with this Attribute Carrier
An Element which don't belongs to GNENet but has influency in the simulation.
virtual std::string getAttribute(SumoXMLAttr key) const =0
const std::string & getID() const
get ID
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
bool areValuesValid() const
check if parameters of attributes are valid
void refreshAttributesCreator()
refresh attribute creator
void showAttributesCreatorModule(GNEAttributeCarrier *templateAC, const std::vector< SumoXMLAttr > &hiddenAttributes)
show AttributesCreator modul
void getAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, bool includeAll) const
get attributes and their values
void hideNeteditAttributesModule()
hide Netedit attributes modul
bool getNeteditAttributesAndValues(CommonXMLStructure::SumoBaseObject *baseObject, const GNELane *lane) const
fill valuesMap with netedit attributes
void showNeteditAttributesModule(const GNETagProperties &tagValue)
show Netedit attributes modul
GNEViewNet * myViewNet
View Net.
Definition: GNEFrame.h:114
virtual void show()
show Frame
Definition: GNEFrame.cpp:108
virtual void hide()
hide Frame
Definition: GNEFrame.cpp:117
void setDemandElement(GNEDemandElement *demandElement)
set current demand element
const std::vector< SumoXMLTag > & getAllowedTags() const
void showDemandElementSelector()
show demand element selector
GNEDemandElement * getCurrentDemandElement() const
get current demand element
void refreshDemandElementSelector()
refresh demand element selector
void hideDemandElementSelector()
hide demand element selector
void hideTagSelector()
hide item selector
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
void showTagSelector()
show item selector
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:46
GNEEdge * getParentEdge() const
get arent edge
Definition: GNELane.cpp:113
const std::map< SumoXMLTag, std::set< GNEDemandElement * > > & getDemandElements() const
get demand elements
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition: GNENet.cpp:125
const std::string & getID() const
get ID
bool isRoute() const
check if pathElement is a route
void buildStop(const CommonXMLStructure::SumoBaseObject *sumoBaseObject, const SUMOVehicleParameter::Stop &stopParameters)
build stop
void updateHelpCreation()
update HelpCreation
void showHelpCreation()
show HelpCreation
FXLabel * myInformationLabel
Label with creation information.
Definition: GNEStopFrame.h:63
void hideHelpCreation()
hide HelpCreation
HelpCreation(GNEStopFrame *StopFrameParent)
constructor
CommonXMLStructure::SumoBaseObject * myStopParentBaseObject
stop parent base object
Definition: GNEStopFrame.h:100
void show()
show Frame
GNERouteHandler myRouteHandler
route handler
Definition: GNEStopFrame.h:97
bool getStopParameter(const SumoXMLTag stopTag, const GNELane *lane, const GNEAdditional *stoppingPlace)
get stop parameters
GNEFrameAttributeModules::AttributesCreator * myStopAttributes
internal Stop attributes
Definition: GNEStopFrame.h:109
~GNEStopFrame()
Destructor.
void demandElementSelected()
selected demand element in DemandElementSelector
HelpCreation * myHelpCreation
Help creation.
Definition: GNEStopFrame.h:115
GNEFrameModules::DemandElementSelector * myStopParentSelector
Stop parent selectors.
Definition: GNEStopFrame.h:103
void tagSelected()
Tag selected in TagSelector.
GNEStopFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
bool addStop(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const GNEViewNetHelper::MouseButtonKeyPressed &mouseButtonKeyPressed)
add Stop element
GNEFrameModules::TagSelector * myStopTagSelector
stop tag selector selector (used to select diffent kind of Stops)
Definition: GNEStopFrame.h:106
GNEFrameAttributeModules::NeteditAttributes * myNeteditAttributes
Netedit parameter.
Definition: GNEStopFrame.h:112
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
bool isStop() const
return true if tag correspond to a stop element
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
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
const GNEViewNetHelper::DemandViewOptions & getDemandViewOptions() const
get demand view options
Definition: GNEViewNet.cpp:531
void setChecked(bool val)
check or uncheck this MFXCheckableButton
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::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.
MFXCheckableButton * menuCheckShowAllTrips
show all trips
MFXCheckableButton * menuCheckShowAllPersonPlans
show all person plans
class used to group all variables related with mouse buttons and key pressed after certain events
bool shiftKeyPressed() const
check if SHIFT is pressed during current event