Eclipse SUMO - Simulation of Urban MObility
|
A window which displays the time line of one (or more) value(s) More...
#include <GUIParameterTracker.h>
Data Structures | |
class | GUIParameterTrackerPanel |
Public Types | |
enum | { MID_AGGREGATIONINTERVAL = FXMainWindow::ID_LAST , MID_SAVE , MID_MULTIPLOT , ID_LAST } |
callback-enumerations More... | |
Public Member Functions | |
void | addTracked (GUIGlObject &o, ValueSource< double > *src, TrackerValueDesc *newTracked) |
Adds a further time line to display. | |
void | create () |
Creates the window. | |
GUIParameterTracker (GUIMainWindow &app, const std::string &name) | |
Constructor (the tracker is empty) | |
~GUIParameterTracker () | |
Destructor. | |
FOX-callbacks | |
long | onConfigure (FXObject *, FXSelector, void *) |
Called on window resizing. | |
long | onPaint (FXObject *, FXSelector, void *) |
Called if the window shall be repainted. | |
long | onSimStep (FXObject *, FXSelector, void *) |
Called on a simulation step. | |
long | onMultiPlot (FXObject *, FXSelector, void *) |
Called on a simulation step. | |
long | onCmdChangeAggregation (FXObject *, FXSelector, void *) |
Called when the aggregation interval (combo) has been changed. | |
long | onCmdSave (FXObject *, FXSelector, void *) |
Called when the data shall be saved. | |
Static Public Member Functions | |
static bool | addTrackedMultiplot (GUIGlObject &o, ValueSource< double > *src, TrackerValueDesc *newTracked) |
all value source to multiplot trackers | |
Protected Attributes | |
FXdouble | myAggregationDelay |
The simulation delay. | |
MFXComboBoxIcon * | myAggregationInterval |
A combo box to select an aggregation interval. | |
GUIMainWindow * | myApplication |
The main application. | |
FXCheckButton * | myMultiPlot |
Whether phase names shall be printed instead of indices. | |
GUIParameterTrackerPanel * | myPanel |
The panel to display the values in. | |
FXToolBar * | myToolBar |
The tracker tool bar. | |
FXToolBarShell * | myToolBarDrag |
for some menu detaching fun | |
std::vector< TrackerValueDesc * > | myTracked |
The list of tracked values. | |
std::vector< GLObjectValuePassConnector< double > * > | myValuePassers |
The value sources. | |
Static Protected Attributes | |
static std::vector< RGBColor > | myColors |
static std::set< GUIParameterTracker * > | myMultiPlots |
all trackers that are opened for plotting multiple values | |
Private Member Functions | |
void | buildToolBar () |
Builds the tool bar. | |
Friends | |
class | GUIParameterTrackerPanel |
the panel may change some things | |
A window which displays the time line of one (or more) value(s)
Definition at line 46 of file GUIParameterTracker.h.
anonymous enum |
callback-enumerations
Enumerator | |
---|---|
MID_AGGREGATIONINTERVAL | Change aggregation interval. |
MID_SAVE | Save the current values. |
MID_MULTIPLOT | toggle multiplot |
ID_LAST | end-of-enum |
Definition at line 50 of file GUIParameterTracker.h.
GUIParameterTracker::GUIParameterTracker | ( | GUIMainWindow & | app, |
const std::string & | name | ||
) |
Constructor (the tracker is empty)
[in] | app | The main application window |
[in] | name | The title of the tracker |
Definition at line 70 of file GUIParameterTracker.cpp.
References GUIMainWindow::addChild(), APP_TRACKER, RGBColor::BLACK, RGBColor::BLUE, buildToolBar(), RGBColor::CYAN, GUIIconSubSys::getIcon(), RGBColor::GREEN, RGBColor::MAGENTA, myApplication, myColors, myPanel, RGBColor::ORANGE, and RGBColor::RED.
GUIParameterTracker::~GUIParameterTracker | ( | ) |
Destructor.
Definition at line 88 of file GUIParameterTracker.cpp.
References myApplication, myMultiPlots, myToolBar, myToolBarDrag, myTracked, myValuePassers, and GUIMainWindow::removeChild().
void GUIParameterTracker::addTracked | ( | GUIGlObject & | o, |
ValueSource< double > * | src, | ||
TrackerValueDesc * | newTracked | ||
) |
Adds a further time line to display.
[in] | o | The object to get values from |
[in] | src | The value source of the object |
[in] | newTracked | The description of the tracked value |
Definition at line 154 of file GUIParameterTracker.cpp.
References myTracked, and myValuePassers.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().
|
static |
all value source to multiplot trackers
Definition at line 136 of file GUIParameterTracker.cpp.
References RGBColor::BLACK, ValueSource< T >::copy(), TrackerValueDesc::getAggregationSpan(), TrackerValueDesc::getName(), TrackerValueDesc::getRecordingBegin(), myMultiPlots, and STEPS2TIME.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().
|
private |
Builds the tool bar.
Definition at line 111 of file GUIParameterTracker.cpp.
References MFXComboBoxIcon::appendIconItem(), GUIDesigns::buildFXButton(), GUIIconSubSys::getIcon(), GUIDesignButtonToolbar, GUIDesignComboBoxStatic, GUIDesignComboBoxVisibleItems, GUIDesignToolBar, GUIDesignToolBarGrip, MID_AGGREGATIONINTERVAL, MID_MULTIPLOT, MID_SAVE, myAggregationInterval, myMultiPlot, myToolBar, myToolBarDrag, SAVE, and TL.
Referenced by GUIParameterTracker().
void GUIParameterTracker::create | ( | ) |
Creates the window.
Definition at line 104 of file GUIParameterTracker.cpp.
References myToolBarDrag.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().
long GUIParameterTracker::onCmdChangeAggregation | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the aggregation interval (combo) has been changed.
Definition at line 184 of file GUIParameterTracker.cpp.
References MFXComboBoxIcon::getCurrentItem(), myAggregationInterval, myTracked, and TIME2STEPS.
Referenced by FXDEFMAP().
long GUIParameterTracker::onCmdSave | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the data shall be saved.
Definition at line 217 of file GUIParameterTracker.cpp.
References OutputDevice::close(), DELTA_T, EMPTY, gCurrentFolder, TrackerValueDesc::getAggregatedValues(), OutputDevice::getDevice(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), TrackerValueDesc::getName(), myTracked, time2string(), TL, and TrackerValueDesc::unlockValues().
Referenced by FXDEFMAP().
long GUIParameterTracker::onConfigure | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
Called on window resizing.
Definition at line 164 of file GUIParameterTracker.cpp.
References myPanel, and GUIParameterTracker::GUIParameterTrackerPanel::onConfigure().
Referenced by FXDEFMAP().
long GUIParameterTracker::onMultiPlot | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called on a simulation step.
Definition at line 264 of file GUIParameterTracker.cpp.
References myMultiPlot, and myMultiPlots.
Referenced by FXDEFMAP().
long GUIParameterTracker::onPaint | ( | FXObject * | sender, |
FXSelector | sel, | ||
void * | ptr | ||
) |
Called if the window shall be repainted.
Definition at line 171 of file GUIParameterTracker.cpp.
References myPanel, and GUIParameterTracker::GUIParameterTrackerPanel::onPaint().
Referenced by FXDEFMAP().
long GUIParameterTracker::onSimStep | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called on a simulation step.
Definition at line 178 of file GUIParameterTracker.cpp.
Referenced by FXDEFMAP().
|
friend |
the panel may change some things
Definition at line 179 of file GUIParameterTracker.h.
|
protected |
The simulation delay.
Definition at line 205 of file GUIParameterTracker.h.
|
protected |
A combo box to select an aggregation interval.
Definition at line 202 of file GUIParameterTracker.h.
Referenced by buildToolBar(), and onCmdChangeAggregation().
|
protected |
The main application.
Definition at line 187 of file GUIParameterTracker.h.
Referenced by GUIParameterTracker(), and ~GUIParameterTracker().
|
staticprotected |
Definition at line 215 of file GUIParameterTracker.h.
Referenced by GUIParameterTracker::GUIParameterTrackerPanel::drawValues(), and GUIParameterTracker().
|
protected |
Whether phase names shall be printed instead of indices.
Definition at line 211 of file GUIParameterTracker.h.
Referenced by buildToolBar(), and onMultiPlot().
|
staticprotected |
all trackers that are opened for plotting multiple values
Definition at line 214 of file GUIParameterTracker.h.
Referenced by addTrackedMultiplot(), onMultiPlot(), and ~GUIParameterTracker().
|
protected |
The panel to display the values in.
Definition at line 193 of file GUIParameterTracker.h.
Referenced by GUIParameterTracker(), onConfigure(), and onPaint().
|
protected |
The tracker tool bar.
Definition at line 208 of file GUIParameterTracker.h.
Referenced by buildToolBar(), and ~GUIParameterTracker().
|
protected |
for some menu detaching fun
Definition at line 199 of file GUIParameterTracker.h.
Referenced by buildToolBar(), create(), and ~GUIParameterTracker().
|
protected |
The list of tracked values.
Definition at line 190 of file GUIParameterTracker.h.
Referenced by addTracked(), onCmdChangeAggregation(), onCmdSave(), and ~GUIParameterTracker().
|
protected |
The value sources.
Definition at line 196 of file GUIParameterTracker.h.
Referenced by addTracked(), and ~GUIParameterTracker().