![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNETLSTable.h>
Data Structures | |
| class | Cell |
| FOX needs this. More... | |
| class | Column |
| table column More... | |
| class | Row |
| table row More... | |
Public Member Functions | |
| void | clearTable () |
| clear table | |
| void | disable () |
| Disable table. | |
| void | enable () |
| Enable table. | |
| int | getCurrentSelectedRow () const |
| Get current selected row. | |
| std::string | getItemText (const int row, const int column) const |
| Return cell text. | |
| int | getNumRows () const |
| Get number of rows. | |
| GNETLSEditorFrame::TLSPhases * | getTLSPhasesParent () const |
| @frame get pointer to TLSEditorFrame phases parent | |
| GNETLSTable (GNETLSEditorFrame::TLSPhases *TLSPhasesParent) | |
| fox declaration | |
| void | recalcTableWidth () |
| recalc width (call when all labels and contents are fill) | |
| void | selectRow (const int rowIndex) |
| Select a row. | |
| void | setColumnLabelBot (const int column, const std::string &text) |
| Change column bottom text. | |
| void | setColumnLabelTop (const int column, const std::string &text, const std::string &tooltip="") |
| Change column header text. | |
| void | setItemText (FXint row, FXint column, const std::string &text) |
| Modify cell text. | |
| void | setTableSize (const std::string &columnsType, const int numberRow) |
| Set the table size to nr rows and nc columns; all existing items will be removed. Format: s -> select row (radio button) u -> duration (float, textField) f -> float (float, textField) p -> program (rrGggy..., textField) m -> name (automatic size, textField) i -> insert phase (button) d -> delete phase (button) t -> move phase up (button) b -> move phase down (button). | |
| long | testTable (const InternalTestStep::TLSTableTest *tableTest) |
| test table (using internal tests) | |
| ~GNETLSTable () | |
| destructor (Called automatically) | |
FOX callbacks | |
| long | onFocusRow (FXObject *, FXSelector, void *) |
| called when a row is focused | |
| long | onCmdAddPhasePressed (FXObject *, FXSelector, void *) |
| called when add phase button is selected | |
| long | onCmdEditRow (FXObject *, FXSelector, void *) |
| called when a row is modified | |
| long | onCmdKeyPress (FXObject *, FXSelector, void *) |
| called when a key is pressed | |
| long | onCmdAddPhase (FXObject *, FXSelector, void *) |
| called when an add phase button is pressed | |
| long | onCmdDuplicatePhase (FXObject *, FXSelector, void *) |
| called when a duplicate phase button is pressed | |
| long | onCmdAddPhaseAllRed (FXObject *, FXSelector, void *) |
| called when an add all green red phase button is pressed | |
| long | onCmdAddPhaseAllYellow (FXObject *, FXSelector, void *) |
| called when an add all green red phase button is pressed | |
| long | onCmdAddPhaseAllGreen (FXObject *, FXSelector, void *) |
| called when an add all green red phase button is pressed | |
| long | onCmdAddPhaseAllGreenPriority (FXObject *, FXSelector, void *) |
| called when an add all green red phase button is pressed | |
| long | onCmdRemovePhase (FXObject *, FXSelector, void *) |
| called when a remove phase button is pressed | |
| long | onCmdMoveUpPhase (FXObject *, FXSelector, void *) |
| called when a move up phase button is pressed | |
| long | onCmdMoveDownPhase (FXObject *, FXSelector, void *) |
| called when a move up phase button is pressed | |
Protected Member Functions | |
| bool | moveFocus () |
| move focus to current row | |
| void | updateAccumulatedDuration () |
| update accumulated duration(); | |
| void | updateIndexLabel () |
| update index labels | |
Protected Attributes | |
| std::vector< Column * > | myColumns |
| columns | |
| int | myCurrentSelectedRow = -1 |
| current selected row | |
| FXFont * | myIndexFont = nullptr |
| font for index | |
| FXFont * | myIndexSelectedFont = nullptr |
| font for index selected | |
| FXFont * | myProgramFont = nullptr |
| font for the phase table | |
| std::vector< Row * > | myRows |
| rows | |
| GNETLSEditorFrame::TLSPhases * | myTLSPhasesParent = nullptr |
| @frame pointer to TLSEditorFrame phases parent | |
Private Member Functions | |
| GNETLSTable (const GNETLSTable &)=delete | |
| Invalidated duplicate constructor. | |
| GNETLSTable & | operator= (const GNETLSTable &)=delete |
| Invalidated assignment operator. | |
Definition at line 40 of file GNETLSTable.h.
| GNETLSTable::GNETLSTable | ( | GNETLSEditorFrame::TLSPhases * | TLSPhasesParent | ) |
fox declaration
constructor (Exactly like the FXButton constructor)
Definition at line 81 of file GNETLSTable.cpp.
References GNETLSTable(), GUIDesignAuxiliarFrameFixedWidth, myIndexFont, myIndexSelectedFont, myProgramFont, myTLSPhasesParent, and recalcTableWidth().
Referenced by GNETLSTable::Cell::Cell(), GNETLSTable::Cell::Cell(), GNETLSTable::Cell::Cell(), GNETLSTable::Cell::Cell(), GNETLSTable::Column::Column(), GNETLSTable(), GNETLSTable(), operator=(), and GNETLSTable::Row::Row().
| GNETLSTable::~GNETLSTable | ( | ) |
destructor (Called automatically)
Definition at line 92 of file GNETLSTable.cpp.
References myIndexFont, myIndexSelectedFont, and myProgramFont.
|
privatedelete |
Invalidated duplicate constructor.
References GNETLSTable().
| void GNETLSTable::clearTable | ( | ) |
clear table
Definition at line 178 of file GNETLSTable.cpp.
References myColumns, and myRows.
Referenced by setTableSize().
| void GNETLSTable::disable | ( | ) |
| void GNETLSTable::enable | ( | ) |
| int GNETLSTable::getCurrentSelectedRow | ( | ) | const |
Get current selected row.
Definition at line 244 of file GNETLSTable.cpp.
References myCurrentSelectedRow.
| std::string GNETLSTable::getItemText | ( | const int | row, |
| const int | column ) const |
Return cell text.
Definition at line 228 of file GNETLSTable.cpp.
| int GNETLSTable::getNumRows | ( | ) | const |
| GNETLSEditorFrame::TLSPhases * GNETLSTable::getTLSPhasesParent | ( | ) | const |
@frame get pointer to TLSEditorFrame phases parent
Definition at line 127 of file GNETLSTable.cpp.
References myTLSPhasesParent.
Referenced by GNETLSTable::Column::Column(), and GNETLSTable::Row::Row().
|
protected |
move focus to current row
Definition at line 649 of file GNETLSTable.cpp.
References myCurrentSelectedRow, and myRows.
Referenced by onCmdKeyPress().
| long GNETLSTable::onCmdAddPhase | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when an add phase button is pressed
Definition at line 426 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdAddPhaseAllGreen | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when an add all green red phase button is pressed
Definition at line 506 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdAddPhaseAllGreenPriority | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when an add all green red phase button is pressed
Definition at line 526 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdAddPhaseAllRed | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when an add all green red phase button is pressed
Definition at line 466 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdAddPhaseAllYellow | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when an add all green red phase button is pressed
Definition at line 486 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdAddPhasePressed | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when add phase button is selected
Definition at line 347 of file GNETLSTable.cpp.
References myColumns, and myRows.
Referenced by FXDEFMAP().
| long GNETLSTable::onCmdDuplicatePhase | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a duplicate phase button is pressed
Definition at line 446 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdEditRow | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a row is modified
Definition at line 363 of file GNETLSTable.cpp.
References GUIDesignTextColorBlack, GUIDesignTextColorRed, myColumns, myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP().
| long GNETLSTable::onCmdKeyPress | ( | FXObject * | sender, |
| FXSelector | sel, | ||
| void * | ptr ) |
called when a key is pressed
Definition at line 388 of file GNETLSTable.cpp.
References moveFocus(), myCurrentSelectedRow, myRows, and updateIndexLabel().
Referenced by FXDEFMAP().
| long GNETLSTable::onCmdMoveDownPhase | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a move up phase button is pressed
Definition at line 582 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdMoveUpPhase | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a move up phase button is pressed
Definition at line 564 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onCmdRemovePhase | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a remove phase button is pressed
Definition at line 546 of file GNETLSTable.cpp.
References myRows, and myTLSPhasesParent.
Referenced by FXDEFMAP(), and testTable().
| long GNETLSTable::onFocusRow | ( | FXObject * | sender, |
| FXSelector | , | ||
| void * | ) |
called when a row is focused
Definition at line 324 of file GNETLSTable.cpp.
References myCurrentSelectedRow, myRows, and updateIndexLabel().
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
References GNETLSTable().
| void GNETLSTable::recalcTableWidth | ( | ) |
recalc width (call when all labels and contents are fill)
Definition at line 133 of file GNETLSTable.cpp.
References DEFAULTWIDTH, GNETLSTable::Column::getColumnMinimumWidth(), myColumns, myTLSPhasesParent, and GNETLSTable::Column::setColumnWidth().
Referenced by GNETLSTable().
| void GNETLSTable::selectRow | ( | const int | rowIndex | ) |
Select a row.
Definition at line 250 of file GNETLSTable.cpp.
References myCurrentSelectedRow, myRows, TL, and updateIndexLabel().
| void GNETLSTable::setColumnLabelBot | ( | const int | column, |
| const std::string & | text ) |
Change column bottom text.
Definition at line 273 of file GNETLSTable.cpp.
| void GNETLSTable::setColumnLabelTop | ( | const int | column, |
| const std::string & | text, | ||
| const std::string & | tooltip = "" ) |
Change column header text.
Definition at line 263 of file GNETLSTable.cpp.
| void GNETLSTable::setItemText | ( | FXint | row, |
| FXint | column, | ||
| const std::string & | text ) |
Modify cell text.
Definition at line 213 of file GNETLSTable.cpp.
References myColumns, myRows, TL, and updateAccumulatedDuration().
| void GNETLSTable::setTableSize | ( | const std::string & | columnsType, |
| const int | numberRow ) |
Set the table size to nr rows and nc columns; all existing items will be removed. Format: s -> select row (radio button) u -> duration (float, textField) f -> float (float, textField) p -> program (rrGggy..., textField) m -> name (automatic size, textField) i -> insert phase (button) d -> delete phase (button) t -> move phase up (button) b -> move phase down (button).
Definition at line 194 of file GNETLSTable.cpp.
References clearTable(), myColumns, and myRows.
| long GNETLSTable::testTable | ( | const InternalTestStep::TLSTableTest * | tableTest | ) |
test table (using internal tests)
Definition at line 283 of file GNETLSTable.cpp.
References InternalTestStep::TLSTableTest::column, GNETLSTable::Cell::getAddAllGreenPhaseButton(), GNETLSTable::Cell::getAddAllGreenPriorityPhaseButton(), GNETLSTable::Cell::getAddAllRedPhaseButton(), GNETLSTable::Cell::getAddAllYellowPhaseButton(), GNETLSTable::Cell::getAddPhaseButton(), GNETLSTable::Cell::getButton(), GNETLSTable::Cell::getDuplicatePhaseButton(), GNETLSTable::Cell::getTextField(), MID_GNE_TLSTABLE_ADDPHASE, MID_GNE_TLSTABLE_ADDPHASEALLGREEN, MID_GNE_TLSTABLE_ADDPHASEALLGREENPRIORITY, MID_GNE_TLSTABLE_ADDPHASEALLRED, MID_GNE_TLSTABLE_ADDPHASEALLYELLOW, MID_GNE_TLSTABLE_COPYPHASE, MID_GNE_TLSTABLE_MOVEDOWNPHASE, MID_GNE_TLSTABLE_MOVEUPPHASE, MID_GNE_TLSTABLE_REMOVEPHASE, MID_GNE_TLSTABLE_TEXTFIELD, myColumns, myRows, onCmdAddPhase(), onCmdAddPhaseAllGreen(), onCmdAddPhaseAllGreenPriority(), onCmdAddPhaseAllRed(), onCmdAddPhaseAllYellow(), onCmdDuplicatePhase(), onCmdMoveDownPhase(), onCmdMoveUpPhase(), onCmdRemovePhase(), InternalTestStep::TLSTableTest::row, InternalTestStep::TLSTableTest::sel, MFXTextFieldIcon::setText(), InternalTestStep::TLSTableTest::text, and TL.
|
protected |
update accumulated duration();
Definition at line 620 of file GNETLSTable.cpp.
References myColumns, myRows, TL, and toString().
Referenced by setItemText().
|
protected |
update index labels
Definition at line 600 of file GNETLSTable.cpp.
References myCurrentSelectedRow, myRows, and myTLSPhasesParent.
Referenced by onCmdKeyPress(), onFocusRow(), and selectRow().
|
protected |
columns
Definition at line 409 of file GNETLSTable.h.
Referenced by GNETLSTable::Cell::Cell(), clearTable(), getItemText(), onCmdAddPhasePressed(), onCmdEditRow(), recalcTableWidth(), GNETLSTable::Row::Row(), setColumnLabelBot(), setColumnLabelTop(), setItemText(), setTableSize(), testTable(), and updateAccumulatedDuration().
|
protected |
current selected row
Definition at line 415 of file GNETLSTable.h.
Referenced by getCurrentSelectedRow(), moveFocus(), onCmdKeyPress(), onFocusRow(), selectRow(), and updateIndexLabel().
|
protected |
font for index
Definition at line 400 of file GNETLSTable.h.
Referenced by GNETLSTable(), and ~GNETLSTable().
|
protected |
font for index selected
Definition at line 403 of file GNETLSTable.h.
Referenced by GNETLSTable(), and ~GNETLSTable().
|
protected |
font for the phase table
Definition at line 397 of file GNETLSTable.h.
Referenced by GNETLSTable(), and ~GNETLSTable().
|
protected |
rows
Definition at line 412 of file GNETLSTable.h.
Referenced by clearTable(), disable(), enable(), getItemText(), getNumRows(), moveFocus(), onCmdAddPhase(), onCmdAddPhaseAllGreen(), onCmdAddPhaseAllGreenPriority(), onCmdAddPhaseAllRed(), onCmdAddPhaseAllYellow(), onCmdAddPhasePressed(), onCmdDuplicatePhase(), onCmdEditRow(), onCmdKeyPress(), onCmdMoveDownPhase(), onCmdMoveUpPhase(), onCmdRemovePhase(), onFocusRow(), selectRow(), setItemText(), setTableSize(), testTable(), updateAccumulatedDuration(), and updateIndexLabel().
|
protected |
@frame pointer to TLSEditorFrame phases parent
Definition at line 406 of file GNETLSTable.h.
Referenced by getTLSPhasesParent(), GNETLSTable(), onCmdAddPhase(), onCmdAddPhaseAllGreen(), onCmdAddPhaseAllGreenPriority(), onCmdAddPhaseAllRed(), onCmdAddPhaseAllYellow(), onCmdDuplicatePhase(), onCmdEditRow(), onCmdMoveDownPhase(), onCmdMoveUpPhase(), onCmdRemovePhase(), recalcTableWidth(), and updateIndexLabel().