84 FXIMPLEMENT(
GNETLSEditorFrame, FXVerticalFrame, GNETLSEditorFrameMap, ARRAYNUMBER(GNETLSEditorFrameMap))
93 GNEFrame(horizontalFrameParent, viewNet, "Edit Traffic Light"),
94 myEditedDef(
nullptr) {
151 WRITE_DEBUG(
"Opening question FXMessageBox 'save TLS'");
153 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO_CANCEL,
154 "Save TLS Changes",
"%s",
155 "There is unsaved changes in current edited traffic light.\nDo you want to save it before changing mode?");
156 if (answer == MBOX_CLICKED_YES) {
158 WRITE_DEBUG(
"Closed FXMessageBox 'save TLS' with 'YES'");
162 }
else if (answer == MBOX_CLICKED_NO) {
164 WRITE_DEBUG(
"Closed FXMessageBox 'save TLS' with 'No'");
170 WRITE_DEBUG(
"Closed FXMessageBox 'save TLS' with 'Cancel'");
186 std::set<NBTrafficLightDefinition*> origDefs;
190 if (logic !=
nullptr) {
192 std::vector<NBNode*> nodes = def->getNodes();
193 for (
auto it_node : nodes) {
199 origDefs.insert(copy);
201 WRITE_WARNING(
"tlLogic '" + def->getID() +
"', program '" + def->getProgramID() +
"' could not be built");
207 std::vector<NBLoadedSUMOTLDef*> loadedTLS;
210 if (sdef !=
nullptr) {
211 loadedTLS.push_back(sdef);
215 for (
auto def : loadedTLS) {
216 if (origDefs.count(def) != 0) {
221 std::vector<NBNode*> nodes = def->getNodes();
223 for (
auto it_node : nodes) {
231 tmpTLLCont.
removeProgram(def->getID(), def->getProgramID(),
false);
253 std::vector<NBNode*> nodes = oldDefinition->
getNodes();
254 for (
auto it : nodes) {
286 WRITE_DEBUG(
"Opening warning FXMessageBox 'invalid TLS'");
288 FXMessageBox::warning(
this, MBOX_OK,
289 "TLS cannot be created",
"%s",
290 "Traffic Light cannot be created because junction must have\n at least one incoming edge and one outgoing edge.");
322 if (tllogic !=
nullptr) {
344 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
352 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
361 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
369 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
377 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
423 int tlIndex = it.first;
424 std::vector<GNEInternalLane*> lanes = it.second;
426 if (tlIndex >= 0 && tlIndex < (
int)phase.
state.size()) {
429 for (
auto it_lane : lanes) {
430 it_lane->setLinkState(state);
453 std::set<int> crossingIndices;
456 crossingIndices.insert(c->tlLinkIndex);
457 crossingIndices.insert(c->tlLinkIndex2);
462 bool haveGreen =
false;
463 bool haveYellow =
false;
464 for (
char c : state) {
472 if (haveGreen && haveYellow) {
475 for (
int i = 0; i < (int)state.size(); i++) {
482 }
else if (haveGreen) {
486 for (
int i = 0; i < (int)state.size(); i++) {
488 if (crossingIndices.count(i) == 0) {
495 }
else if (haveYellow) {
498 for (
int i = 0; i < (int)state.size(); i++) {
549 FXTablePos* tp = (FXTablePos*)ptr;
551 const int colDuration = 0;
558 if (tp->col == colDuration) {
560 if (GNEAttributeCarrier::canParse<double>(value.text())) {
571 }
else if (tp->col == colMinDur) {
573 if (GNEAttributeCarrier::canParse<double>(value.text())) {
587 }
else if (tp->col == colMaxDur) {
589 if (GNEAttributeCarrier::canParse<double>(value.text())) {
603 }
else if (tp->col == colState) {
616 }
else if (tp->col == colNext) {
620 std::vector<int> next = GNEAttributeCarrier::parse<std::vector<int> >(value.text());
635 }
else if (tp->col == colName) {
674 for (
auto it_intLanes : it.second) {
679 myInternalLanes.clear();
681 if (tlDef !=
nullptr) {
685 std::string innerID =
":" + nbn->
getID();
687 for (
auto it : links) {
688 int tlIndex = it.getTLIndex();
690 it.getTo(), it.getToLane()), NUM_POINTS);
694 PositionVector laneShapeFrom = it.getFrom()->getLaneShape(it.getFromLane());
695 PositionVector laneShapeTo = it.getTo()->getLaneShape(it.getToLane());
701 myInternalLanes[tlIndex].push_back(ilane);
704 for (
auto c : nbn->getCrossings()) {
705 if (c->tlLinkIndex2 > 0 && c->tlLinkIndex2 != c->tlLinkIndex) {
711 myInternalLanes[c->tlLinkIndex].push_back(ilane);
717 myInternalLanes[c->tlLinkIndex2].push_back(ilane2);
722 myInternalLanes[c->tlLinkIndex].push_back(ilane);
736 const std::vector<NBTrafficLightLogic::PhaseDefinition>&
746 const std::vector<NBTrafficLightLogic::PhaseDefinition>& phases =
getPhases();
747 for (
int row = 0; row < (int)phases.size(); row++) {
763 std::set<std::string> fromIDs;
768 for (
auto it_lane : edge.
getLanes()) {
769 fromIDs.insert(it_lane->getMicrosimID());
775 for (
auto it : edges) {
776 for (
auto it_lane : it->getLanes()) {
777 fromIDs.insert(it_lane->getMicrosimID());
784 for (
auto it_lane : lanes) {
785 fromIDs.insert(it_lane->getMicrosimID());
791 for (
auto it : links) {
792 if (fromIDs.count(it.getFrom()->getLaneID(it.getFromLane())) > 0) {
793 std::vector<GNEInternalLane*> lanes =
myInternalLanes[it.getTLIndex()];
794 for (
auto it_lane : lanes) {
795 it_lane->onDefault(obj, sel, eventData);
807 for (
auto it : links) {
819 assert(GNEAttributeCarrier::canParse<double>(
string.text()));
820 return TIME2STEPS(GNEAttributeCarrier::parse<double>(
string.text()));
829 myTLSEditorParent(TLSEditorParent) {
930 myCurrentJunction(nullptr) {
986 myNewTLProgram =
new FXButton(
this,
"Create TLS\t\tCreate a new traffic light program",
989 myDeleteTLProgram =
new FXButton(
this,
"Delete TLS\t\tDelete a traffic light program. If all programs are deleted the junction turns into a priority junction.",
1004 myTLSEditorParent(TLSEditorParent),
1005 myTableFont(new FXFont(getApp(),
"Courier New", 9)) {
1008 myTableScroll =
new FXScrollWindow(
this, LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT);
1011 myPhaseTable->setColumnHeaderHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent() / 2);
1016 myPhaseTable->setHelpText(
"phase duration in seconds | phase state");
1056 const int cols = fixed ? 4 : 6;
1057 const int colDuration = 0;
1058 const int colMinDur = fixed ? -1 : 1;
1059 const int colMaxDur = fixed ? -1 : 2;
1060 const int colState = fixed ? 1 : 3;
1061 const int colNext = fixed ? 2 : 4;
1062 const int colName = fixed ? 3 : 5;
1068 for (
int row = 0; row < (int)phases.size(); row++) {
1074 myPhaseTable->setItemText(row, colState, phases[row].state.c_str());
1075 myPhaseTable->setItemText(row, colNext, phases[row].next.size() > 0 ?
toString(phases[row].next).c_str() :
" ");
1076 myPhaseTable->setItemText(row, colName, phases[row].name.c_str());
1077 myPhaseTable->getItem(row, 1)->setJustify(FXTableItem::LEFT);
1081 if (colMinDur >= 0) {
1105 int neededWidth = 0;
1106 for (
int i = 0; i < cols; i++) {
1130 cycleDuration += it.duration;
1143 myHaveModifications(false) {
1190 FXFileDialog opendialog(
this,
"Load TLS Program");
1192 opendialog.setSelectMode(SELECTFILE_EXISTING);
1193 opendialog.setPatternList(
"*.xml");
1197 if (opendialog.execute()) {
1205 std::set<NBLoadedSUMOTLDef*> newDefsOtherProgram;
1210 newDefSameProgram = sdef;
1212 newDefsOtherProgram.insert(sdef);
1216 const int newPrograms = (int)newDefsOtherProgram.size();
1217 if (newPrograms > 0 || newDefSameProgram !=
nullptr) {
1219 for (
auto newProg : newDefsOtherProgram) {
1220 for (
auto it_node : nodes) {
1225 if (newPrograms > 0) {
1228 if (newDefSameProgram !=
nullptr) {
1239 tmpTLLCont.
removeProgram(def->getID(), def->getProgramID(),
false);
1252 "Save TLS Program as",
".xml",
1270 for (
auto j : phases) {
1274 if (varPhaseLength) {
1292 if (time == std::floor(time)) {
1302 o->handle(
this, FXSEL(SEL_COMMAND, enable ? FXWindow::ID_ENABLE : FXWindow::ID_DISABLE),
nullptr);
GNETLSEditorFrame::TLSModifications * myTLSModifications
modul for load/Save TLS Modifications
TLIndexMap myInternalLanes
FXLabel * myLabelJunctionStatus
label for junction status
void setPhaseNext(int phaseIndex, const std::vector< int > &next)
const std::map< std::string, NBTrafficLightDefinition * > & getPrograms(const std::string &id) const
Returns all programs for the given tl-id.
The link has green light, may pass.
long onCmdGuess(FXObject *, FXSelector, void *)
Called when the user presses the button Guess.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
virtual void setParticipantsInformation()
Builds the list of participating nodes/edges/links.
std::vector< GNELane * > retrieveLanes(bool onlySelected=false)
return all lanes
void close()
Closes the device and removes it from the dictionary.
TLSDefinition(GNETLSEditorFrame *TLSEditorParent)
constructor
void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)
A structure which describes a connection between edges or lanes.
#define GUIDesignComboBoxNCol
number of column of every combo box
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
bool removeProgram(const std::string id, const std::string programID, bool del=true)
Removes a program of a logic definition from the dictionary.
SUMOTime getOffset() const
Returns the offset of first switch.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
const std::vector< GNEEdge * > & getGNEOutgoingEdges() const
Returns incoming GNEEdges.
long onCmdDefCreate(FXObject *, FXSelector, void *)
Called when the user creates a TLS.
FXButton * myDiscardModificationsButtons
button for cancel modifications
void setPhaseMaxDuration(int phaseIndex, SUMOTime duration)
FXLabel * myOffsetLabel
offset label
long onCmdSaveTLSProgram(FXObject *, FXSelector, void *)
save TLS Programm to an additional file
void update() const
Mark the entire GNEViewNet to be repainted later.
void setOffset(SUMOTime offset)
Sets the offset of this tls.
int getNumLinks()
Returns the number of participating links.
A loaded (complete) traffic light logic.
FXFont * myTableFont
font for the phase table
GNEJunction * getCurrentJunction() const
get current modified junction
void setPhaseState(int phaseIndex, int tlIndex, LinkState linkState)
Modifies the state for an existing phase (used by NETEDIT)
A container for traffic light definitions and built programs.
A SUMO-compliant built logic for a traffic light.
FXLabel * myNameLabel
name label
#define GUIDesignTableLimitedHeight
design for table extended over frame but with limited Height
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
The link has green light, has to brake.
long onCmdPhaseSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a Phase.
void deletePhase(int index)
TrafficLightType getType() const
get the algorithm type (static etc..)
FXTextField * myTextFieldJunctionStatus
text field for junction status
selected junction von TLS
const std::vector< PhaseDefinition > & getPhases() const
Returns the phases.
bool fixedDuration() const
whether the current traffic light uses fixed phase durations
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
const NBConnectionVector & getControlledLinks() const
returns the controlled links (depends on previous call to collectLinks)
void removeAdditionalGLObject(GUIGlObject *o)
Removes an additional object (detector/shape/trigger) from being visualised.
The base class for traffic light logic definitions.
void setPhaseMinDuration(int phaseIndex, SUMOTime duration)
FXComboBox * myProgramComboBox
the comboBox for selecting the tl-definition to edit
bool isTLSSaved()
check if modifications in TLS was saved
static const SUMOTime UNSPECIFIED_DURATION
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
long onCmdLoadTLSProgram(FXObject *, FXSelector, void *)
void initPhaseTable(int index=0)
initialies the phase table
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
PositionVector reverse() const
reverse position vector
FXString gCurrentFolder
The folder used as last.
int computeBrakingTime(double minDecel) const
Computes the time vehicles may need to brake.
const std::string & getProgramID() const
Returns the ProgramID.
void selectTLS(bool selected)
notify the junction of being selected in tls-mode. (used to control drawing)
definition related controls
FXButton * mySaveTLSProgramButton
button for save TLS Programs
maximum duration of a phase
const std::string & getID() const
Returns the id.
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
The definition of a single phase of the logic.
FXLabel * myProgramLabel
program label
TLSJunction(GNETLSEditorFrame *TLSEditorParent)
constructor
long onUpdNeedsDef(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition.
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
A RT-tree for efficient storing of SUMO's GL-objects.
long onCmdCleanup(FXObject *, FXSelector, void *)
Called when the user cleans up states.
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
bool myHaveModifications
whether the current tls was modified
LinkState getLinkState() const
whether link state has been modfied
long onCmdDefDelete(FXObject *, FXSelector, void *)
Called when the user deletes a TLS.
GNEViewNet * getViewNet() const
get view net
long onCmdDefOffset(FXObject *, FXSelector, void *)
Called when the user changes the offset of a TLS.
#define WRITE_WARNING(msg)
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.
static OptionsCont & getOptions()
Retrieves the options.
SUMOTime duration
The duration of the phase in s.
bool changeAllPhases() const
change all phases
GNEViewNet * myViewNet
View Net.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
FXScrollWindow * myTableScroll
window for oversized phase tables
void clearTLSAttributes()
clear TLS attributes
bool isTLControlled() const
Returns whether this node is controlled by any tls.
std::string getAttribute(SumoXMLAttr key) const
GNEUndoList * getUndoList() const
get the undoList object
FXTable * getPhaseTable() const
get phase table
void hideCycleDuration()
hide cycle duration
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditorParent
FXTextField * myNameTextField
name text field
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
void initTLSAttributes(GNEJunction *junction)
initializes the definitions and corresponding listbox
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
GNEEdge & getParentEdge()
Returns underlying parent edge.
NBEdgeCont & getEdgeCont()
returns the NBEdgeCont of the underlying netbuilder
void addStep(SUMOTime duration, const std::string &state, const std::vector< int > &next=std::vector< int >(), const std::string &name="", int index=-1)
Adds a phase to the logic.
NBTrafficLightDefinition * getCurrentTLSDefinition() const
get current definition
GNETLSEditorFrame::TLSJunction * myTLSJunction
modul for TLS Junction
const std::vector< GNEEdge * > & getGNEIncomingEdges() const
Returns incoming GNEEdges.
bool writeXMLHeader(const std::string &rootElement, const std::string &schemaFile, std::map< SumoXMLAttr, std::string > attrs=std::map< SumoXMLAttr, std::string >())
Writes an XML header with optional configuration.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
TLSAttributes(GNETLSEditorFrame *TLSEditorParent)
constructor
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
bool controlsEdge(GNEEdge &edge) const
whether the given edge is controlled by the currently edited tlDef
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
std::vector< int > next
next phase indices or empty list
replace program with a newly guessed program
void move2side(double amount, double maxExtension=100)
move position vector to side using certain ammount
TLSPhases(GNETLSEditorFrame *TLSEditorParent)
constructor
bool checkHaveModifications() const
check if current TLS was modified
long onCmdPhaseEdit(FXObject *, FXSelector, void *)
Called when the user edits a Phase.
std::string state
The state definition.
LinkState
The right-of-way state of a link between two lanes used when constructing a NBTrafficLightLogic, in MSLink and GNEInternalLane.
void computeJunction(GNEJunction *junction)
trigger recomputation of junction shape and logic param[in] window The window to inform about delay ...
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
~GNETLSEditorFrame()
Destructor.
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
int getTLIndex() const
get Traffic Light index
NBTrafficLightLogic * getLogic()
Returns the internal logic.
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
FXDEFMAP(GNETLSEditorFrame) GNETLSEditorFrameMap[]
void setPhaseName(int phaseIndex, const std::string &name)
~TLSAttributes()
destructor
const std::string & getProgramID() const
Returns the ProgramID.
void p_abort()
reverts and discards ALL active command groups
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
SUMORTree & getVisualisationSpeedUp()
Returns the RTree used for visualisation speed-up.
std::vector< NBConnection > NBConnectionVector
Definition of a connection vector.
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)
int getNumberOfTLSDefinitions() const
get number of definitions
#define GUIDesignTextFieldNCol
Num of column of text field.
static bool canParse(const std::string &string)
true if a value of type T can be parsed from string
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
std::string name
option phase name
static std::string prune(const std::string &str)
Removes trailing and leading whitechars.
FXButton * myLoadTLSProgramButton
button for load TLS Programs
double length() const
Returns the length.
void showCycleDuration()
show cycle duration
virtual void show()
show Frame
void updateCycleDuration()
recomputes cycle duration and updates label
int getNumberOfPrograms() const
get number of programs
std::vector< GNEEdge * > retrieveEdges(bool onlySelected=false)
return all edges
The link has yellow light, may pass.
void addAdditionalGLObject(GUIGlObject *o)
Adds an additional object (detector/shape/trigger) for visualisation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
const std::set< NBTrafficLightDefinition * > & getControllingTLS() const
Returns the traffic lights that were assigned to this node (The set of tls that control this node) ...
TrafficLightType getType() const
get the algorithm type (static etc..)
long onCmdOK(FXObject *, FXSelector, void *)
SUMOTime getOffset() const
get current offset in SUMOTIme
void updateJunctionDescription() const
update descrition
const std::vector< NBNode * > & getNodes() const
Returns the list of controlled nodes.
long onCmdDefSubRename(FXObject *, FXSelector, void *)
Called when the user sub-renames a TLS.
The link has red light (must brake)
A storage for options typed value containers)
void setOffset(SUMOTime offset)
set new offset
const std::vector< NBTrafficLightLogic::PhaseDefinition > & getPhases()
the phase of the current traffic light
void setPhaseDuration(int phaseIndex, SUMOTime duration)
Modifies the duration for an existing phase (used by NETEDIT)
GNENet * getNet() const
get the net object
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to doubles/floats
long onCmdPhaseCreate(FXObject *, FXSelector, void *)
Called when the user creates a Phase.
FXButton * mySaveModificationsButtons
button for save modifications
Represents a single node (junction) during network building.
long onUpdNeedsDef(FXObject *, FXSelector, void *)
enable buttons, only when a tlLogic is being edited
void setHaveModifications(bool value)
set if current TLS was modified
void setCurrentJunction(GNEJunction *junction)
set current junction
A definition of a pedestrian crossing.
void setStatusBarText(const std::string &text)
set staturBar text
bool insert(NBTrafficLightDefinition *logic, bool forceInsert=false)
Adds a logic definition to the dictionary.
Static storage of an output device and its base (abstract) implementation.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
void setStateLength(int numLinks, LinkState fill=LINKSTATE_TL_RED)
~TLSDefinition()
destructor
std::string writeSUMOTime(SUMOTime steps)
convert SUMOTime into string
Importer for edge connections stored in XML.
#define GUIDesignLabelLeft
The link has yellow light, has to brake anyway.
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
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
FXButton * myNewTLProgram
button for create new Traffic light program
#define WRITE_MESSAGE(msg)
FXTextField * myOffsetTextField
the control for modifying offset
FXButton * myDeleteTLProgram
button for delete traffic light program
NBNode * getNBNode() const
Return net build node.
NBTrafficLightLogic * getLogic(const std::string &id, const std::string &programID) const
Returns the computed logic for the given name.
FXTextField * myTextFieldJunctionID
text field for junction ID
Position positionAtOffset(double pos, double lateralOffset=0) const
Returns the position at the given length.
NBTrafficLightLogicCont & getTLLogicCont()
returns the tllcont of the underlying netbuilder
NBLoadedSUMOTLDef * myEditedDef
the traffic light definition being edited
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
std::vector< NBTrafficLightDefinition * > myTLSDefinitions
the list of Definitions for the current junction
a single phase description
void cleanup()
cleans up previous lanes
TLSModifications(GNETLSEditorFrame *TLSEditorParent)
constructor
bool isAttributeCarrierSelected() const
check if attribute carrier is selected
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definitions getDefinitions() const
~TLSModifications()
destructor