410 bool changePhaseValue(
const int col,
const int row,
const std::string& value);
413 void addPhase(
const int row,
const char c =
' ');
479 bool setDuration(
const int col,
const int row,
const std::string& value);
482 bool setState(
const int col,
const int row,
const std::string& value);
485 bool setNext(
const int row,
const std::string &value);
488 bool setName(
const int row,
const std::string& value);
491 bool setMinDur(
const int row,
const std::string& value);
494 bool setMaxDur(
const int row,
const std::string& value);
500 bool setLatestEnd(
const int row,
const std::string& value);
503 bool setVehExt(
const int row,
const std::string& value);
506 bool setYellow(
const int row,
const std::string& value);
509 bool setRed(
const int row,
const std::string& value);
An Element which don't belong to GNENet but has influence in the simulation.
A road/street connecting two junctions (netedit-version)
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
long onCmdSetParameters(FXObject *, FXSelector, void *)
Called when the user changes parameters of a TLS.
long onCmdSetOffset(FXObject *, FXSelector, void *)
bool isValidOffset()
is current offset valid
long onCmdParametersDialog(FXObject *, FXSelector, void *ptr)
Called when user press edit parameters button.
long onUpdParameters(FXObject *, FXSelector, void *)
Called when the offset is updated.
MFXToggleButtonTooltip * mySetDetectorsToggleButton
toggle button for set detectors mode
bool isSetDetectorsToggleButtonEnabled() const
toggle button for set detectors mode
bool isValidParameters()
are current parameter valid
FXTextField * myOffsetTextField
the TextField for modifying offset
void updateE1Detectors()
FOX needs this.
void disableE1DetectorMode()
disable detector mode
SUMOTime getOffset() const
get current offset in string format
long onUpdSetDetectorMode(FXObject *, FXSelector, void *)
Called when occurs an update of set detector mode.
void setParameters(const std::string ¶meters)
set new parameters
const std::map< std::string, std::string > & getE1Detectors() const
get E1 detectors vinculated with this TLS
void clearTLSAttributes()
clear TLS attributes
long onUpdOffset(FXObject *, FXSelector, void *)
Called when the offset is updated.
void setOffset(const SUMOTime &offset)
set new offset
std::map< std::string, std::string > myE1Detectors
set with E1 detector IDs and their lanes vinculated with the TLS <laneID, E1ID>
std::string getParameters() const
get current parameters in string format
bool toggleE1DetectorSelection(const GNEAdditional *E1)
select or unselect E1 detector in the current TLS
void initTLSAttributes()
initializes the definitions and corresponding listbox
FXButton * myButtonEditParameters
button for edit parameters
FXTextField * myParametersTextField
the TextField for modifying parameters
~TLSAttributes()
destructor
void hideTLSAttributes()
hide TLSAttributes
void showTLSAttributes()
show TLSAttributes
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditorParent
long onCmdToggleDetectorMode(FXObject *, FXSelector, void *ptr)
Called when user toggle set detector mode.
void createTLS(GNEJunction *junction)
FOX needs this.
void clearTLSDefinitions()
clear TLS Definitions
long onCmdDefSwitchTLSProgram(FXObject *, FXSelector, void *)
Called when the user switches a TLS.
bool switchProgram()
switch program
std::vector< NBTrafficLightDefinition * > myTLSDefinitions
the list of Definitions for the current junction
long onUpdTLSDisableResetAll(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
bool myHaveModifications
whether the current tls was modified
bool checkHaveModifications() const
check if current TLS was modified
void hideTLSDefinition()
hide TLSDefinition
long onCmdSaveChanges(FXObject *, FXSelector, void *)
Called when the user presses the save-Button.
long onCmdDiscardChanges(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
void markAsModified()
mark Program as modified
FXComboBox * myProgramComboBox
the comboBox for selecting the tl-definition to edit
const std::string getCurrentTLSProgramID() const
get current program ID
int getNumberOfTLSDefinitions() const
get number of TLS definitions
long onCmdResetCurrentProgram(FXObject *, FXSelector, void *)
Called when the user press button reset current TLS Program.
long onCmdDelete(FXObject *, FXSelector, void *)
Called when the user press button delete TLS Program.
int getNumberOfPrograms() const
get number of programs
void showTLSDefinition()
show TLSDefinition
long onUpdCreate(FXObject *, FXSelector, void *)
Called when occurs an update of create definition.
bool initTLSDefinitions()
init TLS Definitions
NBTrafficLightDefinition * getCurrentTLSDefinition() const
get current definition
~TLSDefinition()
destructor
long onCmdCreate(FXObject *, FXSelector, void *)
GNETLSEditorFrame * myTLSEditorParent
pointer to GNETLSEditorFrame parent
void discardChanges(const bool editJunctionAgain)
discard changes
long onUpdTLSEnableModified(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
long onCmdResetAll(FXObject *, FXSelector, void *)
Called when the user press button reset all TLS Programs.
FXButton * myCreateButton
button for create new Traffic light program
long onUpdTLSDisableModified(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
void showTLSFile()
show TLSPhases
void hideTLSFile()
hide TLSPhases
long onCmdLoadTLSProgram(FXObject *, FXSelector, void *)
std::string writeSUMOTime(SUMOTime steps)
convert SUMOTime into string
long onUpdButtons(FXObject *, FXSelector, void *)
enable buttons, only when a tlLogic is being edited
long onCmdSaveTLSProgram(FXObject *, FXSelector, void *)
save TLS Program to an additional file
GNETLSEditorFrame * myTLSEditorParent
FOX needs this.
long onCmdChangeType(FXObject *, FXSelector, void *)
Called when the user change TLS Type.
long onCmdDisjoinTLS(FXObject *, FXSelector, void *)
Called when the user join TLS.
std::vector< std::string > mySelectedJunctionIDs
selected junction (used for join)
GNETLSEditorFrame * myTLSEditorParent
FOX needs this.
FXHorizontalFrame * myJoinControlButtons
frame for accept/cancel buttons
const std::vector< std::string > & getSelectedJunctionIDs() const
get selected junction IDs
long onUpdTLSType(FXObject *, FXSelector, void *)
Called when occurs an update of modified.
long onCmdToggleJoinTLS(FXObject *, FXSelector, void *)
Called when the user join TLS.
std::vector< std::string > myOriginalSelectedJunctionIDs
original selected junction (used for join)
long onCmdRenameTLS(FXObject *, FXSelector, void *)
long onCmdCancelJoin(FXObject *, FXSelector, void *)
cancel join
long onUpdJoinTLS(FXObject *, FXSelector, void *)
Called when update join TLS.
MFXComboBoxIcon * myTLSTypeComboBox
ComboBox for TLS Types.
MFXToggleButtonTooltip * myJoinTLSToggleButton
Toggle button for join TLS.
void updateJunctionDescription()
update junction description
void toggleJunctionSelected(const GNEJunction *junction)
select or unselect junction in the current TLS
long onCmdAcceptJoin(FXObject *, FXSelector, void *)
accept join
GNEJunction * getCurrentJunction() const
get current modified junction
void setCurrentJunction(GNEJunction *junction)
set current junction
long onUpdDisjoinTLS(FXObject *, FXSelector, void *)
Called when update join TLS.
FXLabel * myJunctionIDLabel
label for junction ID
GNEJunction * myCurrentJunction
the junction of the tls is being modified
bool isJunctionSelected(const GNEJunction *junction) const
check if given junction is selected (used fo joining)
MFXButtonTooltip * myDisjoinTLSButton
button for disjoin TLS
bool isJoiningJunctions() const
is joining junctions
MFXTextFieldTooltip * myTLSIDTextField
text field for junction ID
long onUpdTLSID(FXObject *, FXSelector, void *)
Called when occurs an update of modified.
MFXTextFieldTooltip * myJunctionIDTextField
text field for junction ID
bool setEarliestEnd(const int row, const std::string &value)
set earliestEnd
long onCmdUngroupStates(FXObject *, FXSelector, void *)
Called when the user ungroups states.
void showTLSPhases()
show TLSPhases
GNETLSTable * myPhaseTable
table for selecting and rearranging phases and for changing duration
long onCmdCleanStates(FXObject *, FXSelector, void *)
long onCmdGroupStates(FXObject *, FXSelector, void *)
Called when the user groups states.
bool setVehExt(const int row, const std::string &value)
set vehExt
int buildDefaultPhase(const int row)
build default phase
void movePhaseDown(const int row)
move phase down
void initActuatedPhaseTable()
init actuated phase table
void initPhaseTable()
initializes the phase table
void initNEMAPhaseTable()
init NEMA phase table
bool setYellow(const int row, const std::string &value)
set yellow
bool changePhaseValue(const int col, const int row, const std::string &value)
change phase value (state, name, next, etc.)
long onUpdNeedsSingleDef(FXObject *, FXSelector, void *)
Called to buttons that modify link indices.
void initDelayBasePhaseTable()
init delayBase phase table
void movePhaseUp(const int row)
move phase up
bool setMinDur(const int row, const std::string &value)
set minDur
bool setLatestEnd(const int row, const std::string &value)
set latestEnd
void updateStateSize(const int col)
update state size
long onCmdAddUnusedStates(FXObject *, FXSelector, void *)
Called when the user cleans up states.
void initStaticPhaseTable()
FOX needs this.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
long onUpdUngroupStates(FXObject *, FXSelector, void *)
Called to update the ungroups states button.
bool setDuration(const int col, const int row, const std::string &value)
set duration
bool setMaxDur(const int row, const std::string &value)
set maxDur
long onUpdNeedsDef(FXObject *, FXSelector, void *)
enable buttons, only when a tlLogic is being edited
void updateTLSColoring()
update TLS coloring
GNETLSTable * getPhaseTable() const
get phase table
void removePhase(const int row)
delete phase
bool setRed(const int row, const std::string &value)
set red
bool setName(const int row, const std::string &value)
set name
bool setState(const int col, const int row, const std::string &value)
set state
long onUpdNeedsDefAndPhase(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition and phase.
void duplicatePhase(const int row)
duplicate phase
void addPhase(const int row, const char c=' ')
add phase
GNETLSEditorFrame * getTLSEditorParent() const
get TLSEditor Parent
bool setNext(const int row, const std::string &value)
set next
void hideTLSPhases()
hide TLSPhases
void updateCycleDuration(const int col)
recomputes cycle duration and updates label
GNETLSEditorFrame::TLSFile * myTLSFile
module for load/Save TLS Programs
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
GNEOverlappedInspection * myOverlappedInspection
Overlapped Inspection.
GNETLSEditorFrame::TLSAttributes * getTLSAttributes() const
get module for TLS attributes
GNETLSEditorFrame::TLSAttributes * myTLSAttributes
module for TLS attributes
static std::string varDurString(SUMOTime dur)
convert duration (potentially undefined) to string
bool isTLSSaved()
check if modifications in TLS was saved
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNETLSEditorFrame::TLSPhases * myTLSPhases
module for TLS Phases
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open GNEAttributesCreator extended dialog (can be reimplemented in frame children)
std::map< int, std::vector< GNEInternalLane * > > myInternalLanes
the internal lanes belonging the the current junction indexed by their tl-index
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
bool controlsEdge(GNEEdge *edge) const
whether the given edge is controlled by the currently edited tlDef
static const std::string getSteps2Time(const SUMOTime value)
converts to SUMOTime
void buildInternalLanes(const NBTrafficLightDefinition *tlDef)
builds internal lanes for the given tlDef
const NBTrafficLightLogic::PhaseDefinition & getPhase(const int index)
get certain phase of the current traffic light
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
GNETLSEditorFrame::TLSDefinition * myTLSDefinition
module for TLS Definition
GNETLSEditorFrame::TLSJunction * getTLSJunction() const
get module for TLS Junction
static SUMOTime getSUMOTime(const std::string &value)
converts to SUMOTime
~GNETLSEditorFrame()
Destructor.
NBLoadedSUMOTLDef * myEditedDef
the traffic light definition being edited
void frameWidthUpdated()
function called after setting new width in current frame
GNETLSEditorFrame::TLSJunction * myTLSJunction
module for TLS Junction
void editTLS(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
edits the traffic light for the given clicked junction
void cleanup()
cleans up previous lanes
GNETLSEditorFrame::TLSDefinition * getTLSDefinition() const
get module for TLS Definition
void show()
show inspector frame
class used to group all variables related with objects under cursor after a click over view
A single child window which contains a view of the simulation area.
MFXGroupBoxModule (based on FXGroupBox)
A loaded (complete) traffic light logic.
A traffic light logics which must be computed (only nodes/edges are given)
The base class for traffic light logic definitions.
The definition of a single phase of the logic.
A point in 2D or 3D with translation and scaling methods.