17 #ifndef GNETLSEditorFrame_h 18 #define GNETLSEditorFrame_h 130 void clearTLSAttributes();
142 int getNumberOfTLSDefinitions()
const;
145 int getNumberOfPrograms()
const;
187 FXTable* getPhaseTable()
const;
192 void initPhaseTable(
int index = 0);
195 void showCycleDuration();
198 void hideCycleDuration();
201 void updateCycleDuration();
240 bool checkHaveModifications()
const;
243 void setHaveModifications(
bool value);
277 long onCmdLoadTLSProgram(FXObject*, FXSelector,
void*);
280 long onCmdSaveTLSProgram(FXObject*, FXSelector,
void*);
301 std::string writeSUMOTime(
SUMOTime steps);
328 long onCmdOK(FXObject*, FXSelector,
void*);
338 long onCmdGuess(FXObject*, FXSelector,
void*);
434 typedef std::map<int, std::vector<GNEInternalLane*> >
TLIndexMap;
450 const std::vector<NBTrafficLightLogic::PhaseDefinition>&
getPhases();
GNETLSEditorFrame::TLSModifications * myTLSModifications
modul for load/Save TLS Modifications
TLIndexMap myInternalLanes
FXLabel * myLabelJunctionStatus
label for junction status
long onCmdGuess(FXObject *, FXSelector, void *)
Called when the user presses the button Guess.
FXLabel * myCycleDuration
label with the cycle duration
long onUpdNeedsDefAndPhase(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition an dphase.
long onCmdPhaseDelete(FXObject *, FXSelector, void *)
Called when the user deletes a Phase.
GNETLSEditorFrame::TLSPhases * myTLSPhases
modul for TLS Phases
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
int myPhaseIndex
index of the phase being shown
long onCmdDefCreate(FXObject *, FXSelector, void *)
Called when the user creates a TLS.
long onCmdMakeRILSAConforming(FXObject *, FXSelector, void *)
Called when the user makes RILSA.
FXButton * myDiscardModificationsButtons
button for cancel modifications
FXLabel * myOffsetLabel
offset label
A loaded (complete) traffic light logic.
FXFont * myTableFont
font for the phase table
GNEJunction * getCurrentJunction() const
get current modified junction
FXLabel * myNameLabel
name label
long onCmdPhaseSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a Phase.
FXTextField * myTextFieldJunctionStatus
text field for junction status
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
The base class for traffic light logic definitions.
FXComboBox * myProgramComboBox
the comboBox for selecting the tl-definition to edit
bool isTLSSaved()
check if modifications in TLS was saved
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
GNETLSEditorFrame()
FOX needs this.
FXButton * mySaveTLSProgramButton
button for save TLS Programs
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
std::map< int, std::vector< GNEInternalLane * > > TLIndexMap
the internal lanes belonging the the current junction indexed by their tl-index
FXLabel * myProgramLabel
program label
TLSJunction(GNETLSEditorFrame *TLSEditorParent)
constructor
long onUpdNeedsDef(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition.
long onCmdCleanup(FXObject *, FXSelector, void *)
Called when the user cleans up states.
bool myHaveModifications
whether the current tls was modified
long onCmdDefDelete(FXObject *, FXSelector, void *)
Called when the user deletes a TLS.
long onCmdDefOffset(FXObject *, FXSelector, void *)
Called when the user changes the offset of a TLS.
FXButton * myDeleteSelectedPhaseButton
delete phase button
long onCmdDefSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a TLS.
long onCmdDefAddOff(FXObject *, FXSelector, void *)
Called when the user adds a OFF.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
FXScrollWindow * myTableScroll
window for oversized phase tables
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditorParent
FXTextField * myNameTextField
name text field
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
GNETLSEditorFrame::TLSJunction * myTLSJunction
modul for TLS Junction
bool controlsEdge(GNEEdge &edge) const
whether the given edge is controlled by the currently edited tlDef
GNETLSEditorFrame::TLSFile * myTLSFile
modul for load/Save TLS Programs
GNETLSEditorFrame::TLSAttributes * myTLSAttributes
modul for TLS attributes
long onUpdDefCreate(FXObject *, FXSelector, void *)
Called when occurs an update of create definition.
void buildIinternalLanes(NBTrafficLightDefinition *tlDef)
builds internal lanes for the given tlDef
long onCmdPhaseEdit(FXObject *, FXSelector, void *)
Called when the user edits a Phase.
~GNETLSEditorFrame()
Destructor.
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
long onCmdAddUnused(FXObject *, FXSelector, void *)
Called when the user cleans up states.
FXTable * myPhaseTable
table for selecting and rearranging phases and for changing duration
static SUMOTime getSUMOTime(const FXString &string)
converts to SUMOTime
A road/street connecting two junctions (netedit-version)
long onUpdDefSwitch(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
GNEJunction * myCurrentJunction
the junction of the tls is being modified
static std::string varDurString(SUMOTime dur)
convert duration (potentially undefined) to string
FXButton * myLoadTLSProgramButton
button for load TLS Programs
long onCmdOK(FXObject *, FXSelector, void *)
void updateJunctionDescription() const
update descrition
long onCmdDefSubRename(FXObject *, FXSelector, void *)
Called when the user sub-renames a TLS.
const std::vector< NBTrafficLightLogic::PhaseDefinition > & getPhases()
the phase of the current traffic light
long onCmdPhaseCreate(FXObject *, FXSelector, void *)
Called when the user creates a Phase.
FXButton * mySaveModificationsButtons
button for save modifications
void setCurrentJunction(GNEJunction *junction)
set current junction
GNETLSEditorFrame::TLSDefinition * myTLSDefinition
modul for TLS Definition
A traffic light logics which must be computed (only nodes/edges are given)
FXLabel * myLabelJunctionID
label for junction ID
long onCmdDefRename(FXObject *, FXSelector, void *)
Called when the user renames a TLS.
long onUpdModified(FXObject *, FXSelector, void *)
Called when occurs an update of modified.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
FXButton * myInsertDuplicateButton
insert new phase button
FXButton * myNewTLProgram
button for create new Traffic light program
FXTextField * myOffsetTextField
the control for modifying offset
FXButton * myDeleteTLProgram
button for delete traffic light program
FXTextField * myTextFieldJunctionID
text field for junction ID
NBLoadedSUMOTLDef * myEditedDef
the traffic light definition being edited
std::vector< NBTrafficLightDefinition * > myTLSDefinitions
the list of Definitions for the current junction
void cleanup()
cleans up previous lanes
long onCmdToggle(FXObject *, FXSelector, void *)
Called when the user presses the button Toogle.