![]() |
Eclipse SUMO - Simulation of Urban MObility
|
Editor for simulation breakpoints. More...
#include <GUIDialog_Breakpoints.h>
Public Member Functions | |
GUIDialog_Breakpoints (GUIMainWindow *parent, std::vector< SUMOTime > &breakpoints, FXMutex &breakpointLock) | |
Constructor. More... | |
virtual void | layout () |
void | show () |
sets the focus after the window is created More... | |
~GUIDialog_Breakpoints () | |
Destructor. More... | |
FOX-callbacks | |
long | onCmdLoad (FXObject *, FXSelector, void *) |
Called when the user presses the Load-button. More... | |
long | onCmdSave (FXObject *, FXSelector, void *) |
Called when the user presses the Save-button. More... | |
long | onCmdClear (FXObject *, FXSelector, void *) |
Called when the user presses the Clear-button. More... | |
long | onCmdClose (FXObject *, FXSelector, void *) |
Called when the user presses the Close-button. More... | |
long | onCmdEditTable (FXObject *, FXSelector, void *) |
Called when the table was changed. More... | |
Protected Member Functions | |
GUIDialog_Breakpoints () | |
FOX needs this. More... | |
Private Member Functions | |
std::string | encode2TXT () |
Builds a text representation of the items in the list. More... | |
void | rebuildList () |
Rebuilds the entire list. More... | |
Private Attributes | |
FXMutex * | myBreakpointLock |
Lock for modifying the list of breakpoints. More... | |
std::vector< SUMOTime > * | myBreakpoints |
List of breakpoints. More... | |
GUIMainWindow * | myParent |
The parent window. More... | |
FXTable * | myTable |
The list that holds the ids. More... | |
Editor for simulation breakpoints.
This dialog shows and lets the user edit the list of breakpoints - simulation time steps where the simulation halts.
Definition at line 43 of file GUIDialog_Breakpoints.h.
GUIDialog_Breakpoints::GUIDialog_Breakpoints | ( | GUIMainWindow * | parent, |
std::vector< SUMOTime > & | breakpoints, | ||
FXMutex & | breakpointLock | ||
) |
Constructor.
[in] | parent | The parent window |
Definition at line 69 of file GUIDialog_Breakpoints.cpp.
References GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignBreakpointTable, GUIDesignChooserButtons, GUIDesignChooserLayoutLeft, GUIDesignChooserLayoutRight, GUIDesignHorizontalSeparator, ICON_CLEANJUNCTIONS, ICON_NO, ICON_OPEN_CONFIG, ICON_SAVE, MID_CANCEL, MID_CHOOSEN_CLEAR, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, and MID_TABLE.
GUIDialog_Breakpoints::~GUIDialog_Breakpoints | ( | ) |
Destructor.
Definition at line 103 of file GUIDialog_Breakpoints.cpp.
References myParent, and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 82 of file GUIDialog_Breakpoints.h.
References encode2TXT(), and rebuildList().
|
private |
Builds a text representation of the items in the list.
Definition at line 175 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, myBreakpoints, and time2string().
Referenced by GUIDialog_Breakpoints(), and onCmdSave().
|
virtual |
Definition at line 235 of file GUIDialog_Breakpoints.cpp.
References myTable.
long GUIDialog_Breakpoints::onCmdClear | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Clear-button.
Definition at line 187 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, myBreakpoints, and rebuildList().
long GUIDialog_Breakpoints::onCmdClose | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Close-button.
Definition at line 197 of file GUIDialog_Breakpoints.cpp.
long GUIDialog_Breakpoints::onCmdEditTable | ( | FXObject * | , |
FXSelector | , | ||
void * | data | ||
) |
Called when the table was changed.
Definition at line 204 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, myBreakpoints, myTable, StringUtils::prune(), rebuildList(), and string2time().
long GUIDialog_Breakpoints::onCmdLoad | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Load-button.
Definition at line 136 of file GUIDialog_Breakpoints.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, GUISettingsHandler::loadBreakpoints(), myBreakpointLock, myBreakpoints, and rebuildList().
long GUIDialog_Breakpoints::onCmdSave | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Save-button.
Definition at line 157 of file GUIDialog_Breakpoints.cpp.
References OutputDevice::close(), encode2TXT(), gCurrentFolder, OutputDevice::getDevice(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), and ICON_EMPTY.
|
private |
Rebuilds the entire list.
Definition at line 117 of file GUIDialog_Breakpoints.cpp.
References GUIDesignBreakpointTableHeaderHeight, myBreakpoints, myTable, and time2string().
Referenced by GUIDialog_Breakpoints(), onCmdClear(), onCmdEditTable(), and onCmdLoad().
void GUIDialog_Breakpoints::show | ( | ) |
sets the focus after the window is created
Definition at line 110 of file GUIDialog_Breakpoints.cpp.
References myBreakpoints, and myTable.
Referenced by GUIApplicationWindow::onCmdEditBreakpoints().
|
private |
Lock for modifying the list of breakpoints.
Definition at line 103 of file GUIDialog_Breakpoints.h.
Referenced by encode2TXT(), onCmdClear(), onCmdEditTable(), and onCmdLoad().
|
private |
List of breakpoints.
Definition at line 100 of file GUIDialog_Breakpoints.h.
Referenced by encode2TXT(), onCmdClear(), onCmdEditTable(), onCmdLoad(), rebuildList(), and show().
|
private |
The parent window.
Definition at line 97 of file GUIDialog_Breakpoints.h.
Referenced by ~GUIDialog_Breakpoints().
|
private |
The list that holds the ids.
Definition at line 94 of file GUIDialog_Breakpoints.h.
Referenced by layout(), onCmdEditTable(), rebuildList(), and show().