![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNETLSEditorFrame.h>
Data Structures | |
class | TLSAttributes |
class | TLSDefinition |
class | TLSFile |
class | TLSJunction |
FOX-declaration. More... | |
class | TLSModifications |
class | TLSPhases |
Public Member Functions | |
bool | controlsEdge (GNEEdge *edge) const |
whether the given edge is controlled by the currently edited tlDef More... | |
void | editTLS (const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor) |
edits the traffic light for the given clicked junction More... | |
bool | fixedDuration () const |
whether the current traffic light uses fixed phase durations More... | |
void | focusUpperElement () |
focus upper element of frame More... | |
FXFont * | getFrameHeaderFont () const |
get font of the header's frame More... | |
FXLabel * | getFrameHeaderLabel () const |
get the label for the frame's header More... | |
GNEViewNet * | getViewNet () const |
get view net More... | |
GNETLSEditorFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet) | |
Constructor. More... | |
void | handleChange (GNEInternalLane *lane) |
update phase definition for the current traffic light and phase More... | |
void | handleMultiChange (GNELane *lane, FXObject *obj, FXSelector sel, void *data) |
update phase definition for the current traffic light and phase More... | |
virtual void | hide () |
hide Frame More... | |
bool | isTLSSaved () |
check if modifications in TLS was saved More... | |
bool | parseTLSPrograms (const std::string &file) |
parse TLS Programs from a file More... | |
void | selectedOverlappedElement (GNEAttributeCarrier *AC) |
open AttributesCreator extended dialog (can be reimplemented in frame children) More... | |
void | setFrameWidth (int newWidth) |
set width of GNEFrame More... | |
void | show () |
show inspector frame More... | |
virtual void | updateFrameAfterUndoRedo () |
function called after undo/redo in the current frame (can be reimplemented in frame children) More... | |
~GNETLSEditorFrame () | |
Destructor. More... | |
FOX-callbacks | |
Called when the user presses the OK-Button
| |
long | onCmdOK (FXObject *, FXSelector, void *) |
long | onCmdCancel (FXObject *, FXSelector, void *) |
Called when the user presses the Cancel-button. More... | |
long | onCmdToggle (FXObject *, FXSelector, void *) |
Called when the user presses the button Toogle. More... | |
long | onCmdGuess (FXObject *, FXSelector, void *) |
Called when the user presses the button Guess. More... | |
long | onCmdDefCreate (FXObject *, FXSelector, void *) |
Called when the user creates a TLS. More... | |
long | onCmdDefDelete (FXObject *, FXSelector, void *) |
Called when the user deletes a TLS. More... | |
long | onCmdDefOffset (FXObject *, FXSelector, void *) |
Called when the user changes the offset of a TLS. More... | |
long | onCmdDefSwitch (FXObject *, FXSelector, void *) |
Called when the user switchs a TLS. More... | |
long | onCmdDefRename (FXObject *, FXSelector, void *) |
Called when the user renames a TLS. More... | |
long | onCmdDefSubRename (FXObject *, FXSelector, void *) |
Called when the user sub-renames a TLS. More... | |
long | onCmdDefAddOff (FXObject *, FXSelector, void *) |
Called when the user adds a OFF. More... | |
long | onCmdPhaseSwitch (FXObject *, FXSelector, void *) |
Called when the user switchs a Phase. More... | |
long | onCmdPhaseCreate (FXObject *, FXSelector, void *) |
Called when the user creates a Phase. More... | |
long | onCmdPhaseDelete (FXObject *, FXSelector, void *) |
Called when the user deletes a Phase. More... | |
long | onCmdCleanup (FXObject *, FXSelector, void *) |
Called when the user cleans up states. More... | |
long | onCmdAddUnused (FXObject *, FXSelector, void *) |
Called when the user cleans up states. More... | |
long | onCmdPhaseEdit (FXObject *, FXSelector, void *) |
Called when the user edits a Phase. More... | |
long | onCmdMakeRILSAConforming (FXObject *, FXSelector, void *) |
Called when the user makes RILSA. More... | |
long | onUpdDefSwitch (FXObject *, FXSelector, void *) |
Called when occurs an update of switch definition. More... | |
long | onUpdNeedsDef (FXObject *, FXSelector, void *) |
Called when occurs an update of needs definition. More... | |
long | onUpdNeedsDefAndPhase (FXObject *, FXSelector, void *) |
Called when occurs an update of needs definition an dphase. More... | |
long | onUpdDefCreate (FXObject *, FXSelector, void *) |
Called when occurs an update of create definition. More... | |
long | onUpdModified (FXObject *, FXSelector, void *) |
Called when occurs an update of modified. More... | |
Protected Member Functions | |
void | editJunction (GNEJunction *junction) |
edits the traffic light for the given junction More... | |
const RGBColor & | getEdgeCandidateColor () const |
get edge candidate color More... | |
const RGBColor & | getEdgeCandidateSelectedColor () const |
get selected color More... | |
const std::map< int, std::string > & | getPredefinedTagsMML () const |
get predefinedTagsMML More... | |
void | openHelpAttributesDialog (const GNEAttributeCarrier::TagProperties &tagProperties) const |
Open help attributes dialog. More... | |
functions called by moduls that can be reimplemented in frame children | |
virtual void | tagSelected () |
Tag selected in TagSelector. More... | |
virtual void | demandElementSelected () |
selected demand element in DemandElementSelector More... | |
virtual void | edgePathCreated () |
finish edge path creation More... | |
virtual bool | shapeDrawed () |
build a shaped element using the drawed shape (can be reimplemented in frame children) More... | |
virtual void | attributeUpdated () |
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/... More... | |
virtual void | attributesEditorExtendedDialogOpened () |
open AttributesCreator extended dialog (can be reimplemented in frame children) More... | |
Static Protected Member Functions | |
static SUMOTime | getSUMOTime (const FXString &string) |
converts to SUMOTime More... | |
Protected Attributes | |
FXVerticalFrame * | myContentFrame = nullptr |
Vertical frame that holds all widgets of frame. More... | |
FXHorizontalFrame * | myHeaderFrame = nullptr |
fame for header elements More... | |
FXHorizontalFrame * | myHeaderLeftFrame = nullptr |
fame for left header elements More... | |
FXHorizontalFrame * | myHeaderRightFrame = nullptr |
fame for right header elements More... | |
GNEViewNet * | myViewNet = nullptr |
View Net. More... | |
Private Types | |
typedef std::map< int, std::vector< GNEInternalLane * > > | TLIndexMap |
the internal lanes belonging the the current junction indexed by their tl-index More... | |
Private Member Functions | |
void | buildIinternalLanes (NBTrafficLightDefinition *tlDef) |
builds internal lanes for the given tlDef More... | |
void | cleanup () |
cleans up previous lanes More... | |
const std::vector< NBTrafficLightLogic::PhaseDefinition > & | getPhases () |
the phase of the current traffic light More... | |
Static Private Member Functions | |
static std::string | varDurString (SUMOTime dur) |
convert duration (potentially undefined) to string More... | |
Private Attributes | |
RGBColor | myEdgeCandidateColor |
edge candidate color (used by some modulds to mark edges) More... | |
RGBColor | myEdgeCandidateSelectedColor |
selected edge candidate color (used by some modulds to selected mark edges) More... | |
NBLoadedSUMOTLDef * | myEditedDef |
the traffic light definition being edited More... | |
FXLabel * | myFrameHeaderLabel = nullptr |
the label for the frame's header More... | |
TLIndexMap | myInternalLanes |
GNEFrameModuls::OverlappedInspection * | myOverlappedInspection |
Overlapped Inspection. More... | |
int | myPhaseIndex |
index of the phase being shown More... | |
std::map< int, std::string > | myPredefinedTagsMML |
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached) More... | |
FXScrollWindow * | myScrollWindowsContents = nullptr |
scroll windows that holds the content frame More... | |
GNETLSEditorFrame::TLSAttributes * | myTLSAttributes |
modul for TLS attributes More... | |
GNETLSEditorFrame::TLSDefinition * | myTLSDefinition |
modul for TLS Definition More... | |
GNETLSEditorFrame::TLSFile * | myTLSFile |
modul for load/Save TLS Programs More... | |
GNETLSEditorFrame::TLSJunction * | myTLSJunction |
modul for TLS Junction More... | |
GNETLSEditorFrame::TLSModifications * | myTLSModifications |
modul for load/Save TLS Modifications More... | |
GNETLSEditorFrame::TLSPhases * | myTLSPhases |
modul for TLS Phases More... | |
Static Private Attributes | |
static FXFont * | myFrameHeaderFont = nullptr |
static Font for the Header (it's common for all headers, then create only one time) More... | |
The Widget for modifying Traffic Lights (TLS)
Definition at line 40 of file GNETLSEditorFrame.h.
|
private |
the internal lanes belonging the the current junction indexed by their tl-index
Definition at line 447 of file GNETLSEditorFrame.h.
GNETLSEditorFrame::GNETLSEditorFrame | ( | FXHorizontalFrame * | horizontalFrameParent, |
GNEViewNet * | viewNet | ||
) |
Constructor.
parent FXHorizontalFrame in which this GNEFrame is placed
viewNet viewNet that uses this GNEFrame
Definition at line 91 of file GNETLSEditorFrame.cpp.
References SUMO_TAG_JUNCTION.
GNETLSEditorFrame::~GNETLSEditorFrame | ( | ) |
|
protectedvirtualinherited |
open AttributesCreator extended dialog (can be reimplemented in frame children)
Reimplemented in GNEVehicleTypeFrame.
Definition at line 190 of file GNEFrame.cpp.
|
protectedvirtualinherited |
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/...
Reimplemented in GNEInspectorFrame, GNEVehicleTypeFrame, and GNEPersonTypeFrame.
Definition at line 184 of file GNEFrame.cpp.
|
private |
builds internal lanes for the given tlDef
Definition at line 685 of file GNETLSEditorFrame.cpp.
References SUMORTree::addAdditionalGLObject(), NBTrafficLightDefinition::getControlledLinks(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), Named::getID(), GNEJunction::getNBNode(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), GNENet::getVisualisationSpeedUp(), PositionVector::length(), MAX2(), MIN2(), PositionVector::move2side(), myInternalLanes, myTLSJunction, GNEFrame::myViewNet, NUM_POINTS, PositionVector::positionAtOffset(), SUMORTree::removeAdditionalGLObject(), PositionVector::reverse(), and toString().
Referenced by cleanup(), and onCmdDefSwitch().
|
private |
cleans up previous lanes
Definition at line 661 of file GNETLSEditorFrame.cpp.
References buildIinternalLanes(), GNETLSEditorFrame::TLSAttributes::clearTLSAttributes(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNETLSEditorFrame::TLSPhases::hideCycleDuration(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSAttributes, myTLSJunction, myTLSModifications, myTLSPhases, GNEFrame::myViewNet, GNENet::retrieveJunction(), GNEJunction::selectTLS(), GNETLSEditorFrame::TLSJunction::setCurrentJunction(), GNETLSEditorFrame::TLSModifications::setHaveModifications(), and GNETLSEditorFrame::TLSJunction::updateJunctionDescription().
Referenced by onCmdCancel(), onCmdOK(), and ~GNETLSEditorFrame().
bool GNETLSEditorFrame::controlsEdge | ( | GNEEdge * | edge | ) | const |
whether the given edge is controlled by the currently edited tlDef
Definition at line 818 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getControlledLinks(), GUIGlObject::getMicrosimID(), and myEditedDef.
Referenced by GNELane::getPopUpMenu().
|
protectedvirtualinherited |
selected demand element in DemandElementSelector
Reimplemented in GNEPersonPlanFrame, GNEStopFrame, GNEVehicleFrame, and GNEPersonFrame.
Definition at line 165 of file GNEFrame.cpp.
|
protectedvirtualinherited |
finish edge path creation
Reimplemented in GNEVehicleFrame, and GNEPersonFrame.
Definition at line 171 of file GNEFrame.cpp.
|
protected |
edits the traffic light for the given junction
[in] | junction | The junction of which the traffic light shall be edited |
Definition at line 832 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNEViewNet::getUndoList(), GNETLSEditorFrame::TLSAttributes::initTLSAttributes(), myTLSAttributes, myTLSJunction, myTLSModifications, GNEFrame::myViewNet, onCmdCancel(), GNEUndoList::p_begin(), GNENet::retrieveJunction(), GNEJunction::selectTLS(), GNETLSEditorFrame::TLSJunction::setCurrentJunction(), GNEViewNet::setStatusBarText(), and GNETLSEditorFrame::TLSJunction::updateJunctionDescription().
Referenced by editTLS(), onCmdDefCreate(), and selectedOverlappedElement().
void GNETLSEditorFrame::editTLS | ( | const Position & | clickedPosition, |
const GNEViewNetHelper::ObjectsUnderCursor & | objectsUnderCursor | ||
) |
edits the traffic light for the given clicked junction
[in] | clickedPosition | clicked position |
[in] | objectsUnderCursor | The clicked objects under cursor |
Definition at line 137 of file GNETLSEditorFrame.cpp.
References editJunction(), GNEViewNetHelper::ObjectsUnderCursor::getJunctionFront(), GNEFrameModuls::OverlappedInspection::getNumberOfOverlappedACs(), GNEFrameModuls::OverlappedInspection::hideOverlappedInspection(), myOverlappedInspection, GNEFrame::myViewNet, GNEViewNet::setStatusBarText(), and GNEFrameModuls::OverlappedInspection::showOverlappedInspection().
Referenced by GNEViewNet::processLeftButtonPressNetwork().
bool GNETLSEditorFrame::fixedDuration | ( | ) | const |
whether the current traffic light uses fixed phase durations
Definition at line 446 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getType(), myEditedDef, and TLTYPE_STATIC.
Referenced by onCmdPhaseCreate(), and onCmdPhaseEdit().
|
inherited |
focus upper element of frame
Definition at line 101 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().
|
protectedinherited |
get edge candidate color
Definition at line 269 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateColor.
Referenced by GNECrossingFrame::GNECrossingFrame().
|
protectedinherited |
get selected color
Definition at line 275 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateSelectedColor.
Referenced by GNECrossingFrame::GNECrossingFrame().
|
inherited |
get font of the header's frame
Definition at line 144 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 138 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEProhibitionFrame::GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().
|
private |
the phase of the current traffic light
Definition at line 752 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogic::getPhases(), and myEditedDef.
Referenced by handleChange(), onCmdPhaseEdit(), and onCmdPhaseSwitch().
|
protectedinherited |
get predefinedTagsMML
Definition at line 281 of file GNEFrame.cpp.
References GNEFrame::myPredefinedTagsMML.
Referenced by GNEVehicleFrame::addVehicle(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::edgePathCreated(), and GNETAZFrame::shapeDrawed().
|
staticprotected |
converts to SUMOTime
Definition at line 855 of file GNETLSEditorFrame.cpp.
References TIME2STEPS.
Referenced by GNETLSEditorFrame::TLSAttributes::getOffset(), onCmdPhaseCreate(), and onCmdPhaseEdit().
|
inherited |
get view net
Definition at line 132 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEInternalLane::drawGL(), GNEInternalLane::getPopUpMenu(), and GNEDeleteFrame::removeAttributeCarrier().
void GNETLSEditorFrame::handleChange | ( | GNEInternalLane * | lane | ) |
update phase definition for the current traffic light and phase
Definition at line 758 of file GNETLSEditorFrame.cpp.
References GNEViewNet::changeAllPhases(), GNEInternalLane::getLinkState(), NBLoadedSUMOTLDef::getLogic(), getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNEInternalLane::getTLIndex(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, GNEFrame::myViewNet, GNETLSEditorFrame::TLSModifications::setHaveModifications(), and NBTrafficLightLogic::setPhaseState().
Referenced by GNEInternalLane::onDefault().
void GNETLSEditorFrame::handleMultiChange | ( | GNELane * | lane, |
FXObject * | obj, | ||
FXSelector | sel, | ||
void * | data | ||
) |
update phase definition for the current traffic light and phase
Definition at line 774 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getControlledLinks(), GNEEdge::getLanes(), GUIGlObject::getMicrosimID(), GNEViewNet::getNet(), GNELane::getParentEdge(), GNENetElement::isAttributeCarrierSelected(), myEditedDef, myInternalLanes, myTLSModifications, GNEFrame::myViewNet, GNENet::retrieveEdges(), GNENet::retrieveLanes(), and GNETLSEditorFrame::TLSModifications::setHaveModifications().
Referenced by GNELane::onDefault().
|
virtualinherited |
hide Frame
Reimplemented in GNETAZFrame, GNESelectorFrame, GNEInspectorFrame, GNERouteFrame, GNECrossingFrame, GNEPersonPlanFrame, GNEProhibitionFrame, GNEDeleteFrame, and GNECreateEdgeFrame.
Definition at line 116 of file GNEFrame.cpp.
References GNEViewNet::getViewParent(), GNEViewParent::hideFramesArea(), and GNEFrame::myViewNet.
Referenced by GNECreateEdgeFrame::hide(), GNEDeleteFrame::hide(), GNEProhibitionFrame::hide(), GNEPersonPlanFrame::hide(), GNECrossingFrame::hide(), GNERouteFrame::hide(), GNEInspectorFrame::hide(), GNESelectorFrame::hide(), GNETAZFrame::hide(), GNEPolygonFrame::GEOPOICreator::hideGEOPOICreatorModul(), GNEPersonFrame::HelpCreation::hideHelpCreation(), GNEVehicleFrame::HelpCreation::hideHelpCreation(), GNEStopFrame::HelpCreation::hideHelpCreation(), GNEPersonTypeFrame::PersonTypeEditor::hidePersonTypeEditorModul(), and GNEVehicleTypeFrame::VehicleTypeEditor::hideVehicleTypeEditorModul().
bool GNETLSEditorFrame::isTLSSaved | ( | ) |
check if modifications in TLS was saved
Definition at line 155 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), myTLSModifications, onCmdCancel(), onCmdOK(), and WRITE_DEBUG.
long GNETLSEditorFrame::onCmdAddUnused | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user cleans up states.
Definition at line 549 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogic::getNumLinks(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, GNETLSEditorFrame::TLSModifications::setHaveModifications(), and NBTrafficLightLogic::setStateLength().
long GNETLSEditorFrame::onCmdCancel | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Cancel-button.
Definition at line 245 of file GNETLSEditorFrame.cpp.
References cleanup(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEViewNet::getUndoList(), myTLSJunction, GNEFrame::myViewNet, GNEUndoList::p_abort(), and GNEViewNet::update().
Referenced by GNEViewNet::abortOperation(), editJunction(), isTLSSaved(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), and onCmdOK().
long GNETLSEditorFrame::onCmdCleanup | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user cleans up states.
Definition at line 540 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::cleanupStates(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, and GNETLSEditorFrame::TLSModifications::setHaveModifications().
long GNETLSEditorFrame::onCmdDefAddOff | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user adds a OFF.
Definition at line 411 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a TLS.
Definition at line 279 of file GNETLSEditorFrame.cpp.
References editJunction(), GNEJunction::getAttribute(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEJunction::getGNEIncomingEdges(), GNEJunction::getGNEOutgoingEdges(), GNEViewNet::getUndoList(), myTLSJunction, GNEFrame::myViewNet, NODETYPE_TRAFFIC_LIGHT, onCmdCancel(), GNEJunction::setAttribute(), SUMO_ATTR_TYPE, toString(), and WRITE_DEBUG.
long GNETLSEditorFrame::onCmdDefDelete | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user deletes a TLS.
Definition at line 306 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNEViewNet::getUndoList(), myTLSAttributes, myTLSJunction, GNEFrame::myViewNet, NODETYPE_PRIORITY, onCmdCancel(), GNEJunction::setAttribute(), SUMO_ATTR_TYPE, and toString().
long GNETLSEditorFrame::onCmdDefOffset | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user changes the offset of a TLS.
Definition at line 391 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getOffset(), myEditedDef, myTLSAttributes, myTLSModifications, GNETLSEditorFrame::TLSModifications::setHaveModifications(), and NBLoadedSUMOTLDef::setOffset().
long GNETLSEditorFrame::onCmdDefRename | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user renames a TLS.
Definition at line 399 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefSubRename | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user sub-renames a TLS.
Definition at line 405 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefSwitch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user switchs a TLS.
Definition at line 321 of file GNETLSEditorFrame.cpp.
References buildIinternalLanes(), GNENet::computeJunction(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogicCont::getLogic(), GNEViewNet::getNet(), GNETLSEditorFrame::TLSAttributes::getNumberOfPrograms(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), NBTrafficLightLogic::getOffset(), GNENet::getTLLogicCont(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSAttributes, myTLSJunction, myTLSPhases, GNEFrame::myViewNet, onCmdCancel(), GNETLSEditorFrame::TLSAttributes::setOffset(), GNEViewNet::setStatusBarText(), GNETLSEditorFrame::TLSPhases::showCycleDuration(), and GNETLSEditorFrame::TLSPhases::updateCycleDuration().
long GNETLSEditorFrame::onCmdGuess | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the button Guess.
Definition at line 417 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdMakeRILSAConforming | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user makes RILSA.
long GNETLSEditorFrame::onCmdOK | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Definition at line 256 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), cleanup(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), GNEViewNet::getUndoList(), myEditedDef, myTLSAttributes, myTLSJunction, myTLSModifications, GNEFrame::myViewNet, onCmdCancel(), GNEUndoList::p_end(), GNENet::retrieveJunction(), and GNEViewNet::update().
Referenced by GNEViewNet::hotkeyEnter(), and isTLSSaved().
long GNETLSEditorFrame::onCmdPhaseCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a Phase.
Definition at line 459 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::addStep(), NBTrafficLightDefinition::computeBrakingTime(), fixedDuration(), OptionsCont::getFloat(), OptionsCont::getInt(), NBLoadedSUMOTLDef::getLogic(), NBTrafficLightDefinition::getNodes(), OptionsCont::getOptions(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), getSUMOTime(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), OptionsCont::isDefault(), LINKSTATE_TL_GREEN_MAJOR, LINKSTATE_TL_GREEN_MINOR, LINKSTATE_TL_RED, LINKSTATE_TL_YELLOW_MAJOR, LINKSTATE_TL_YELLOW_MINOR, MAX2(), myEditedDef, myTLSModifications, myTLSPhases, GNETLSEditorFrame::TLSModifications::setHaveModifications(), NBTrafficLightDefinition::setParticipantsInformation(), and TIME2STEPS.
long GNETLSEditorFrame::onCmdPhaseDelete | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user deletes a Phase.
Definition at line 529 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::deletePhase(), NBLoadedSUMOTLDef::getLogic(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), MAX2(), myEditedDef, myTLSModifications, myTLSPhases, and GNETLSEditorFrame::TLSModifications::setHaveModifications().
long GNETLSEditorFrame::onCmdPhaseEdit | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Called when the user edits a Phase.
Definition at line 560 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::addStep(), GNEAttributeCarrier::canParse(), NBTrafficLightLogic::deletePhase(), NBTrafficLightLogic::PhaseDefinition::duration, fixedDuration(), NBLoadedSUMOTLDef::getLogic(), getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), getSUMOTime(), myEditedDef, myTLSModifications, myTLSPhases, NBTrafficLightLogic::PhaseDefinition::name, NBTrafficLightLogic::PhaseDefinition::next, onCmdPhaseSwitch(), StringUtils::prune(), GNETLSEditorFrame::TLSModifications::setHaveModifications(), NBTrafficLightLogic::setPhaseDuration(), NBTrafficLightLogic::setPhaseMaxDuration(), NBTrafficLightLogic::setPhaseMinDuration(), NBTrafficLightLogic::setPhaseName(), NBTrafficLightLogic::setPhaseNext(), STEPS2TIME, toString(), NBTrafficLightDefinition::UNSPECIFIED_DURATION, GNETLSEditorFrame::TLSPhases::updateCycleDuration(), and varDurString().
long GNETLSEditorFrame::onCmdPhaseSwitch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user switchs a Phase.
Definition at line 423 of file GNETLSEditorFrame.cpp.
References getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), LINKSTATE_DEADEND, myInternalLanes, myTLSPhases, GNEFrame::myViewNet, NBTrafficLightLogic::PhaseDefinition::state, and GNEViewNet::update().
Referenced by onCmdPhaseEdit().
long GNETLSEditorFrame::onCmdToggle | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the button Toogle.
long GNETLSEditorFrame::onUpdDefCreate | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of create definition.
Definition at line 374 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), myTLSJunction, and myTLSModifications.
long GNETLSEditorFrame::onUpdDefSwitch | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of switch definition.
Definition at line 349 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), myTLSAttributes, and myTLSModifications.
long GNETLSEditorFrame::onUpdModified | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of modified.
Definition at line 382 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), and myTLSModifications.
long GNETLSEditorFrame::onUpdNeedsDef | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of needs definition.
Definition at line 357 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), and myTLSAttributes.
long GNETLSEditorFrame::onUpdNeedsDefAndPhase | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of needs definition an dphase.
Definition at line 365 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), myTLSAttributes, and myTLSPhases.
|
protectedinherited |
Open help attributes dialog.
Definition at line 202 of file GNEFrame.cpp.
References GUIIconSubSys::getIcon(), GNEAttributeCarrier::TagProperties::getNumberOfAttributes(), GNEAttributeCarrier::TagProperties::getTagStr(), GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonOK, GUIDesignDialogBoxResizable, GUIDesignHorizontalSeparator, GUIDesignTableNotEditable, ICON_ACCEPT, ICON_MODEINSPECT, MAX2(), MID_TABLE, GNEFrame::myScrollWindowsContents, toString(), and WRITE_DEBUG.
bool GNETLSEditorFrame::parseTLSPrograms | ( | const std::string & | file | ) |
parse TLS Programs from a file
Definition at line 188 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogicCont::getDefinitions(), GNENet::getEdgeCont(), NBTrafficLightLogicCont::getLogic(), GNEViewNet::getNet(), GNENet::getTLLogicCont(), GNEViewNet::getUndoList(), NBTrafficLightLogicCont::insert(), GNEFrame::myViewNet, NBTrafficLightLogicCont::removeProgram(), GNENet::retrieveJunction(), XMLSubSys::runParser(), GNEViewNet::setStatusBarText(), toString(), and WRITE_WARNING.
Referenced by GNEApplicationWindow::onCmdOpenTLSPrograms().
|
virtual |
open AttributesCreator extended dialog (can be reimplemented in frame children)
Reimplemented from GNEFrame.
Definition at line 453 of file GNETLSEditorFrame.cpp.
References editJunction().
|
inherited |
set width of GNEFrame
Definition at line 125 of file GNEFrame.cpp.
References GNEFrame::myScrollWindowsContents.
|
protectedvirtualinherited |
build a shaped element using the drawed shape (can be reimplemented in frame children)
Reimplemented in GNETAZFrame, and GNEPolygonFrame.
Definition at line 177 of file GNEFrame.cpp.
|
virtual |
show inspector frame
Reimplemented from GNEFrame.
Definition at line 130 of file GNETLSEditorFrame.cpp.
References GNEFrameModuls::OverlappedInspection::hideOverlappedInspection(), myOverlappedInspection, and GNEFrame::show().
Referenced by GNETLSEditorFrame::TLSDefinition::TLSDefinition(), GNETLSEditorFrame::TLSFile::TLSFile(), GNETLSEditorFrame::TLSJunction::TLSJunction(), GNETLSEditorFrame::TLSModifications::TLSModifications(), GNETLSEditorFrame::TLSPhases::TLSPhases(), and GNEViewNet::updateNetworkModeSpecificControls().
|
protectedvirtualinherited |
Tag selected in TagSelector.
Reimplemented in GNEAdditionalFrame, GNEPersonPlanFrame, GNEPolygonFrame, GNEStopFrame, GNEVehicleFrame, and GNEPersonFrame.
Definition at line 159 of file GNEFrame.cpp.
|
virtualinherited |
function called after undo/redo in the current frame (can be reimplemented in frame children)
Reimplemented in GNEInspectorFrame.
Definition at line 150 of file GNEFrame.cpp.
Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().
|
staticprivate |
convert duration (potentially undefined) to string
Definition at line 746 of file GNETLSEditorFrame.cpp.
References STEPS2TIME, toString(), and NBTrafficLightDefinition::UNSPECIFIED_DURATION.
Referenced by GNETLSEditorFrame::TLSPhases::initPhaseTable(), and onCmdPhaseEdit().
|
protectedinherited |
Vertical frame that holds all widgets of frame.
Definition at line 124 of file GNEFrame.h.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNEInspectorFrame::inspectMultisection().
|
privateinherited |
edge candidate color (used by some modulds to mark edges)
Definition at line 146 of file GNEFrame.h.
Referenced by GNEFrame::getEdgeCandidateColor().
|
privateinherited |
selected edge candidate color (used by some modulds to selected mark edges)
Definition at line 149 of file GNEFrame.h.
Referenced by GNEFrame::getEdgeCandidateSelectedColor().
|
private |
the traffic light definition being edited
Definition at line 451 of file GNETLSEditorFrame.h.
Referenced by cleanup(), controlsEdge(), fixedDuration(), getPhases(), handleChange(), handleMultiChange(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), onCmdDefSwitch(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), and onCmdPhaseEdit().
|
staticprivateinherited |
static Font for the Header (it's common for all headers, then create only one time)
Definition at line 140 of file GNEFrame.h.
Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().
|
privateinherited |
the label for the frame's header
Definition at line 143 of file GNEFrame.h.
Referenced by GNEFrame::focusUpperElement(), GNEFrame::getFrameHeaderLabel(), and GNEFrame::GNEFrame().
|
protectedinherited |
fame for header elements
Definition at line 127 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 130 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 133 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
Definition at line 448 of file GNETLSEditorFrame.h.
Referenced by buildIinternalLanes(), handleMultiChange(), and onCmdPhaseSwitch().
|
private |
Overlapped Inspection.
Definition at line 426 of file GNETLSEditorFrame.h.
|
private |
index of the phase being shown
Definition at line 454 of file GNETLSEditorFrame.h.
|
privateinherited |
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached)
Definition at line 152 of file GNEFrame.h.
Referenced by GNEFrame::getPredefinedTagsMML(), and GNEFrame::GNEFrame().
|
privateinherited |
scroll windows that holds the content frame
Definition at line 137 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEFrame::openHelpAttributesDialog(), and GNEFrame::setFrameWidth().
|
private |
modul for TLS attributes
Definition at line 435 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), onCmdDefDelete(), onCmdDefOffset(), onCmdDefSwitch(), onCmdOK(), onUpdDefSwitch(), onUpdNeedsDef(), and onUpdNeedsDefAndPhase().
|
private |
modul for TLS Definition
Definition at line 432 of file GNETLSEditorFrame.h.
|
private |
modul for load/Save TLS Programs
Definition at line 444 of file GNETLSEditorFrame.h.
|
private |
modul for TLS Junction
Definition at line 429 of file GNETLSEditorFrame.h.
Referenced by buildIinternalLanes(), cleanup(), editJunction(), onCmdCancel(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), onCmdOK(), and onUpdDefCreate().
|
private |
modul for load/Save TLS Modifications
Definition at line 438 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), handleChange(), handleMultiChange(), isTLSSaved(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onUpdDefCreate(), onUpdDefSwitch(), and onUpdModified().
|
private |
modul for TLS Phases
Definition at line 441 of file GNETLSEditorFrame.h.
Referenced by cleanup(), handleChange(), onCmdAddUnused(), onCmdCleanup(), onCmdDefSwitch(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onCmdPhaseSwitch(), and onUpdNeedsDefAndPhase().
|
protectedinherited |
View Net.
Definition at line 121 of file GNEFrame.h.
Referenced by GNEDeleteFrame::ACsToDelete(), GNESelectorFrame::ACsToSelected(), GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNETAZFrame::addOrRemoveTAZMember(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlan(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNEStopFrame::addStop(), GNEVehicleFrame::addVehicle(), GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), buildIinternalLanes(), GNEPersonFrame::buildPerson(), GNEPersonFrame::buildPersonOverRoute(), GNEPersonFrame::buildPersonOverStop(), GNEProhibitionFrame::buildProhibition(), cleanup(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETAZFrame::dropTAZMembers(), GNEPersonFrame::edgePathCreated(), GNEVehicleFrame::edgePathCreated(), editJunction(), editTLS(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNEPersonTypeFrame::GNEPersonTypeFrame(), GNEVehicleTypeFrame::GNEVehicleTypeFrame(), handleChange(), GNERouteFrame::handleEdgeClick(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEFrame::hide(), GNEInspectorFrame::hide(), GNERouteFrame::hotkeyBackSpace(), GNERouteFrame::hotkeyEnter(), GNERouteFrame::hotkeyEsc(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), onCmdCancel(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), onCmdOK(), onCmdPhaseSwitch(), parseTLSPrograms(), GNEPersonPlanFrame::personPlanCreated(), GNECreateEdgeFrame::processClick(), GNEPolygonFrame::processClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEProhibitionFrame::ProhibitionLegend::ProhibitionLegend(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEInspectorFrame::selectedOverlappedElement(), GNEPolygonFrame::shapeDrawed(), GNETAZFrame::shapeDrawed(), GNEFrame::show(), GNEStopFrame::show(), GNEDeleteFrame::show(), and GNEPersonPlanFrame::show().