Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIParameterTracker Class Reference

A window which displays the time line of one (or more) value(s). More...

#include <GUIParameterTracker.h>

Inheritance diagram for GUIParameterTracker:
[legend]
Collaboration diagram for GUIParameterTracker:
[legend]

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.
MFXComboBoxIconmyAggregationInterval
 A combo box to select an aggregation interval.
GUIMainWindowmyApplication
 The main application.
FXCheckButton * myMultiPlot
 Whether phase names shall be printed instead of indices.
GUIParameterTrackerPanelmyPanel
 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< RGBColormyColors
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

Detailed Description

A window which displays the time line of one (or more) value(s).

Definition at line 46 of file GUIParameterTracker.h.

Member Enumeration Documentation

◆ anonymous enum

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.

Constructor & Destructor Documentation

◆ GUIParameterTracker()

GUIParameterTracker::GUIParameterTracker ( GUIMainWindow & app,
const std::string & name )

Constructor (the tracker is empty).

Parameters
[in]appThe main application window
[in]nameThe 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, GUIParameterTrackerPanel, RGBColor::MAGENTA, myApplication, myColors, myPanel, RGBColor::ORANGE, and RGBColor::RED.

Referenced by addTrackedMultiplot().

Here is the caller graph for this function:

◆ ~GUIParameterTracker()

GUIParameterTracker::~GUIParameterTracker ( )

Destructor.

Definition at line 88 of file GUIParameterTracker.cpp.

References myApplication, myMultiPlots, myToolBar, myToolBarDrag, myTracked, and myValuePassers.

Member Function Documentation

◆ addTracked()

void GUIParameterTracker::addTracked ( GUIGlObject & o,
ValueSource< double > * src,
TrackerValueDesc * newTracked )

Adds a further time line to display.

Parameters
[in]oThe object to get values from
[in]srcThe value source of the object
[in]newTrackedThe description of the tracked value

Definition at line 153 of file GUIParameterTracker.cpp.

References myTracked, and myValuePassers.

Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().

Here is the caller graph for this function:

◆ addTrackedMultiplot()

bool GUIParameterTracker::addTrackedMultiplot ( GUIGlObject & o,
ValueSource< double > * src,
TrackerValueDesc * newTracked )
static

all value source to multiplot trackers

Definition at line 135 of file GUIParameterTracker.cpp.

References RGBColor::BLACK, ValueSource< T >::copy(), TrackerValueDesc::getAggregationSpan(), TrackerValueDesc::getName(), TrackerValueDesc::getRecordingBegin(), GUIParameterTracker(), myMultiPlots, and STEPS2TIME.

Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().

Here is the caller graph for this function:

◆ buildToolBar()

void GUIParameterTracker::buildToolBar ( )
private

Builds the tool bar.

Definition at line 111 of file GUIParameterTracker.cpp.

References 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().

Here is the caller graph for this function:

◆ create()

void GUIParameterTracker::create ( )

Creates the window.

Definition at line 104 of file GUIParameterTracker.cpp.

References myToolBarDrag.

Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().

Here is the caller graph for this function:

◆ onCmdChangeAggregation()

long GUIParameterTracker::onCmdChangeAggregation ( FXObject * ,
FXSelector ,
void *  )

Called when the aggregation interval (combo) has been changed.

Definition at line 183 of file GUIParameterTracker.cpp.

References myAggregationInterval, myTracked, and TIME2STEPS.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSave()

long GUIParameterTracker::onCmdSave ( FXObject * ,
FXSelector ,
void *  )

Called when the data shall be saved.

Definition at line 216 of file GUIParameterTracker.cpp.

References OutputDevice::close(), SUMOXMLDefinitions::CSVFileExtensions, DELTA_T, EMPTY, gCurrentFolder, TrackerValueDesc::getAggregatedValues(), OutputDevice::getDevice(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), TrackerValueDesc::getName(), myTracked, time2string(), TL, and TrackerValueDesc::unlockValues().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onConfigure()

