|
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, ID_LAST } |
| callback-enumerations More... | |
Public Member Functions | |
| void | addTracked (GUIGlObject &o, ValueSource< SUMOReal > *src, TrackerValueDesc *newTracked) |
| Adds a further time line to display. More... | |
| void | create () |
| Creates the window. More... | |
| GUIParameterTracker (GUIMainWindow &app, const std::string &name) | |
| Constructor (the tracker is empty) More... | |
| ~GUIParameterTracker () | |
| Destructor. More... | |
FOX-callbacks | |
| long | onConfigure (FXObject *, FXSelector, void *) |
| Called on window resizing. More... | |
| long | onPaint (FXObject *, FXSelector, void *) |
| Called if the window shall be repainted. More... | |
| long | onSimStep (FXObject *, FXSelector, void *) |
| Called on a simulation step. More... | |
| long | onCmdChangeAggregation (FXObject *, FXSelector, void *) |
| Called when the aggregation interval (combo) has been changed. More... | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| Called when the data shall be saved. More... | |
Protected Member Functions | |
| GUIParameterTracker () | |
| Fox needs this. More... | |
Protected Attributes | |
| FXdouble | myAggregationDelay |
| The simulation delay. More... | |
| FXComboBox * | myAggregationInterval |
| A combo box to select an aggregation interval. More... | |
| GUIMainWindow * | myApplication |
| The main application. More... | |
| GUIParameterTrackerPanel * | myPanel |
| The panel to display the values in. More... | |
| FXToolBar * | myToolBar |
| The tracker tool bar. More... | |
| FXToolBarShell * | myToolBarDrag |
| for some menu detaching fun More... | |
| std::vector< TrackerValueDesc * > | myTracked |
| The list of tracked values. More... | |
| std::vector< GLObjectValuePassConnector< SUMOReal > * > | myValuePassers |
| The value sources. More... | |
Private Member Functions | |
| void | buildToolBar () |
| Builds the tool bar. More... | |
Friends | |
| class | GUIParameterTrackerPanel |
| the panel may change some things More... | |
A window which displays the time line of one (or more) value(s)
Definition at line 49 of file GUIParameterTracker.h.
| anonymous enum |
callback-enumerations
| Enumerator | |
|---|---|
| MID_AGGREGATIONINTERVAL |
Change aggregation interval. |
| MID_SAVE |
Save the current values. |
| ID_LAST |
end-of-enum |
Definition at line 53 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 73 of file GUIParameterTracker.cpp.
References GUIIconSubSys::getIcon(), and ICON_APP_TRACKER.
| GUIParameterTracker::~GUIParameterTracker | ( | ) |
Destructor.
Definition at line 86 of file GUIParameterTracker.cpp.
References myApplication, myToolBar, myToolBarDrag, myTracked, myValuePassers, and GUIMainWindow::removeChild().
|
inlineprotected |
Fox needs this.
Definition at line 209 of file GUIParameterTracker.h.
| void GUIParameterTracker::addTracked | ( | GUIGlObject & | o, |
| ValueSource< SUMOReal > * | 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 131 of file GUIParameterTracker.cpp.
References myTracked, and myValuePassers.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker().
|
private |
Builds the tool bar.
Definition at line 108 of file GUIParameterTracker.cpp.
References GUIIconSubSys::getIcon(), ICON_SAVE, MID_AGGREGATIONINTERVAL, MID_SAVE, myAggregationInterval, myToolBar, and myToolBarDrag.
| void GUIParameterTracker::create | ( | ) |
Creates the window.
Definition at line 101 of file GUIParameterTracker.cpp.
References myToolBarDrag.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker().
| long GUIParameterTracker::onCmdChangeAggregation | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the aggregation interval (combo) has been changed.
Definition at line 161 of file GUIParameterTracker.cpp.
References myAggregationInterval, myTracked, and TIME2STEPS.
| long GUIParameterTracker::onCmdSave | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the data shall be saved.
Definition at line 195 of file GUIParameterTracker.cpp.
References OutputDevice::close(), gCurrentFolder, TrackerValueDesc::getAggregatedValues(), OutputDevice::getDevice(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), TrackerValueDesc::getName(), ICON_EMPTY, max, myTracked, and TrackerValueDesc::unlockValues().
| long GUIParameterTracker::onConfigure | ( | FXObject * | sender, |
| FXSelector | sel, | ||
| void * | data | ||
| ) |
Called on window resizing.
Definition at line 140 of file GUIParameterTracker.cpp.
References myPanel, and GUIParameterTracker::GUIParameterTrackerPanel::onConfigure().
| long GUIParameterTracker::onPaint | ( | FXObject * | sender, |
| FXSelector | sel, | ||
| void * | data | ||
| ) |
Called if the window shall be repainted.
Definition at line 147 of file GUIParameterTracker.cpp.
References myPanel, and GUIParameterTracker::GUIParameterTrackerPanel::onPaint().
| long GUIParameterTracker::onSimStep | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called on a simulation step.
Definition at line 154 of file GUIParameterTracker.cpp.
|
friend |
the panel may change some things
Definition at line 175 of file GUIParameterTracker.h.
|
protected |
The simulation delay.
Definition at line 202 of file GUIParameterTracker.h.
|
protected |
A combo box to select an aggregation interval.
Definition at line 199 of file GUIParameterTracker.h.
Referenced by buildToolBar(), and onCmdChangeAggregation().
|
protected |
The main application.
Definition at line 184 of file GUIParameterTracker.h.
Referenced by ~GUIParameterTracker().
|
protected |
The panel to display the values in.
Definition at line 190 of file GUIParameterTracker.h.
Referenced by onConfigure(), and onPaint().
|
protected |
The tracker tool bar.
Definition at line 205 of file GUIParameterTracker.h.
Referenced by buildToolBar(), and ~GUIParameterTracker().
|
protected |
for some menu detaching fun
Definition at line 196 of file GUIParameterTracker.h.
Referenced by buildToolBar(), create(), and ~GUIParameterTracker().
|
protected |
The list of tracked values.
Definition at line 187 of file GUIParameterTracker.h.
Referenced by addTracked(), onCmdChangeAggregation(), onCmdSave(), and ~GUIParameterTracker().
|
protected |
The value sources.
Definition at line 193 of file GUIParameterTracker.h.
Referenced by addTracked(), and ~GUIParameterTracker().