Eclipse SUMO - Simulation of Urban MObility
GNETLSEditorFrame.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
14 // The Widget for modifying traffic lights
15 /****************************************************************************/
16 #ifndef GNETLSEditorFrame_h
17 #define GNETLSEditorFrame_h
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include "GNEFrame.h"
24 
25 // ===========================================================================
26 // class declarations
27 // ===========================================================================
29 class NBLoadedSUMOTLDef;
30 class NBOwnTLDef;
31 class GNEInternalLane;
32 
33 // ===========================================================================
34 // class definitions
35 // ===========================================================================
40 class GNETLSEditorFrame : public GNEFrame {
42  FXDECLARE(GNETLSEditorFrame)
43 
44 public:
45 
46  // ===========================================================================
47  // class TLSJunction
48  // ===========================================================================
49 
50  class TLSJunction : protected FXGroupBox {
51 
52  public:
54  TLSJunction(GNETLSEditorFrame* TLSEditorParent);
55 
57  ~TLSJunction();
58 
61 
63  void setCurrentJunction(GNEJunction* junction);
64 
66  void updateJunctionDescription() const;
67 
68  private:
71 
74 
76  FXTextField* myTextFieldJunctionID;
77 
80 
83 
86  };
87 
88  // ===========================================================================
89  // class TLSDefinition
90  // ===========================================================================
91 
92  class TLSDefinition : protected FXGroupBox {
93 
94  public:
96  TLSDefinition(GNETLSEditorFrame* TLSEditorParent);
97 
100 
101  private:
103  FXButton* myNewTLProgram;
104 
106  FXButton* myDeleteTLProgram;
107  };
108 
109  // ===========================================================================
110  // class TLSAttributes
111  // ===========================================================================
112 
113  class TLSAttributes : protected FXGroupBox {
114 
115  public:
117  TLSAttributes(GNETLSEditorFrame* TLSEditorParent);
118 
120  ~TLSAttributes();
121 
123  void initTLSAttributes(GNEJunction* junction);
124 
126  void clearTLSAttributes();
127 
130 
132  SUMOTime getOffset() const;
133 
135  void setOffset(SUMOTime offset);
136 
138  int getNumberOfTLSDefinitions() const;
139 
141  int getNumberOfPrograms() const;
142 
143  private:
146 
148  std::vector<NBTrafficLightDefinition*> myTLSDefinitions;
149 
151  FXLabel* myNameLabel;
152 
154  FXTextField* myNameTextField;
155 
157  FXLabel* myProgramLabel;
158 
160  FXComboBox* myProgramComboBox;
161 
163  FXLabel* myOffsetLabel;
164 
166  FXTextField* myOffsetTextField;
167  };
168 
169  // ===========================================================================
170  // class TLSPhases
171  // ===========================================================================
172 
173  class TLSPhases : protected FXGroupBox {
174 
175  public:
177  TLSPhases(GNETLSEditorFrame* TLSEditorParent);
178 
180  ~TLSPhases();
181 
183  FXTable* getPhaseTable() const;
184 
188  void initPhaseTable(int index = 0);
189 
191  void showCycleDuration();
192 
194  void hideCycleDuration();
195 
197  void updateCycleDuration();
198 
199  private:
202 
204  FXFont* myTableFont;
205 
207  FXScrollWindow* myTableScroll;
208 
210  FXTable* myPhaseTable;
211 
213  FXLabel* myCycleDuration;
214 
217 
220  };
221 
222  // ===========================================================================
223  // class TLSModifications
224  // ===========================================================================
225 
226  class TLSModifications : protected FXGroupBox {
227 
228  public:
230  TLSModifications(GNETLSEditorFrame* TLSEditorParent);
231 
234 
236  bool checkHaveModifications() const;
237 
239  void setHaveModifications(bool value);
240 
241  private:
244 
247 
250 
253  };
254 
255  // ===========================================================================
256  // class TLSFile
257  // ===========================================================================
258 
259  class TLSFile : protected FXGroupBox {
261  FXDECLARE(GNETLSEditorFrame::TLSFile)
262 
263  public:
265  TLSFile(GNETLSEditorFrame* TLSEditorParent);
266 
268  ~TLSFile();
269 
273  long onCmdLoadTLSProgram(FXObject*, FXSelector, void*);
274 
276  long onCmdSaveTLSProgram(FXObject*, FXSelector, void*);
277 
279  long onUpdNeedsDef(FXObject*, FXSelector, void*);
281 
282  protected:
284 
285  private:
288 
291 
294 
296  std::string writeSUMOTime(SUMOTime steps);
297  };
298 
299 
304  GNETLSEditorFrame(FXHorizontalFrame* horizontalFrameParent, GNEViewNet* viewNet);
305 
308 
310  void show();
311 
316  void editTLS(const Position& clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor& objectsUnderCursor);
317 
319  bool isTLSSaved();
320 
322  bool parseTLSPrograms(const std::string& file);
323 
328  long onCmdOK(FXObject*, FXSelector, void*);
329 
332  long onCmdCancel(FXObject*, FXSelector, void*);
333 
335  long onCmdToggle(FXObject*, FXSelector, void*);
336 
338  long onCmdGuess(FXObject*, FXSelector, void*);
339 
341  long onCmdDefCreate(FXObject*, FXSelector, void*);
342 
344  long onCmdDefDelete(FXObject*, FXSelector, void*);
345 
347  long onCmdDefOffset(FXObject*, FXSelector, void*);
348 
350  long onCmdDefSwitch(FXObject*, FXSelector, void*);
351 
353  long onCmdDefRename(FXObject*, FXSelector, void*);
354 
356  long onCmdDefSubRename(FXObject*, FXSelector, void*);
357 
359  long onCmdDefAddOff(FXObject*, FXSelector, void*);
360 
362  long onCmdPhaseSwitch(FXObject*, FXSelector, void*);
363 
365  long onCmdPhaseCreate(FXObject*, FXSelector, void*);
366 
368  long onCmdPhaseDelete(FXObject*, FXSelector, void*);
369 
371  long onCmdCleanup(FXObject*, FXSelector, void*);
372 
374  long onCmdAddUnused(FXObject*, FXSelector, void*);
375 
377  long onCmdPhaseEdit(FXObject*, FXSelector, void*);
378 
380  long onCmdMakeRILSAConforming(FXObject*, FXSelector, void*);
381 
383  long onUpdDefSwitch(FXObject*, FXSelector, void*);
384 
386  long onUpdNeedsDef(FXObject*, FXSelector, void*);
387 
389  long onUpdNeedsDefAndPhase(FXObject*, FXSelector, void*);
390 
392  long onUpdDefCreate(FXObject*, FXSelector, void*);
393 
395  long onUpdModified(FXObject*, FXSelector, void*);
397 
399  void handleChange(GNEInternalLane* lane);
400 
402  void handleMultiChange(GNELane* lane, FXObject* obj, FXSelector sel, void* data);
403 
405  bool controlsEdge(GNEEdge* edge) const;
406 
408  bool fixedDuration() const;
409 
412 
413 protected:
415 
416 
419  void editJunction(GNEJunction* junction);
420 
422  static SUMOTime getSUMOTime(const FXString& string);
423 
424 private:
427 
430 
433 
436 
439 
442 
445 
447  typedef std::map<int, std::vector<GNEInternalLane*> > TLIndexMap;
449 
452 
455 
457  void cleanup();
458 
461 
463  const std::vector<NBTrafficLightLogic::PhaseDefinition>& getPhases();
464 
466  static std::string varDurString(SUMOTime dur);
467 };
468 
469 
470 #endif
471 
472 /****************************************************************************/
473 
GNETLSEditorFrame::TLSAttributes::initTLSAttributes
void initTLSAttributes(GNEJunction *junction)
initializes the definitions and corresponding listbox
Definition: GNETLSEditorFrame.cpp:891
GNETLSEditorFrame::onCmdDefOffset
long onCmdDefOffset(FXObject *, FXSelector, void *)
Called when the user changes the offset of a TLS.
Definition: GNETLSEditorFrame.cpp:391
GNETLSEditorFrame::TLSJunction::myTextFieldJunctionStatus
FXTextField * myTextFieldJunctionStatus
text field for junction status
Definition: GNETLSEditorFrame.h:82
GNETLSEditorFrame::myTLSAttributes
GNETLSEditorFrame::TLSAttributes * myTLSAttributes
modul for TLS attributes
Definition: GNETLSEditorFrame.h:435
GNETLSEditorFrame::TLSAttributes::getCurrentTLSDefinition
NBTrafficLightDefinition * getCurrentTLSDefinition() const
get current definition
Definition: GNETLSEditorFrame.cpp:931
GNETLSEditorFrame::TLSJunction::myCurrentJunction
GNEJunction * myCurrentJunction
the junction of the tls is being modified
Definition: GNETLSEditorFrame.h:85
GNETLSEditorFrame::TLSJunction::~TLSJunction
~TLSJunction()
destructor
Definition: GNETLSEditorFrame.cpp:984
GNETLSEditorFrame::myTLSJunction
GNETLSEditorFrame::TLSJunction * myTLSJunction
modul for TLS Junction
Definition: GNETLSEditorFrame.h:429
GNETLSEditorFrame::myTLSPhases
GNETLSEditorFrame::TLSPhases * myTLSPhases
modul for TLS Phases
Definition: GNETLSEditorFrame.h:441
GNETLSEditorFrame::onUpdDefSwitch
long onUpdDefSwitch(FXObject *, FXSelector, void *)
Called when occurs an update of switch definition.
Definition: GNETLSEditorFrame.cpp:349
GNETLSEditorFrame::onUpdNeedsDef
long onUpdNeedsDef(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition.
Definition: GNETLSEditorFrame.cpp:357
GNETLSEditorFrame::onUpdDefCreate
long onUpdDefCreate(FXObject *, FXSelector, void *)
Called when occurs an update of create definition.
Definition: GNETLSEditorFrame.cpp:374
GNETLSEditorFrame::TLSAttributes::getNumberOfTLSDefinitions
int getNumberOfTLSDefinitions() const
get number of definitions
Definition: GNETLSEditorFrame.cpp:937
GNEFrameModuls::OverlappedInspection
Definition: GNEFrameModuls.h:520
GNETLSEditorFrame::TLSAttributes::~TLSAttributes
~TLSAttributes()
destructor
Definition: GNETLSEditorFrame.cpp:887
GNETLSEditorFrame::onCmdDefSwitch
long onCmdDefSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a TLS.
Definition: GNETLSEditorFrame.cpp:321
GNETLSEditorFrame::myOverlappedInspection
GNEFrameModuls::OverlappedInspection * myOverlappedInspection
Overlapped Inspection.
Definition: GNETLSEditorFrame.h:426
NBTrafficLightLogic.h
GNETLSEditorFrame::TLSJunction::myLabelJunctionStatus
FXLabel * myLabelJunctionStatus
label for junction status
Definition: GNETLSEditorFrame.h:79
GNETLSEditorFrame::TLSPhases::initPhaseTable
void initPhaseTable(int index=0)
initialies the phase table
Definition: GNETLSEditorFrame.cpp:1086
GNETLSEditorFrame::onCmdOK
long onCmdOK(FXObject *, FXSelector, void *)
Definition: GNETLSEditorFrame.cpp:256
GNETLSEditorFrame::isTLSSaved
bool isTLSSaved()
check if modifications in TLS was saved
Definition: GNETLSEditorFrame.cpp:155
GNETLSEditorFrame::TLSModifications::checkHaveModifications
bool checkHaveModifications() const
check if current TLS was modified
Definition: GNETLSEditorFrame.cpp:1195
GNETLSEditorFrame::TLSAttributes::getNumberOfPrograms
int getNumberOfPrograms() const
get number of programs
Definition: GNETLSEditorFrame.cpp:943
GNETLSEditorFrame::varDurString
static std::string varDurString(SUMOTime dur)
convert duration (potentially undefined) to string
Definition: GNETLSEditorFrame.cpp:746
GNETLSEditorFrame::onCmdPhaseDelete
long onCmdPhaseDelete(FXObject *, FXSelector, void *)
Called when the user deletes a Phase.
Definition: GNETLSEditorFrame.cpp:529
GNETLSEditorFrame::getPhases
const std::vector< NBTrafficLightLogic::PhaseDefinition > & getPhases()
the phase of the current traffic light
Definition: GNETLSEditorFrame.cpp:752
GNETLSEditorFrame::editJunction
void editJunction(GNEJunction *junction)
edits the traffic light for the given junction
Definition: GNETLSEditorFrame.cpp:832
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GNETLSEditorFrame::myTLSModifications
GNETLSEditorFrame::TLSModifications * myTLSModifications
modul for load/Save TLS Modifications
Definition: GNETLSEditorFrame.h:438
GNETLSEditorFrame::TLSAttributes::getOffset
SUMOTime getOffset() const
get current offset in SUMOTIme
Definition: GNETLSEditorFrame.cpp:949
GNETLSEditorFrame::TLSPhases
Definition: GNETLSEditorFrame.h:173
GNEFrame
Definition: GNEFrame.h:34
NBOwnTLDef
A traffic light logics which must be computed (only nodes/edges are given)
Definition: NBOwnTLDef.h:46
GNETLSEditorFrame::GNETLSEditorFrame
GNETLSEditorFrame(FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
Constructor.
Definition: GNETLSEditorFrame.cpp:91
GNETLSEditorFrame::TLSFile::~TLSFile
~TLSFile()
destructor
Definition: GNETLSEditorFrame.cpp:1221
GNETLSEditorFrame::onUpdModified
long onUpdModified(FXObject *, FXSelector, void *)
Called when occurs an update of modified.
Definition: GNETLSEditorFrame.cpp:382
GNEViewNet
Definition: GNEViewNet.h:42
GNETLSEditorFrame::TLSPhases::~TLSPhases
~TLSPhases()
destructor
Definition: GNETLSEditorFrame.cpp:1074
GNETLSEditorFrame::TLSFile::myLoadTLSProgramButton
FXButton * myLoadTLSProgramButton
button for load TLS Programs
Definition: GNETLSEditorFrame.h:290
GNETLSEditorFrame::TLSJunction::myTextFieldJunctionID
FXTextField * myTextFieldJunctionID
text field for junction ID
Definition: GNETLSEditorFrame.h:76
GNETLSEditorFrame::TLSPhases::myTableFont
FXFont * myTableFont
font for the phase table
Definition: GNETLSEditorFrame.h:204
GNETLSEditorFrame::cleanup
void cleanup()
cleans up previous lanes
Definition: GNETLSEditorFrame.cpp:661
GNETLSEditorFrame::selectedOverlappedElement
void selectedOverlappedElement(GNEAttributeCarrier *AC)
open AttributesCreator extended dialog (can be reimplemented in frame children)
Definition: GNETLSEditorFrame.cpp:453
GNETLSEditorFrame::TLSFile::writeSUMOTime
std::string writeSUMOTime(SUMOTime steps)
convert SUMOTime into string
Definition: GNETLSEditorFrame.cpp:1326
GNETLSEditorFrame::TLSJunction::getCurrentJunction
GNEJunction * getCurrentJunction() const
get current modified junction
Definition: GNETLSEditorFrame.cpp:988
GNETLSEditorFrame::TLSPhases::myCycleDuration
FXLabel * myCycleDuration
label with the cycle duration
Definition: GNETLSEditorFrame.h:213
GNETLSEditorFrame::TLSModifications::~TLSModifications
~TLSModifications()
destructor
Definition: GNETLSEditorFrame.cpp:1191
GNETLSEditorFrame::TLSJunction::updateJunctionDescription
void updateJunctionDescription() const
update descrition
Definition: GNETLSEditorFrame.cpp:1000
GNETLSEditorFrame::TLSFile::TLSFile
TLSFile(GNETLSEditorFrame *TLSEditorParent)
FOX-declaration.
Definition: GNETLSEditorFrame.cpp:1209
GNETLSEditorFrame::TLSAttributes::setOffset
void setOffset(SUMOTime offset)
set new offset
Definition: GNETLSEditorFrame.cpp:955
GNETLSEditorFrame::TLSModifications::setHaveModifications
void setHaveModifications(bool value)
set if current TLS was modified
Definition: GNETLSEditorFrame.cpp:1201
GNETLSEditorFrame::TLSJunction::myLabelJunctionID
FXLabel * myLabelJunctionID
label for junction ID
Definition: GNETLSEditorFrame.h:73
GNEEdge
A road/street connecting two junctions (netedit-version)
Definition: GNEEdge.h:51
GNETLSEditorFrame::TLSAttributes
Definition: GNETLSEditorFrame.h:113
GNETLSEditorFrame::TLSFile::myTLSEditorParent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
Definition: GNETLSEditorFrame.h:287
GNETLSEditorFrame::onCmdDefSubRename
long onCmdDefSubRename(FXObject *, FXSelector, void *)
Called when the user sub-renames a TLS.
Definition: GNETLSEditorFrame.cpp:405
GNETLSEditorFrame::TLSPhases::myTLSEditorParent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
Definition: GNETLSEditorFrame.h:201
GNETLSEditorFrame::TLSDefinition::myDeleteTLProgram
FXButton * myDeleteTLProgram
button for delete traffic light program
Definition: GNETLSEditorFrame.h:106
GNETLSEditorFrame::TLSFile::onUpdNeedsDef
long onUpdNeedsDef(FXObject *, FXSelector, void *)
enable buttons, only when a tlLogic is being edited
Definition: GNETLSEditorFrame.cpp:1336
GNETLSEditorFrame::editTLS
void editTLS(const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
edits the traffic light for the given clicked junction
Definition: GNETLSEditorFrame.cpp:137
GNETLSEditorFrame::TLSAttributes::myTLSDefinitions
std::vector< NBTrafficLightDefinition * > myTLSDefinitions
the list of Definitions for the current junction
Definition: GNETLSEditorFrame.h:148
GNETLSEditorFrame::onCmdDefCreate
long onCmdDefCreate(FXObject *, FXSelector, void *)
Called when the user creates a TLS.
Definition: GNETLSEditorFrame.cpp:279
GNETLSEditorFrame::TLSDefinition::~TLSDefinition
~TLSDefinition()
destructor
Definition: GNETLSEditorFrame.cpp:1032
GNETLSEditorFrame::onCmdGuess
long onCmdGuess(FXObject *, FXSelector, void *)
Called when the user presses the button Guess.
Definition: GNETLSEditorFrame.cpp:417
GNEViewNetHelper::ObjectsUnderCursor
class used to group all variables related with objects under cursor after a click over view
Definition: GNEViewNetHelper.h:148
GNETLSEditorFrame::TLSDefinition::myNewTLProgram
FXButton * myNewTLProgram
button for create new Traffic light program
Definition: GNETLSEditorFrame.h:103
GNETLSEditorFrame::TLSJunction::setCurrentJunction
void setCurrentJunction(GNEJunction *junction)
set current junction
Definition: GNETLSEditorFrame.cpp:994
GNETLSEditorFrame::onCmdDefDelete
long onCmdDefDelete(FXObject *, FXSelector, void *)
Called when the user deletes a TLS.
Definition: GNETLSEditorFrame.cpp:306
GNETLSEditorFrame::TLSAttributes::myOffsetTextField
FXTextField * myOffsetTextField
the control for modifying offset
Definition: GNETLSEditorFrame.h:166
GNETLSEditorFrame::TLSModifications
Definition: GNETLSEditorFrame.h:226
GNETLSEditorFrame::onCmdPhaseEdit
long onCmdPhaseEdit(FXObject *, FXSelector, void *)
Called when the user edits a Phase.
Definition: GNETLSEditorFrame.cpp:560
GNETLSEditorFrame::onCmdMakeRILSAConforming
long onCmdMakeRILSAConforming(FXObject *, FXSelector, void *)
Called when the user makes RILSA.
GNETLSEditorFrame::TLSDefinition::TLSDefinition
TLSDefinition(GNETLSEditorFrame *TLSEditorParent)
constructor
Definition: GNETLSEditorFrame.cpp:1019
GNETLSEditorFrame::TLSModifications::myTLSEditorParent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
Definition: GNETLSEditorFrame.h:243
GNETLSEditorFrame::parseTLSPrograms
bool parseTLSPrograms(const std::string &file)
parse TLS Programs from a file
Definition: GNETLSEditorFrame.cpp:188
GNETLSEditorFrame::onCmdDefRename
long onCmdDefRename(FXObject *, FXSelector, void *)
Called when the user renames a TLS.
Definition: GNETLSEditorFrame.cpp:399
GNETLSEditorFrame::TLSPhases::myDeleteSelectedPhaseButton
FXButton * myDeleteSelectedPhaseButton
delete phase button
Definition: GNETLSEditorFrame.h:219
FOX_CONSTRUCTOR
#define FOX_CONSTRUCTOR(classname)
Definition: config.h:13
GNETLSEditorFrame::handleChange
void handleChange(GNEInternalLane *lane)
update phase definition for the current traffic light and phase
Definition: GNETLSEditorFrame.cpp:758
GNETLSEditorFrame::TLSModifications::TLSModifications
TLSModifications(GNETLSEditorFrame *TLSEditorParent)
constructor
Definition: GNETLSEditorFrame.cpp:1176
Position
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:38
GNETLSEditorFrame::TLSPhases::getPhaseTable
FXTable * getPhaseTable() const
get phase table
Definition: GNETLSEditorFrame.cpp:1080
GNETLSEditorFrame::TLSPhases::hideCycleDuration
void hideCycleDuration()
hide cycle duration
Definition: GNETLSEditorFrame.cpp:1158
GNETLSEditorFrame::show
void show()
show inspector frame
Definition: GNETLSEditorFrame.cpp:130
GNETLSEditorFrame::TLSFile::onCmdSaveTLSProgram
long onCmdSaveTLSProgram(FXObject *, FXSelector, void *)
save TLS Programm to an additional file
Definition: GNETLSEditorFrame.cpp:1286
GNETLSEditorFrame::TLSAttributes::myOffsetLabel
FXLabel * myOffsetLabel
offset label
Definition: GNETLSEditorFrame.h:163
GNETLSEditorFrame::onCmdPhaseCreate
long onCmdPhaseCreate(FXObject *, FXSelector, void *)
Called when the user creates a Phase.
Definition: GNETLSEditorFrame.cpp:459
GNETLSEditorFrame::~GNETLSEditorFrame
~GNETLSEditorFrame()
Destructor.
Definition: GNETLSEditorFrame.cpp:124
GNETLSEditorFrame::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
Called when the user presses the Cancel-button.
Definition: GNETLSEditorFrame.cpp:245
GNETLSEditorFrame::getSUMOTime
static SUMOTime getSUMOTime(const FXString &string)
converts to SUMOTime
Definition: GNETLSEditorFrame.cpp:855
GNETLSEditorFrame::TLSJunction::TLSJunction
TLSJunction(GNETLSEditorFrame *TLSEditorParent)
constructor
Definition: GNETLSEditorFrame.cpp:963
GNETLSEditorFrame::TLSPhases::myTableScroll
FXScrollWindow * myTableScroll
window for oversized phase tables
Definition: GNETLSEditorFrame.h:207
GNETLSEditorFrame::onUpdNeedsDefAndPhase
long onUpdNeedsDefAndPhase(FXObject *, FXSelector, void *)
Called when occurs an update of needs definition an dphase.
Definition: GNETLSEditorFrame.cpp:365
GNETLSEditorFrame::fixedDuration
bool fixedDuration() const
whether the current traffic light uses fixed phase durations
Definition: GNETLSEditorFrame.cpp:446
GNETLSEditorFrame::myPhaseIndex
int myPhaseIndex
index of the phase being shown
Definition: GNETLSEditorFrame.h:454
GNETLSEditorFrame::TLSAttributes::myProgramComboBox
FXComboBox * myProgramComboBox
the comboBox for selecting the tl-definition to edit
Definition: GNETLSEditorFrame.h:160
GNETLSEditorFrame::TLSAttributes::myNameLabel
FXLabel * myNameLabel
name label
Definition: GNETLSEditorFrame.h:151
GNETLSEditorFrame::buildIinternalLanes
void buildIinternalLanes(NBTrafficLightDefinition *tlDef)
builds internal lanes for the given tlDef
Definition: GNETLSEditorFrame.cpp:685
GNETLSEditorFrame::TLSFile::mySaveTLSProgramButton
FXButton * mySaveTLSProgramButton
button for save TLS Programs
Definition: GNETLSEditorFrame.h:293
GNETLSEditorFrame::onCmdDefAddOff
long onCmdDefAddOff(FXObject *, FXSelector, void *)
Called when the user adds a OFF.
Definition: GNETLSEditorFrame.cpp:411
GNETLSEditorFrame::myEditedDef
NBLoadedSUMOTLDef * myEditedDef
the traffic light definition being edited
Definition: GNETLSEditorFrame.h:451
GNETLSEditorFrame::myTLSDefinition
GNETLSEditorFrame::TLSDefinition * myTLSDefinition
modul for TLS Definition
Definition: GNETLSEditorFrame.h:432
GNETLSEditorFrame::TLSPhases::TLSPhases
TLSPhases(GNETLSEditorFrame *TLSEditorParent)
constructor
Definition: GNETLSEditorFrame.cpp:1038
GNETLSEditorFrame::myTLSFile
GNETLSEditorFrame::TLSFile * myTLSFile
modul for load/Save TLS Programs
Definition: GNETLSEditorFrame.h:444
GNETLSEditorFrame::TLSAttributes::myProgramLabel
FXLabel * myProgramLabel
program label
Definition: GNETLSEditorFrame.h:157
GNETLSEditorFrame::TLSModifications::mySaveModificationsButtons
FXButton * mySaveModificationsButtons
button for save modifications
Definition: GNETLSEditorFrame.h:249
GNETLSEditorFrame::TLSPhases::myInsertDuplicateButton
FXButton * myInsertDuplicateButton
insert new phase button
Definition: GNETLSEditorFrame.h:216
GNEInternalLane
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
Definition: GNEInternalLane.h:42
GNETLSEditorFrame::TLSPhases::myPhaseTable
FXTable * myPhaseTable
table for selecting and rearranging phases and for changing duration
Definition: GNETLSEditorFrame.h:210
GNETLSEditorFrame::handleMultiChange
void handleMultiChange(GNELane *lane, FXObject *obj, FXSelector sel, void *data)
update phase definition for the current traffic light and phase
Definition: GNETLSEditorFrame.cpp:774
GNETLSEditorFrame::TLSJunction
FOX-declaration.
Definition: GNETLSEditorFrame.h:50
GNETLSEditorFrame::onCmdPhaseSwitch
long onCmdPhaseSwitch(FXObject *, FXSelector, void *)
Called when the user switchs a Phase.
Definition: GNETLSEditorFrame.cpp:423
GNETLSEditorFrame::controlsEdge
bool controlsEdge(GNEEdge *edge) const
whether the given edge is controlled by the currently edited tlDef
Definition: GNETLSEditorFrame.cpp:818
GNETLSEditorFrame::TLSFile::onCmdLoadTLSProgram
long onCmdLoadTLSProgram(FXObject *, FXSelector, void *)
Definition: GNETLSEditorFrame.cpp:1225
GNETLSEditorFrame::TLSPhases::updateCycleDuration
void updateCycleDuration()
recomputes cycle duration and updates label
Definition: GNETLSEditorFrame.cpp:1163
GNETLSEditorFrame::TLSModifications::myDiscardModificationsButtons
FXButton * myDiscardModificationsButtons
button for cancel modifications
Definition: GNETLSEditorFrame.h:246
GNETLSEditorFrame::onCmdCleanup
long onCmdCleanup(FXObject *, FXSelector, void *)
Called when the user cleans up states.
Definition: GNETLSEditorFrame.cpp:540
GNETLSEditorFrame::onCmdToggle
long onCmdToggle(FXObject *, FXSelector, void *)
Called when the user presses the button Toogle.
GNETLSEditorFrame::TLSModifications::myHaveModifications
bool myHaveModifications
whether the current tls was modified
Definition: GNETLSEditorFrame.h:252
GNETLSEditorFrame::onCmdAddUnused
long onCmdAddUnused(FXObject *, FXSelector, void *)
Called when the user cleans up states.
Definition: GNETLSEditorFrame.cpp:549
GNETLSEditorFrame
Definition: GNETLSEditorFrame.h:40
GNETLSEditorFrame::TLSPhases::showCycleDuration
void showCycleDuration()
show cycle duration
Definition: GNETLSEditorFrame.cpp:1152
GNETLSEditorFrame::myInternalLanes
TLIndexMap myInternalLanes
Definition: GNETLSEditorFrame.h:448
GNETLSEditorFrame::TLSJunction::myTLSEditorParent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditor Parent
Definition: GNETLSEditorFrame.h:70
GNEJunction
Definition: GNEJunction.h:47
GNEFrame.h
GNETLSEditorFrame::TLSAttributes::TLSAttributes
TLSAttributes(GNETLSEditorFrame *TLSEditorParent)
constructor
Definition: GNETLSEditorFrame.cpp:863
GNELane
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition: GNELane.h:45
GNETLSEditorFrame::TLSDefinition
Definition: GNETLSEditorFrame.h:92
GNEAttributeCarrier
Definition: GNEAttributeCarrier.h:54
GNETLSEditorFrame::TLIndexMap
std::map< int, std::vector< GNEInternalLane * > > TLIndexMap
the internal lanes belonging the the current junction indexed by their tl-index
Definition: GNETLSEditorFrame.h:447
GNETLSEditorFrame::TLSAttributes::clearTLSAttributes
void clearTLSAttributes()
clear TLS attributes
Definition: GNETLSEditorFrame.cpp:915
NBTrafficLightDefinition
The base class for traffic light logic definitions.
Definition: NBTrafficLightDefinition.h:67
GNETLSEditorFrame::TLSAttributes::myTLSEditorParent
GNETLSEditorFrame * myTLSEditorParent
pointer to TLSEditorParent
Definition: GNETLSEditorFrame.h:145
GNETLSEditorFrame::TLSFile
Definition: GNETLSEditorFrame.h:259
GNETLSEditorFrame::TLSAttributes::myNameTextField
FXTextField * myNameTextField
name text field
Definition: GNETLSEditorFrame.h:154
NBLoadedSUMOTLDef
A loaded (complete) traffic light logic.
Definition: NBLoadedSUMOTLDef.h:44