long GUIParameterTracker::onConfigure ( FXObject * sender,
FXSelector sel,
void * ptr )

Called on window resizing.

Definition at line 163 of file GUIParameterTracker.cpp.

References myPanel.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onMultiPlot()

long GUIParameterTracker::onMultiPlot ( FXObject * ,
FXSelector ,
void *  )

Called on a simulation step.

Definition at line 265 of file GUIParameterTracker.cpp.

References myMultiPlot, and myMultiPlots.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onPaint()

long GUIParameterTracker::onPaint ( FXObject * sender,
FXSelector sel,
void * ptr )

Called if the window shall be repainted.

Definition at line 170 of file GUIParameterTracker.cpp.

References myPanel.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onSimStep()

long GUIParameterTracker::onSimStep ( FXObject * ,
FXSelector ,
void *  )

Called on a simulation step.

Definition at line 177 of file GUIParameterTracker.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ GUIParameterTrackerPanel

friend class GUIParameterTrackerPanel
friend

the panel may change some things

Definition at line 179 of file GUIParameterTracker.h.

Referenced by GUIParameterTracker().

Field Documentation

◆ myAggregationDelay

FXdouble GUIParameterTracker::myAggregationDelay
protected

The simulation delay.

Definition at line 205 of file GUIParameterTracker.h.

◆ myAggregationInterval

MFXComboBoxIcon* GUIParameterTracker::myAggregationInterval
protected

A combo box to select an aggregation interval.

Definition at line 202 of file GUIParameterTracker.h.

Referenced by buildToolBar(), and onCmdChangeAggregation().

◆ myApplication

GUIMainWindow* GUIParameterTracker::myApplication
protected

The main application.

Definition at line 187 of file GUIParameterTracker.h.

Referenced by GUIParameterTracker(), and ~GUIParameterTracker().

◆ myColors

std::vector< RGBColor > GUIParameterTracker::myColors
staticprotected

◆ myMultiPlot

FXCheckButton* GUIParameterTracker::myMultiPlot
protected

Whether phase names shall be printed instead of indices.

Definition at line 211 of file GUIParameterTracker.h.

Referenced by buildToolBar(), and onMultiPlot().

◆ myMultiPlots

std::set< GUIParameterTracker * > GUIParameterTracker::myMultiPlots
staticprotected

all trackers that are opened for plotting multiple values

Definition at line 214 of file GUIParameterTracker.h.

Referenced by addTrackedMultiplot(), onMultiPlot(), and ~GUIParameterTracker().

◆ myPanel

GUIParameterTrackerPanel* GUIParameterTracker::myPanel
protected

The panel to display the values in.

Definition at line 193 of file GUIParameterTracker.h.

Referenced by GUIParameterTracker(), onConfigure(), and onPaint().

◆ myToolBar

FXToolBar* GUIParameterTracker::myToolBar
protected

The tracker tool bar.

Definition at line 208 of file GUIParameterTracker.h.

Referenced by buildToolBar(), and ~GUIParameterTracker().

◆ myToolBarDrag

FXToolBarShell* GUIParameterTracker::myToolBarDrag
protected

for some menu detaching fun

Definition at line 199 of file GUIParameterTracker.h.

Referenced by buildToolBar(), create(), and ~GUIParameterTracker().

◆ myTracked

std::vector<TrackerValueDesc*> GUIParameterTracker::myTracked
protected

The list of tracked values.

Definition at line 190 of file GUIParameterTracker.h.

Referenced by addTracked(), onCmdChangeAggregation(), onCmdSave(), and ~GUIParameterTracker().

◆ myValuePassers

std::vector<GLObjectValuePassConnector<double>*> GUIParameterTracker::myValuePassers
protected

The value sources.

Definition at line 196 of file GUIParameterTracker.h.

Referenced by addTracked(), and ~GUIParameterTracker().


The documentation for this class was generated from the following files: