![]() |
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 | editJunction (GNEJunction *junction) |
edits the traffic light for the given junction 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 | setFrameWidth (int newWidth) |
set width of GNEFrame More... | |
virtual void | show () |
show Frame 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 | |
virtual bool | buildShape () |
build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if was sucesfully created More... | |
virtual void | disableModuls () |
disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs) More... | |
virtual void | enableModuls (const GNEAttributeCarrier::TagProperties &tagProperties) |
enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs) More... | |
const RGBColor & | getEdgeCandidateColor () const |
get edge candidate color More... | |
const RGBColor & | getEdgeCandidateSelectedColor () const |
get selected color More... | |
GNETLSEditorFrame () | |
FOX needs this. More... | |
void | openHelpAttributesDialog (const GNEAttributeCarrier::TagProperties &tagProperties) const |
Open help attributes dialog. More... | |
Static Protected Member Functions | |
static SUMOTime | getSUMOTime (const FXString &string) |
converts to SUMOTime More... | |
Protected Attributes | |
FXVerticalFrame * | myContentFrame |
Vertical frame that holds all widgets of frame. More... | |
FXHorizontalFrame * | myHeaderFrame |
fame for header elements More... | |
FXHorizontalFrame * | myHeaderLeftFrame |
fame for left header elements More... | |
FXHorizontalFrame * | myHeaderRightFrame |
fame for right header elements More... | |
GNEViewNet * | myViewNet |
View Net for changes. 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 | |
NBLoadedSUMOTLDef * | myEditedDef |
the traffic light definition being edited More... | |
TLIndexMap | myInternalLanes |
int | myPhaseIndex |
index of the phase being shown 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... | |
The Widget for modifying Traffic Lights (TLS)
Definition at line 41 of file GNETLSEditorFrame.h.
|
private |
the internal lanes belonging the the current junction indexed by their tl-index
Definition at line 434 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 93 of file GNETLSEditorFrame.cpp.
GNETLSEditorFrame::~GNETLSEditorFrame | ( | ) |
|
inlineprotected |
|
private |
builds internal lanes for the given tlDef
Definition at line 626 of file GNETLSEditorFrame.cpp.
References SUMORTree::addAdditionalGLObject(), NBTrafficLightDefinition::getControlledLinks(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), Named::getID(), GNEJunction::getNBNode(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), GNENet::getVisualisationSpeedUp(), PositionVector::move2side(), myInternalLanes, myTLSJunction, GNEFrame::myViewNet, NUM_POINTS, SUMORTree::removeAdditionalGLObject(), PositionVector::reverse(), and toString().
Referenced by cleanup(), and onCmdDefSwitch().
|
protectedvirtualinherited |
build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if was sucesfully created
Reimplemented in GNETAZFrame, and GNEPolygonFrame.
Definition at line 1738 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), and GNEFrame::DrawingShape::stopDrawing().
|
private |
cleans up previous lanes
Definition at line 607 of file GNETLSEditorFrame.cpp.
References buildIinternalLanes(), GNETLSEditorFrame::TLSAttributes::clearTLSAttributes(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSPhases::hideCycleDuration(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSAttributes, myTLSJunction, myTLSModifications, myTLSPhases, 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 752 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getControlledLinks(), GUIGlObject::getMicrosimID(), and myEditedDef.
Referenced by GNELane::getPopUpMenu().
|
protectedvirtualinherited |
disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs)
Reimplemented in GNEAdditionalFrame, and GNEPolygonFrame.
Definition at line 1751 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), GNEFrame::ItemSelector::onCmdSelectItem(), and GNEFrame::ItemSelector::setCurrentTypeTag().
void GNETLSEditorFrame::editJunction | ( | GNEJunction * | junction | ) |
edits the traffic light for the given junction
[in] | junction | The junction of which the traffic light shall be edited |
Definition at line 129 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEViewNet::getUndoList(), GNETLSEditorFrame::TLSAttributes::initTLSAttributes(), myTLSAttributes, myTLSJunction, myTLSModifications, GNEFrame::myViewNet, onCmdCancel(), GNEUndoList::p_begin(), GNEJunction::selectTLS(), GNETLSEditorFrame::TLSJunction::setCurrentJunction(), GNEViewNet::setStatusBarText(), and GNETLSEditorFrame::TLSJunction::updateJunctionDescription().
Referenced by onCmdDefCreate(), and GNEViewNet::onLeftBtnPress().
|
protectedvirtualinherited |
enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs)
Reimplemented in GNEAdditionalFrame, and GNEPolygonFrame.
Definition at line 1745 of file GNEFrame.cpp.
Referenced by GNEFrame::GNEFrame(), GNEFrame::ItemSelector::onCmdSelectItem(), and GNEFrame::ItemSelector::setCurrentTypeTag().
|
inherited |
focus upper element of frame
Definition at line 1689 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEInspectorFrame::processClick(), GNEViewNet::setEditMode(), and GNEViewNet::updateModeSpecificControls().
|
protectedinherited |
get edge candidate color
Definition at line 1824 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateColor.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNECrossingFrame::CrossingParameters::onCmdSetAttribute().
|
protectedinherited |
get selected color
Definition at line 1830 of file GNEFrame.cpp.
References GNEFrame::myEdgeCandidateSelectedColor.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNECrossingFrame::CrossingParameters::onCmdSetAttribute().
|
inherited |
get font of the header's frame
Definition at line 1732 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 1726 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 685 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogic::getPhases(), and myEditedDef.
Referenced by handleChange(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), onCmdPhaseEdit(), onCmdPhaseSwitch(), and GNETLSEditorFrame::TLSPhases::updateCycleDuration().
|
staticprotected |
converts to SUMOTime
Definition at line 766 of file GNETLSEditorFrame.cpp.
References TIME2STEPS.
Referenced by GNETLSEditorFrame::TLSAttributes::getOffset(), GNETLSEditorFrame(), onCmdPhaseCreate(), and onCmdPhaseEdit().
|
inherited |
get view net
Definition at line 1720 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEAdditionalFrame::SelectorLaneParents::abortConsecutiveLaneSelector(), GNEFrame::DrawingShape::abortDrawing(), GNEAdditionalFrame::SelectorLaneParents::addSelectedLane(), GNEFrame::ACHierarchy::createPopUpMenu(), GNECrossingFrame::EdgesSelector::enableEdgeSelector(), GNEAdditionalFrame::SelectorEdgeChilds::getEdgeIdsSelected(), GNEAdditionalFrame::SelectorLaneChilds::getLaneIdsSelected(), GNEConnectorFrame::ConnectionModifications::onCmdCancelModifications(), GNEFrame::ACHierarchy::onCmdCenterItem(), GNEConnectorFrame::ConnectionOperations::onCmdClearSelectedConnections(), GNEInspectorFrame::TemplateEditor::onCmdCopyTemplate(), GNEFrame::ACHierarchy::onCmdDeleteItem(), GNEFrame::GenericParametersEditor::onCmdEditGenericParameter(), GNEFrame::ACHierarchy::onCmdInspectItem(), GNESelectorFrame::SelectionOperation::onCmdInvert(), GNESelectorFrame::SelectionOperation::onCmdLoad(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), GNEInspectorFrame::OverlappedInspection::onCmdNextElement(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdOpenAttributeDialog(), GNEInspectorFrame::OverlappedInspection::onCmdPreviousElement(), GNEConnectorFrame::ConnectionOperations::onCmdResetSelectedConnections(), GNEConnectorFrame::ConnectionModifications::onCmdSaveModifications(), GNESelectorFrame::VisualScaling::onCmdScaleSelection(), GNEConnectorFrame::ConnectionOperations::onCmdSelectConflicts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadEnds(), GNEConnectorFrame::ConnectionOperations::onCmdSelectDeadStarts(), GNEConnectorFrame::ConnectionOperations::onCmdSelectPass(), GNEInspectorFrame::AttributesEditor::AttributeInput::onCmdSetAttribute(), GNECrossingFrame::CrossingParameters::onCmdSetAttribute(), GNEFrame::GenericParametersEditor::onCmdSetGenericParameter(), GNEInspectorFrame::GEOAttributesEditor::onCmdSetGEOAttribute(), GNEInspectorFrame::NeteditAttributesEditor::onCmdSetNeteditAttribute(), GNEAdditionalFrame::SelectorAdditionalParent::refreshSelectorAdditionalParentModul(), GNEDeleteFrame::removeAttributeCarrier(), GNECrossingFrame::EdgesSelector::restoreEdgeColors(), GNEFrame::ACHierarchy::showAttributeCarrierChilds(), GNEFrame::ACHierarchy::showAttributeCarrierParents(), GNEAdditionalFrame::SelectorEdgeChilds::showSelectorEdgeChildsModul(), GNEAdditionalFrame::SelectorLaneChilds::showSelectorLaneChildsModul(), GNEFrame::ACAttributes::showWarningMessage(), GNEFrame::DrawingShape::stopDrawing(), GNEAdditionalFrame::SelectorEdgeChilds::updateUseSelectedEdges(), and GNEAdditionalFrame::SelectorLaneChilds::updateUseSelectedLanes().
void GNETLSEditorFrame::handleChange | ( | GNEInternalLane * | lane | ) |
update phase definition for the current traffic light and phase
Definition at line 691 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 707 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, GNEInspectorFrame, GNESelectorFrame, GNECrossingFrame, GNEDeleteFrame, and GNEProhibitionFrame.
Definition at line 1704 of file GNEFrame.cpp.
References GNEViewNet::getViewParent(), GNEViewParent::hideFramesArea(), and GNEFrame::myViewNet.
Referenced by GNEFrame::ACHierarchy::ACHierarchy(), GNEProhibitionFrame::hide(), GNEDeleteFrame::hide(), GNECrossingFrame::hide(), GNESelectorFrame::hide(), GNEInspectorFrame::hide(), GNETAZFrame::hide(), GNEFrame::ACAttributes::hideACAttributesModul(), GNEFrame::ACHierarchy::hideACHierarchy(), GNEViewParent::Frames::hideFrames(), GNEFrame::GenericParametersEditor::hideGenericParametersEditor(), GNEPolygonFrame::GEOPOICreator::hideGEOPOICreatorModul(), GNEFrame::NeteditAttributes::hideNeteditAttributesModul(), GNEFrame::ACAttributeRow::hideParameter(), GNEAdditionalFrame::SelectorAdditionalParent::hideSelectorAdditionalParentModul(), and GNEFrame::NeteditAttributes::showNeteditAttributesModul().
bool GNETLSEditorFrame::isTLSSaved | ( | ) |
check if modifications in TLS was saved
Definition at line 144 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), myTLSModifications, onCmdCancel(), onCmdOK(), and WRITE_DEBUG.
Referenced by GNEViewNet::setEditMode().
long GNETLSEditorFrame::onCmdAddUnused | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user cleans up states.
Definition at line 526 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 234 of file GNETLSEditorFrame.cpp.
References cleanup(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEViewNet::getUndoList(), myTLSJunction, GNEFrame::myViewNet, and GNEUndoList::p_abort().
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 517 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 400 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a TLS.
Definition at line 268 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 295 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 380 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 388 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefSubRename | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user sub-renames a TLS.
Definition at line 394 of file GNETLSEditorFrame.cpp.
long GNETLSEditorFrame::onCmdDefSwitch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user switchs a TLS.
Definition at line 310 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().
Referenced by GNETLSEditorFrame::TLSAttributes::initTLSAttributes().
long GNETLSEditorFrame::onCmdGuess | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the button Guess.
Definition at line 406 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 245 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(), and GNENet::retrieveJunction().
Referenced by GNEViewNet::hotkeyEnter(), and isTLSSaved().
long GNETLSEditorFrame::onCmdPhaseCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a Phase.
Definition at line 435 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::addStep(), NBTrafficLightDefinition::computeBrakingTime(), OptionsCont::getFloat(), OptionsCont::getInt(), NBLoadedSUMOTLDef::getLogic(), NBTrafficLightDefinition::getNodes(), OptionsCont::getOptions(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), getSUMOTime(), NBTrafficLightDefinition::getType(), 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(), TIME2STEPS, and TLTYPE_STATIC.
long GNETLSEditorFrame::onCmdPhaseDelete | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user deletes a Phase.
Definition at line 506 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 537 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::addStep(), NBTrafficLightLogic::deletePhase(), NBLoadedSUMOTLDef::getLogic(), getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), getSUMOTime(), NBTrafficLightDefinition::getType(), myEditedDef, myTLSModifications, myTLSPhases, onCmdPhaseSwitch(), StringUtils::prune(), GNETLSEditorFrame::TLSModifications::setHaveModifications(), NBTrafficLightLogic::setPhaseDuration(), NBTrafficLightLogic::setPhaseMaxDuration(), NBTrafficLightLogic::setPhaseMinDuration(), STEPS2TIME, TLTYPE_STATIC, 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 412 of file GNETLSEditorFrame.cpp.
References getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), LINKSTATE_DEADEND, myInternalLanes, myTLSPhases, GNEFrame::myViewNet, and NBTrafficLightLogic::PhaseDefinition::state.
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 363 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 338 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 371 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 346 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 354 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), myTLSAttributes, and myTLSPhases.
|
protectedinherited |
Open help attributes dialog.
Definition at line 1757 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.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::AttributesEditor::onCmdAttributeHelp(), GNECrossingFrame::CrossingParameters::onCmdHelp(), GNEFrame::ACAttributes::onCmdHelp(), and GNETAZFrame::TAZParameters::onCmdHelp().
bool GNETLSEditorFrame::parseTLSPrograms | ( | const std::string & | file | ) |
parse TLS Programs from a file
Definition at line 177 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().
|
inherited |
set width of GNEFrame
Definition at line 1713 of file GNEFrame.cpp.
References GNEFrame::myScrollWindowsContents.
Referenced by GNEViewParent::Frames::setWidth().
|
virtualinherited |
show Frame
Reimplemented in GNEInspectorFrame, GNESelectorFrame, GNEAdditionalFrame, GNEPolygonFrame, GNEDeleteFrame, and GNEProhibitionFrame.
Definition at line 1695 of file GNEFrame.cpp.
References GNEViewNet::getViewParent(), GNEFrame::myViewNet, and GNEViewParent::showFramesArea().
Referenced by GNEProhibitionFrame::show(), GNEDeleteFrame::show(), GNEPolygonFrame::show(), GNEAdditionalFrame::show(), GNESelectorFrame::show(), GNEInspectorFrame::show(), GNEFrame::ACAttributes::showACAttributesModul(), GNEFrame::ACHierarchy::showACHierarchy(), GNEFrame::GenericParametersEditor::showGenericParametersEditor(), GNEFrame::NeteditAttributes::showNeteditAttributesModul(), GNEFrame::ACAttributeRow::showParameter(), GNEAdditionalFrame::showSelectorLaneChildsModul(), GNETAZFrame::TAZChildDefaultParameters::showTAZChildDefaultParametersModul(), GNETAZFrame::TAZCommonStatistics::showTAZCommonStatisticsModul(), GNETAZFrame::TAZEdgesGraphic::showTAZEdgesGraphicModul(), GNETAZFrame::TAZSaveChanges::showTAZSaveChangesModul(), GNETAZFrame::TAZSelectionStatistics::showTAZSelectionStatisticsModul(), GNETLSEditorFrame::TLSDefinition::TLSDefinition(), GNETLSEditorFrame::TLSFile::TLSFile(), GNETLSEditorFrame::TLSJunction::TLSJunction(), GNETLSEditorFrame::TLSModifications::TLSModifications(), GNETLSEditorFrame::TLSPhases::TLSPhases(), and GNEViewNet::updateModeSpecificControls().
|
staticprivate |
convert duration (potentially undefined) to string
Definition at line 679 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 615 of file GNEFrame.h.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), GNEProhibitionFrame::GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().
|
private |
the traffic light definition being edited
Definition at line 438 of file GNETLSEditorFrame.h.
Referenced by cleanup(), controlsEdge(), getPhases(), handleChange(), handleMultiChange(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), onCmdDefSwitch(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), and GNETLSEditorFrame::TLSFile::onCmdSaveTLSProgram().
|
protectedinherited |
fame for header elements
Definition at line 618 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 621 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 624 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
Definition at line 435 of file GNETLSEditorFrame.h.
Referenced by buildIinternalLanes(), handleMultiChange(), and onCmdPhaseSwitch().
|
private |
index of the phase being shown
Definition at line 441 of file GNETLSEditorFrame.h.
|
private |
modul for TLS attributes
Definition at line 422 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), onCmdDefDelete(), onCmdDefOffset(), onCmdDefSwitch(), onCmdOK(), onUpdDefSwitch(), GNETLSEditorFrame::TLSFile::onUpdNeedsDef(), onUpdNeedsDef(), and onUpdNeedsDefAndPhase().
|
private |
modul for TLS Definition
Definition at line 419 of file GNETLSEditorFrame.h.
|
private |
modul for load/Save TLS Programs
Definition at line 431 of file GNETLSEditorFrame.h.
|
private |
modul for TLS Junction
Definition at line 416 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 425 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), handleChange(), handleMultiChange(), isTLSSaved(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onUpdDefCreate(), onUpdDefSwitch(), onUpdModified(), and GNETLSEditorFrame::TLSJunction::updateJunctionDescription().
|
private |
modul for TLS Phases
Definition at line 428 of file GNETLSEditorFrame.h.
Referenced by cleanup(), handleChange(), onCmdAddUnused(), onCmdCleanup(), onCmdDefSwitch(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onCmdPhaseSwitch(), and onUpdNeedsDefAndPhase().
|
protectedinherited |
View Net for changes.
Definition at line 612 of file GNEFrame.h.
Referenced by GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNETAZFrame::addOrRemoveTAZMember(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNETAZFrame::TAZCurrent::addTAZChild(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), buildIinternalLanes(), GNEPolygonFrame::buildShape(), GNETAZFrame::buildShape(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETAZFrame::dropTAZMembers(), editJunction(), GNETAZFrame::TAZSaveChanges::enableButtonsAndBeginUndoList(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::NeteditAttributes::getNeteditAttributesAndValues(), GNEFrame::getViewNet(), handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEInspectorFrame::hide(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), onCmdCancel(), GNETAZFrame::TAZSaveChanges::onCmdCancelChanges(), GNECrossingFrame::CreateCrossing::onCmdCreateCrossing(), GNEPolygonFrame::GEOPOICreator::onCmdCreateGEOPOI(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram(), onCmdOK(), onCmdPhaseSwitch(), GNESelectorFrame::SelectionOperation::onCmdSave(), GNETAZFrame::TAZSaveChanges::onCmdSaveChanges(), GNETAZFrame::TAZSelectionStatistics::onCmdSelectEdges(), GNETAZFrame::TAZSelectionStatistics::onCmdSetNewValues(), GNETAZFrame::TAZChildDefaultParameters::onCmdUseSelectedEdges(), parseTLSPrograms(), GNEPolygonFrame::processClick(), GNEInspectorFrame::processClick(), GNEAdditionalFrame::removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNETAZFrame::TAZCurrent::setTAZ(), GNEDeleteFrame::show(), GNEFrame::show(), GNEAdditionalFrame::SelectorLaneParents::stopConsecutiveLaneSelector(), and GNETAZFrame::TAZEdgesGraphic::updateEdgeColors().