 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
16 #ifndef GNETLSEditorFrame_h
17 #define GNETLSEditorFrame_h
328 long onCmdOK(FXObject*, FXSelector,
void*);
338 long onCmdGuess(FXObject*, FXSelector,
void*);
447 typedef std::map<int, std::vector<GNEInternalLane*> >
TLIndexMap;
463 const std::vector<NBTrafficLightLogic::PhaseDefinition>&
getPhases();
void initTLSAttributes(GNEJunction *junction)
initializes the definitions and corresponding listbox
long onCmdDefOffset(FXObject *, FXSelector, void *)
Called when the user changes the offset of a TLS.
FXTextField * myTextFieldJunctionStatus
text field for junction status
GNETLSEditorFrame::TLSAttributes * myTLSAttributes
modul for TLS attributes
NBTrafficLightDefinition * getCurrentTLSDefinition() const
get current definition
GNEJunction * myCurrentJunction
the junction of the tls is being modified
GNETLSEditorFrame::TLSJunction * myTLSJunction
modul for TLS Junction
GNETLSEditorFrame::TLSPhases * myTLSPhases
modul for TLS Phases
long onUpdDefSwitch(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
long onUpdNeedsDef(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition.
long onUpdDefCreate(FXObject *, FXSelector, void *)
Called when occurs an update of create definition.
int getNumberOfTLSDefinitions() const
get number of definitions
~TLSAttributes()
destructor
long onCmdDefSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a TLS.
GNEFrameModuls::OverlappedInspection * myOverlappedInspection
Overlapped Inspection.
FXLabel * myLabelJunctionStatus
label for junction status
void initPhaseTable(int index=0)
initialies the phase table
long onCmdOK(FXObject *, FXSelector, void *)
bool isTLSSaved()
check if modifications in TLS was saved
bool checkHaveModifications() const
check if current TLS was modified
int getNumberOfPrograms() const
get number of programs
static std::string varDurString(SUMOTime dur)
convert duration (potentially undefined) to string
long onCmdPhaseDelete(FXObject *, FXSelector, void *)
Called when the user deletes a Phase.
const std::vector< NBTrafficLightLogic::PhaseDefinition > & getPhases()
the phase of the current traffic light
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNETLSEditorFrame::TLSModifications * myTLSModifications
modul for load/Save TLS Modifications
SUMOTime getOffset() const
get current offset in SUMOTIme
A traffic light logics which must be computed (only nodes/edges are given)
GNETLSEditorFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
long onUpdModified(FXObject *, FXSelector, void *)
Called when occurs an update of modified.
FXButton * myLoadTLSProgramButton
button for load TLS Programs
FXTextField * myTextFieldJunctionID
text field for junction ID
FXFont * myTableFont
font for the phase table
void cleanup()
cleans up previous lanes
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
std::string writeSUMOTime(SUMOTime steps)
convert SUMOTime into string
GNEJunction * getCurrentJunction() const
get current modified junction
FXLabel * myCycleDuration
label with the cycle duration
~TLSModifications()
destructor
void updateJunctionDescription() const
update descrition
TLSFile(GNETLSEditorFrame *TLSEditorParent)
FOX-declaration.
void setOffset(SUMOTime offset)
set new offset
void setHaveModifications(bool value)
set if current TLS was modified
FXLabel * myLabelJunctionID
label for junction ID
A road/street connecting two junctions (netedit-version)
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
long onCmdDefSubRename(FXObject *, FXSelector, void *)
Called when the user sub-renames a TLS.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
FXButton * myDeleteTLProgram
button for delete traffic light program
long onUpdNeedsDef(FXObject *, FXSelector, void *)
enable buttons, only when a tlLogic is being edited
void editTLS(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
edits the traffic light for the given clicked junction
std::vector< NBTrafficLightDefinition * > myTLSDefinitions
the list of Definitions for the current junction
long onCmdDefCreate(FXObject *, FXSelector, void *)
Called when the user creates a TLS.
~TLSDefinition()
destructor
long onCmdGuess(FXObject *, FXSelector, void *)
Called when the user presses the button Guess.
class used to group all variables related with objects under cursor after a click over view
FXButton * myNewTLProgram
button for create new Traffic light program
void setCurrentJunction(GNEJunction *junction)
set current junction
long onCmdDefDelete(FXObject *, FXSelector, void *)
Called when the user deletes a TLS.
FXTextField * myOffsetTextField
the control for modifying offset
long onCmdPhaseEdit(FXObject *, FXSelector, void *)
Called when the user edits a Phase.
long onCmdMakeRILSAConforming(FXObject *, FXSelector, void *)
Called when the user makes RILSA.
TLSDefinition(GNETLSEditorFrame *TLSEditorParent)
constructor
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
long onCmdDefRename(FXObject *, FXSelector, void *)
Called when the user renames a TLS.
FXButton * myDeleteSelectedPhaseButton
delete phase button
#define FOX_CONSTRUCTOR(classname)
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
TLSModifications(GNETLSEditorFrame *TLSEditorParent)
constructor
A point in 2D or 3D with translation and scaling methods.
FXTable * getPhaseTable() const
get phase table
void hideCycleDuration()
hide cycle duration
void show()
show inspector frame
long onCmdSaveTLSProgram(FXObject *, FXSelector, void *)
save TLS Programm to an additional file
FXLabel * myOffsetLabel
offset label
long onCmdPhaseCreate(FXObject *, FXSelector, void *)
Called when the user creates a Phase.
~GNETLSEditorFrame()
Destructor.
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
static SUMOTime getSUMOTime(const FXString &string)
converts to SUMOTime
TLSJunction(GNETLSEditorFrame *TLSEditorParent)
constructor
FXScrollWindow * myTableScroll
window for oversized phase tables
long onUpdNeedsDefAndPhase(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition an dphase.
bool fixedDuration() const
whether the current traffic light uses fixed phase durations
int myPhaseIndex
index of the phase being shown
FXComboBox * myProgramComboBox
the comboBox for selecting the tl-definition to edit
FXLabel * myNameLabel
name label
void buildIinternalLanes(NBTrafficLightDefinition *tlDef)
builds internal lanes for the given tlDef
FXButton * mySaveTLSProgramButton
button for save TLS Programs
long onCmdDefAddOff(FXObject *, FXSelector, void *)
Called when the user adds a OFF.
NBLoadedSUMOTLDef * myEditedDef
the traffic light definition being edited
GNETLSEditorFrame::TLSDefinition * myTLSDefinition
modul for TLS Definition
TLSPhases(GNETLSEditorFrame *TLSEditorParent)
constructor
GNETLSEditorFrame::TLSFile * myTLSFile
modul for load/Save TLS Programs
FXLabel * myProgramLabel
program label
FXButton * mySaveModificationsButtons
button for save modifications
FXButton * myInsertDuplicateButton
insert new phase button
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
FXTable * myPhaseTable
table for selecting and rearranging phases and for changing duration
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
long onCmdPhaseSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a Phase.
bool controlsEdge(GNEEdge *edge) const
whether the given edge is controlled by the currently edited tlDef
long onCmdLoadTLSProgram(FXObject *, FXSelector, void *)
void updateCycleDuration()
recomputes cycle duration and updates label
FXButton * myDiscardModificationsButtons
button for cancel modifications
long onCmdCleanup(FXObject *, FXSelector, void *)
Called when the user cleans up states.
long onCmdToggle(FXObject *, FXSelector, void *)
Called when the user presses the button Toogle.
bool myHaveModifications
whether the current tls was modified
long onCmdAddUnused(FXObject *, FXSelector, void *)
Called when the user cleans up states.
void showCycleDuration()
show cycle duration
TLIndexMap myInternalLanes
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
TLSAttributes(GNETLSEditorFrame *TLSEditorParent)
constructor
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
std::map< int, std::vector< GNEInternalLane * > > TLIndexMap
the internal lanes belonging the the current junction indexed by their tl-index
void clearTLSAttributes()
clear TLS attributes
The base class for traffic light logic definitions.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditorParent
FXTextField * myNameTextField
name text field
A loaded (complete) traffic light logic.