![]() |
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 | onCmdGroupStates (FXObject *, FXSelector, void *) |
Called when the user groups states. More... | |
long | onCmdUngroupStates (FXObject *, FXSelector, void *) |
Called when the user ungroups states. More... | |
long | onUpdUngroupStates (FXObject *, FXSelector, void *) |
Called to update the ungroups states button. 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 | onUpdNeedsSingleDef (FXObject *, FXSelector, void *) |
Called to buttons that modify link indices. 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 std::vector< std::string > & | getPredefinedTagsMML () const |
get predefinedTagsMML More... | |
void | openHelpAttributesDialog (const GNETagProperties &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 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... | |
virtual void | createPath () |
create path (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 | buildInternalLanes (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... | |
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 450 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 185 of file GNEFrame.cpp.
|
protectedvirtualinherited |
function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/...
Reimplemented in GNEVehicleTypeFrame, GNEPersonTypeFrame, and GNEInspectorFrame.
Definition at line 179 of file GNEFrame.cpp.
|
private |
builds internal lanes for the given tlDef
Definition at line 749 of file GNETLSEditorFrame.cpp.
References SUMORTree::addAdditionalGLObject(), NBTrafficLightDefinition::getControlledLinks(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNENet::getGrid(), Named::getID(), GNEJunction::getNBNode(), GNEViewNet::getNet(), NBTrafficLightDefinition::getNodes(), PositionVector::length(), MAX2(), MIN2(), PositionVector::move2side(), myInternalLanes, myTLSJunction, GNEFrame::myViewNet, NUM_POINTS, PositionVector::positionAtOffset(), SUMORTree::removeAdditionalGLObject(), PositionVector::reverse(), and toString().
Referenced by cleanup(), onCmdCleanup(), onCmdDefSwitch(), onCmdGroupStates(), and onCmdUngroupStates().
|
private |
cleans up previous lanes
Definition at line 723 of file GNETLSEditorFrame.cpp.
References buildInternalLanes(), 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 889 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getControlledLinks(), GUIGlObject::getMicrosimID(), and myEditedDef.
Referenced by GNELane::getPopUpMenu().
|
protectedvirtualinherited |
create path (can be reimplemented in frame children)
Reimplemented in GNEVehicleFrame, GNERouteFrame, GNEPersonPlanFrame, GNEPersonFrame, GNEGenericDataFrame, and GNEEdgeRelDataFrame.
Definition at line 197 of file GNEFrame.cpp.
Referenced by GNEAdditionalFrame::E2MultilaneLaneSelector::onCmdCreatePath().
|
protectedvirtualinherited |
selected demand element in DemandElementSelector
Reimplemented in GNEVehicleFrame, GNEStopFrame, GNEPersonPlanFrame, and GNEPersonFrame.
Definition at line 166 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 903 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 459 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getType(), myEditedDef, and STATIC.
Referenced by onCmdPhaseCreate(), and onCmdPhaseEdit().
|
inherited |
focus upper element of frame
Definition at line 102 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEViewNet::updateDataModeSpecificControls(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().
|
inherited |
get font of the header's frame
Definition at line 145 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 139 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 823 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogic::getPhases(), and myEditedDef.
Referenced by handleChange(), onCmdPhaseEdit(), and onCmdPhaseSwitch().
|
protectedinherited |
get predefinedTagsMML
Definition at line 269 of file GNEFrame.cpp.
References GNEFrame::myPredefinedTagsMML.
Referenced by GNEVehicleFrame::addVehicle(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverView(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::createPath(), and GNETAZFrame::shapeDrawed().
|
staticprotected |
converts to SUMOTime
Definition at line 926 of file GNETLSEditorFrame.cpp.
References TIME2STEPS.
Referenced by GNETLSEditorFrame::TLSAttributes::getOffset(), onCmdPhaseCreate(), and onCmdPhaseEdit().
|
inherited |
get view net
Definition at line 133 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEVehicleTypeFrame::attributesEditorExtendedDialogOpened(), GNEInspectorFrame::clearInspectedAC(), GNEConnectorFrame::ConnectionLegend::ConnectionLegend(), GNEInternalLane::drawGL(), GNEInternalLane::getPopUpMenu(), GNESingleParametersDialog::GNESingleParametersDialog(), GNEMultipleParametersDialog::onCmdAccept(), GNESingleParametersDialog::onCmdAccept(), GNEMultipleParametersDialog::onCmdReset(), GNESingleParametersDialog::onCmdReset(), GNEFrameModuls::PathLegend::PathLegend(), and GNEVehicleTypeFrame::show().
void GNETLSEditorFrame::handleChange | ( | GNEInternalLane * | lane | ) |
update phase definition for the current traffic light and phase
Definition at line 829 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 845 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::getControlledLinks(), GNEEdge::getLanes(), GUIGlObject::getMicrosimID(), GNEViewNet::getNet(), GNELane::getParentEdge(), GNEAttributeCarrier::isAttributeCarrierSelected(), myEditedDef, myInternalLanes, myTLSModifications, GNEFrame::myViewNet, GNENet::retrieveEdges(), GNENet::retrieveLanes(), and GNETLSEditorFrame::TLSModifications::setHaveModifications().
Referenced by GNELane::onDefault().
|
virtualinherited |
hide Frame
Reimplemented in GNETAZFrame, GNEProhibitionFrame, GNECrossingFrame, GNECreateEdgeFrame, GNEVehicleFrame, GNERouteFrame, GNEPersonPlanFrame, GNEPersonFrame, GNEGenericDataFrame, GNESelectorFrame, GNEMoveFrame, GNEInspectorFrame, and GNEDeleteFrame.
Definition at line 117 of file GNEFrame.cpp.
References GNEViewNet::getViewParent(), GNEViewParent::hideFramesArea(), and GNEFrame::myViewNet.
Referenced by GNEDeleteFrame::hide(), GNEInspectorFrame::hide(), GNEMoveFrame::hide(), GNESelectorFrame::hide(), GNEGenericDataFrame::hide(), GNEPersonFrame::hide(), GNEPersonPlanFrame::hide(), GNERouteFrame::hide(), GNEVehicleFrame::hide(), GNECreateEdgeFrame::hide(), GNECrossingFrame::hide(), GNEProhibitionFrame::hide(), GNETAZFrame::hide(), GNEAdditionalFrame::E2MultilaneLaneSelector::hideE2MultilaneLaneSelectorModul(), GNEPolygonFrame::GEOPOICreator::hideGEOPOICreatorModul(), 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 574 of file GNETLSEditorFrame.cpp.
References NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogic::getNumLinks(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, GNETLSEditorFrame::TLSModifications::setHaveModifications(), and NBTrafficLightLogic::setStateLength().
Referenced by FXDEFMAP().
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::updateViewNet().
Referenced by GNEViewNet::abortOperation(), editJunction(), FXDEFMAP(), isTLSSaved(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), and onCmdOK().
long GNETLSEditorFrame::onCmdCleanup | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user cleans up states.
Definition at line 563 of file GNETLSEditorFrame.cpp.
References buildInternalLanes(), NBLoadedSUMOTLDef::cleanupStates(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, and GNETLSEditorFrame::TLSModifications::setHaveModifications().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefAddOff | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user adds a OFF.
Definition at line 424 of file GNETLSEditorFrame.cpp.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a TLS.
Definition at line 279 of file GNETLSEditorFrame.cpp.
References NBTrafficLightDefinition::compute(), editJunction(), GNEJunction::getAttribute(), NBNode::getControllingTLS(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEJunction::getGNEIncomingEdges(), GNEJunction::getGNEOutgoingEdges(), GNEJunction::getNBNode(), OptionsCont::getOptions(), GNEViewNet::getUndoList(), NBNode::isTLControlled(), myTLSJunction, GNEFrame::myViewNet, onCmdCancel(), GNEJunction::setAttribute(), SUMO_ATTR_TYPE, toString(), TRAFFIC_LIGHT, and WRITE_DEBUG.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefDelete | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user deletes a TLS.
Definition at line 316 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNEViewNet::getUndoList(), myTLSAttributes, myTLSJunction, GNEFrame::myViewNet, onCmdCancel(), PRIORITY, GNEJunction::setAttribute(), SUMO_ATTR_TYPE, and toString().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefOffset | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user changes the offset of a TLS.
Definition at line 404 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getOffset(), myEditedDef, myTLSAttributes, myTLSModifications, GNETLSEditorFrame::TLSModifications::setHaveModifications(), and NBLoadedSUMOTLDef::setOffset().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefRename | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user renames a TLS.
Definition at line 412 of file GNETLSEditorFrame.cpp.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefSubRename | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user sub-renames a TLS.
Definition at line 418 of file GNETLSEditorFrame.cpp.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdDefSwitch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user switchs a TLS.
Definition at line 331 of file GNETLSEditorFrame.cpp.
References buildInternalLanes(), GNENet::computeJunction(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition(), Named::getID(), NBLoadedSUMOTLDef::getLogic(), NBTrafficLightLogicCont::getLogic(), GNEViewNet::getNet(), GNETLSEditorFrame::TLSAttributes::getNumberOfPrograms(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), NBTrafficLightLogic::getOffset(), NBTrafficLightDefinition::getProgramID(), 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 FXDEFMAP().
long GNETLSEditorFrame::onCmdGroupStates | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user groups states.
Definition at line 585 of file GNETLSEditorFrame.cpp.
References buildInternalLanes(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), NBLoadedSUMOTLDef::groupSignals(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, and GNETLSEditorFrame::TLSModifications::setHaveModifications().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdGuess | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the button Guess.
Definition at line 430 of file GNETLSEditorFrame.cpp.
Referenced by FXDEFMAP().
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::updateViewNet().
Referenced by FXDEFMAP(), GNEViewNet::hotkeyEnter(), and isTLSSaved().
long GNETLSEditorFrame::onCmdPhaseCreate | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user creates a Phase.
Definition at line 472 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.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdPhaseDelete | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user deletes a Phase.
Definition at line 552 of file GNETLSEditorFrame.cpp.
References NBTrafficLightLogic::deletePhase(), NBLoadedSUMOTLDef::getLogic(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), MAX2(), myEditedDef, myTLSModifications, myTLSPhases, and GNETLSEditorFrame::TLSModifications::setHaveModifications().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdPhaseEdit | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Called when the user edits a Phase.
Definition at line 622 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().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onCmdPhaseSwitch | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user switchs a Phase.
Definition at line 436 of file GNETLSEditorFrame.cpp.
References getPhases(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), LINKSTATE_DEADEND, myInternalLanes, myTLSPhases, GNEFrame::myViewNet, NBTrafficLightLogic::PhaseDefinition::state, and GNEViewNet::updateViewNet().
Referenced by FXDEFMAP(), and onCmdPhaseEdit().
long GNETLSEditorFrame::onCmdToggle | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the button Toogle.
long GNETLSEditorFrame::onCmdUngroupStates | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user ungroups states.
Definition at line 596 of file GNETLSEditorFrame.cpp.
References buildInternalLanes(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), GNETLSEditorFrame::TLSPhases::initPhaseTable(), myEditedDef, myTLSModifications, myTLSPhases, GNETLSEditorFrame::TLSModifications::setHaveModifications(), NBTrafficLightDefinition::setParticipantsInformation(), and NBLoadedSUMOTLDef::ungroupSignals().
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdDefCreate | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of create definition.
Definition at line 384 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSJunction::getCurrentJunction(), GNEJunction::getNBNode(), NBNode::isTLControlled(), myTLSJunction, and myTLSModifications.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdDefSwitch | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of switch definition.
Definition at line 359 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), myTLSAttributes, and myTLSModifications.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdModified | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of modified.
Definition at line 395 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSModifications::checkHaveModifications(), and myTLSModifications.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdNeedsDef | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of needs definition.
Definition at line 367 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), and myTLSAttributes.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdNeedsDefAndPhase | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called when occurs an update of needs definition an dphase.
Definition at line 375 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), GNETLSEditorFrame::TLSPhases::getPhaseTable(), myTLSAttributes, and myTLSPhases.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdNeedsSingleDef | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called to buttons that modify link indices.
Definition at line 608 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), and myTLSAttributes.
Referenced by FXDEFMAP().
long GNETLSEditorFrame::onUpdUngroupStates | ( | FXObject * | o, |
FXSelector | , | ||
void * | |||
) |
Called to update the ungroups states button.
Definition at line 615 of file GNETLSEditorFrame.cpp.
References GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions(), myEditedDef, myTLSAttributes, and NBLoadedSUMOTLDef::usingSignalGroups().
Referenced by FXDEFMAP().
|
protectedinherited |
Open help attributes dialog.
Definition at line 202 of file GNEFrame.cpp.
References ACCEPT, GUIIconSubSys::getIcon(), GNETagProperties::getNumberOfAttributes(), GNETagProperties::getTagStr(), GUIDesignAuxiliarHorizontalFrame, GUIDesignButtonOK, GUIDesignDialogBoxResizable, GUIDesignHorizontalSeparator, GUIDesignTableNotEditable, MAX2(), MID_TABLE, MODEINSPECT, 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 466 of file GNETLSEditorFrame.cpp.
References editJunction().
|
inherited |
set width of GNEFrame
Definition at line 126 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 172 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 GNEPolygonFrame, GNEAdditionalFrame, GNEVehicleFrame, GNEStopFrame, GNEPersonPlanFrame, and GNEPersonFrame.
Definition at line 160 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 151 of file GNEFrame.cpp.
Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().
|
staticprivate |
convert duration (potentially undefined) to string
Definition at line 817 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 116 of file GNEFrame.h.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), GNESelectorFrame::GNESelectorFrame(), and GNEInspectorFrame::inspectMultisection().
|
private |
the traffic light definition being edited
Definition at line 454 of file GNETLSEditorFrame.h.
Referenced by cleanup(), controlsEdge(), fixedDuration(), getPhases(), handleChange(), handleMultiChange(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), onCmdDefSwitch(), onCmdGroupStates(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onCmdUngroupStates(), and onUpdUngroupStates().
|
staticprivateinherited |
static Font for the Header (it's common for all headers, then create only one time)
Definition at line 132 of file GNEFrame.h.
Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().
|
privateinherited |
the label for the frame's header
Definition at line 135 of file GNEFrame.h.
Referenced by GNEFrame::focusUpperElement(), GNEFrame::getFrameHeaderLabel(), and GNEFrame::GNEFrame().
|
protectedinherited |
fame for header elements
Definition at line 119 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 122 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 125 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
Definition at line 451 of file GNETLSEditorFrame.h.
Referenced by buildInternalLanes(), handleMultiChange(), and onCmdPhaseSwitch().
|
private |
Overlapped Inspection.
Definition at line 429 of file GNETLSEditorFrame.h.
|
private |
index of the phase being shown
Definition at line 457 of file GNETLSEditorFrame.h.
|
privateinherited |
Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached)
Definition at line 138 of file GNEFrame.h.
Referenced by GNEFrame::getPredefinedTagsMML(), and GNEFrame::GNEFrame().
|
privateinherited |
scroll windows that holds the content frame
Definition at line 129 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEFrame::openHelpAttributesDialog(), and GNEFrame::setFrameWidth().
|
private |
modul for TLS attributes
Definition at line 438 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), onCmdDefDelete(), onCmdDefOffset(), onCmdDefSwitch(), onCmdOK(), onUpdDefSwitch(), onUpdNeedsDef(), onUpdNeedsDefAndPhase(), onUpdNeedsSingleDef(), and onUpdUngroupStates().
|
private |
modul for TLS Definition
Definition at line 435 of file GNETLSEditorFrame.h.
|
private |
modul for load/Save TLS Programs
Definition at line 447 of file GNETLSEditorFrame.h.
|
private |
modul for TLS Junction
Definition at line 432 of file GNETLSEditorFrame.h.
Referenced by buildInternalLanes(), cleanup(), editJunction(), onCmdCancel(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), onCmdOK(), and onUpdDefCreate().
|
private |
modul for load/Save TLS Modifications
Definition at line 441 of file GNETLSEditorFrame.h.
Referenced by cleanup(), editJunction(), handleChange(), handleMultiChange(), isTLSSaved(), onCmdAddUnused(), onCmdCleanup(), onCmdDefOffset(), onCmdGroupStates(), onCmdOK(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onCmdUngroupStates(), onUpdDefCreate(), onUpdDefSwitch(), and onUpdModified().
|
private |
modul for TLS Phases
Definition at line 444 of file GNETLSEditorFrame.h.
Referenced by cleanup(), handleChange(), onCmdAddUnused(), onCmdCleanup(), onCmdDefSwitch(), onCmdGroupStates(), onCmdPhaseCreate(), onCmdPhaseDelete(), onCmdPhaseEdit(), onCmdPhaseSwitch(), onCmdUngroupStates(), and onUpdNeedsDefAndPhase().
|
protectedinherited |
View Net.
Definition at line 113 of file GNEFrame.h.
Referenced by GNESelectorFrame::ACsToSelected(), GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNEEdgeDataFrame::addEdgeData(), GNERouteFrame::addEdgeRoute(), GNETAZFrame::addOrRemoveTAZMember(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNEStopFrame::addStop(), GNETAZRelDataFrame::addTAZRelationData(), GNEVehicleFrame::addVehicle(), GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), buildInternalLanes(), GNEPersonFrame::buildPerson(), GNEProhibitionFrame::buildProhibition(), cleanup(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNEEdgeRelDataFrame::createPath(), GNEPersonFrame::createPath(), GNEPersonPlanFrame::createPath(), GNERouteFrame::createPath(), GNEVehicleFrame::createPath(), GNETAZFrame::dropTAZMembers(), editJunction(), editTLS(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNEPersonTypeFrame::GNEPersonTypeFrame(), GNEVehicleTypeFrame::GNEVehicleTypeFrame(), handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEInspectorFrame::hide(), GNEGenericDataFrame::hide(), GNEPersonFrame::hide(), GNEPersonPlanFrame::hide(), GNERouteFrame::hide(), GNEVehicleFrame::hide(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectMultisection(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), onCmdCancel(), onCmdDefCreate(), onCmdDefDelete(), onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), onCmdOK(), onCmdPhaseSwitch(), GNEDeleteFrame::SubordinatedElements::openWarningDialog(), parseTLSPrograms(), GNEPolygonFrame::processClick(), GNECreateEdgeFrame::processClick(), GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEProhibitionFrame::ProhibitionLegend::ProhibitionLegend(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeGeometryPoint(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEDeleteFrame::selectedACsToDelete(), GNEInspectorFrame::selectedOverlappedElement(), GNEPolygonFrame::shapeDrawed(), GNETAZFrame::shapeDrawed(), GNEPersonPlanFrame::show(), GNEStopFrame::show(), and GNEFrame::show().