VR-Exchange 2.10 API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Signals | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
MAKVrExchange::DtFrameratePlot Class Reference

A QwtPlot Widget customized for plotting broker framerates. More...

Inheritance diagram for MAKVrExchange::DtFrameratePlot:
Inheritance graph
[legend]

Signals

void seriesEnabledStateChanged (unsigned int seriesId, bool enabled)
 Notifies listeners that the enabled state of the series changed. More...
 

Public Member Functions

virtual ~DtFrameratePlot ()
 Virtual DTOR. More...
 
virtual void initialize (bool showLegend)
 Applies styles to the plot. More...
 
virtual void setShowTimeLabels (bool show)
 Sets whether the X-Axis time labels are visible. More...
 
virtual void setLockUpdates (bool lock)
 Sets whether updates. More...
 
virtual DtFrameratePlotSeriescreatePlotSeries (unsigned int seriesId, const QColor &color, Qt::PenStyle style, const QString &dispName=QString())
 Creates a new series to display on the plot. More...
 
virtual DtFrameratePlotSeriescreatePlotSeries (unsigned int seriesId, const QPen &pen, const QString &dispName=QString())
 Creates a new series to display on the plot. More...
 
virtual bool removeSeries (unsigned int seriesId)
 Removes the series with the given id from the plot. More...
 
virtual DtFrameratePlotSeriesfindSeries (unsigned int seriesId)
 Finds the series with the given ID and returns it. More...
 
virtual QwtLegend * createLegend ()
 Creates a legend for the plot. More...
 
virtual void setFixedXAxisLength (double xAxisLength)
 Set the fixed length of the X-Axis. More...
 
virtual double fixedXAxisLength () const
 Get the currently set fixed X-Axis length. More...
 
virtual void setLazyMinMaxEnabled (bool enabled)
 Set whether min/max calculation limiting should be enabled. More...
 
virtual bool lazyMinMaxEnabled () const
 Get whether lazy min/max calculations are enabled. More...
 
virtual void updateSeries (unsigned int seriesId, double t, double val)
 Updates the given series with the given values Updates the series with the given values, updates the plot's scaling, and performs a replot. More...
 
virtual void updateAxisScaling ()
 Updates the axis scaling to show the only the data range. More...
 
virtual void updateAxisScaling (double t)
 Updates the axis scaling to show the only the data range. More...
 
virtual double getMaxVal () const
 Accessor for the plot's max value of all series. More...
 
virtual double getMinVal () const
 Accessor for the plot's min value of all series. More...
 
virtual void setSeriesEnabled (unsigned int seriesId, bool enabled)
 Sets the series with the given id to be enabled or not. More...
 
virtual void setSeriesEnabled (QwtPlotItem *item, bool enabled)
 Sets the given series to be enabled or not. More...
 
virtual void clear ()
 Clears the data values for all series and replots. More...
 
virtual QSize sizeHint () const
 Returns the size hint for the plot. More...
 

Static Public Member Functions

static DtFrameratePlotcreate ()
 Instantiates and initializes a new DtFrameratePlot. More...
 
static DtFrameratePlotcreate (LegendPosition legendPos)
 Instantiates and initializes a new DtFrameratePlot. More...
 

Protected Types

typedef std::map< unsigned int,
DtFrameratePlotSeries * > 
SeriesMap
 

Protected Member Functions

 DtFrameratePlot ()
 Protected CTOR (use create(..)) This CTOR creates a plot with no legend. More...
 
 DtFrameratePlot (LegendPosition legendPos)
 Protected CTOR (use create(..)) Instantiates a new plot with grid lines and scrolling. More...
 
virtual void recomputeMinMax () const
 Computes the plot's min and max values of all series. More...
 
virtual QPen createPen (const QColor &color, Qt::PenStyle style=Qt::SolidLine, int width=0)
 Utility method for creating a pen with the given color and width. More...
 

Protected Attributes

SeriesMap mySeries
 
LegendPosition myLegendPosition
 
double myFixedXAxisLength
 
double myMaxVal
 
double myMinVal
 
bool myEnableLazyMinMaxFlag
 
bool myDirtyMinMaxFlag
 
bool myLockUpdatesFlag
 
bool myDirtyPlotFlag
 

Static Protected Attributes

static const float theScaleFactor
 Constant used for scaling y axis. More...
 

Detailed Description

A QwtPlot Widget customized for plotting broker framerates.

Member Typedef Documentation

typedef std::map<unsigned int,DtFrameratePlotSeries*> MAKVrExchange::DtFrameratePlot::SeriesMap
protected

Constructor & Destructor Documentation

virtual MAKVrExchange::DtFrameratePlot::~DtFrameratePlot ( )
virtual

Virtual DTOR.

MAKVrExchange::DtFrameratePlot::DtFrameratePlot ( )
protected

Protected CTOR (use create(..)) This CTOR creates a plot with no legend.

Instantiates a new plot with grid lines and scrolling

MAKVrExchange::DtFrameratePlot::DtFrameratePlot ( LegendPosition  legendPos)
protected

Protected CTOR (use create(..)) Instantiates a new plot with grid lines and scrolling.

Parameters
legendPoswhere to position the legend relative to the plot.

Member Function Documentation

virtual void MAKVrExchange::DtFrameratePlot::clear ( )
virtual

Clears the data values for all series and replots.

static DtFrameratePlot* MAKVrExchange::DtFrameratePlot::create ( )
static

Instantiates and initializes a new DtFrameratePlot.

static DtFrameratePlot* MAKVrExchange::DtFrameratePlot::create ( LegendPosition  legendPos)
static

Instantiates and initializes a new DtFrameratePlot.

Parameters
legendPoswhere to position the legend relative to the plot.
virtual QwtLegend* MAKVrExchange::DtFrameratePlot::createLegend ( )
virtual

Creates a legend for the plot.

virtual QPen MAKVrExchange::DtFrameratePlot::createPen ( const QColor &  color,
Qt::PenStyle  style = Qt::SolidLine,
int  width = 0 
)
protectedvirtual

Utility method for creating a pen with the given color and width.

Parameters
colorthe color to make the pen
stylethe style of line to draw
widththe width of the pen
virtual DtFrameratePlotSeries* MAKVrExchange::DtFrameratePlot::createPlotSeries ( unsigned int  seriesId,
const QColor &  color,
Qt::PenStyle  style,
const QString &  dispName = QString() 
)
virtual

Creates a new series to display on the plot.

Parameters
seriesIdan integer ID uniquely identifying the series
colorthe color of the series lines
stylethe style of the series lines
dispNamea logical name for the series (to be displayed on the legend)
virtual DtFrameratePlotSeries* MAKVrExchange::DtFrameratePlot::createPlotSeries ( unsigned int  seriesId,
const QPen &  pen,
const QString &  dispName = QString() 
)
virtual

Creates a new series to display on the plot.

Parameters
seriesIdan integer ID uniquely identifying the series
penthe pen to use for the series lines
dispNamea logical name for the series (to be displayed on the legend)
virtual DtFrameratePlotSeries* MAKVrExchange::DtFrameratePlot::findSeries ( unsigned int  seriesId)
virtual

Finds the series with the given ID and returns it.

Returns
returns the series with the given ID or NULL if there wasn't one
virtual double MAKVrExchange::DtFrameratePlot::fixedXAxisLength ( ) const
virtual

Get the currently set fixed X-Axis length.

virtual double MAKVrExchange::DtFrameratePlot::getMaxVal ( ) const
virtual

Accessor for the plot's max value of all series.

If the value needs to be recomputed, does so before returning the value. Methods should use this rather than accessing the myMaxVal directly because this method will force it to be computed.

virtual double MAKVrExchange::DtFrameratePlot::getMinVal ( ) const
virtual

Accessor for the plot's min value of all series.

If the value needs to be recomputed, does so before returning the value. Methods should use this rather than accessing the myMinVal directly because this method will force it to be computed.

virtual void MAKVrExchange::DtFrameratePlot::initialize ( bool  showLegend)
virtual

Applies styles to the plot.

Parameters
showLegendwhether the plot's legend should be visible.
legendPoswhere to position the legend relative to the plot.
unitLabellabel for the units of the y axis.
virtual bool MAKVrExchange::DtFrameratePlot::lazyMinMaxEnabled ( ) const
virtual

Get whether lazy min/max calculations are enabled.

virtual void MAKVrExchange::DtFrameratePlot::recomputeMinMax ( ) const
protectedvirtual

Computes the plot's min and max values of all series.

Iterates over the plot's series and determines the min and max values.

virtual bool MAKVrExchange::DtFrameratePlot::removeSeries ( unsigned int  seriesId)
virtual

Removes the series with the given id from the plot.

Parameters
seriesIdthe id of the series to remove.
void MAKVrExchange::DtFrameratePlot::seriesEnabledStateChanged ( unsigned int  seriesId,
bool  enabled 
)
signal

Notifies listeners that the enabled state of the series changed.

Non-virtual - Signals cannot be declared virtual.

virtual void MAKVrExchange::DtFrameratePlot::setFixedXAxisLength ( double  xAxisLength)
virtual

Set the fixed length of the X-Axis.

If set, the plot will only display the most recent data points that fall in the most recent xAxisLength range. If set to 0, the plot will resize to fit all values.

virtual void MAKVrExchange::DtFrameratePlot::setLazyMinMaxEnabled ( bool  enabled)
virtual

Set whether min/max calculation limiting should be enabled.

Disabling this causes the last calculated min/max values to be stored and returned for further calls until one of the plot's series is updated. Series created by the plot inherit this setting. Note: If rescaling actions are being performed on the plot independently from the updating of the plot's series, this may need to be disabled to work correctly in conjunction with the series' onlyVisibleMinMax setting.

virtual void MAKVrExchange::DtFrameratePlot::setLockUpdates ( bool  lock)
virtual

Sets whether updates.

virtual void MAKVrExchange::DtFrameratePlot::setSeriesEnabled ( unsigned int  seriesId,
bool  enabled 
)
virtual

Sets the series with the given id to be enabled or not.

If the series is enabled, it is visible and its min/max values are factored into scaling calculations; if the series is disabled, it is not visible and is not used in scaling calculations.

virtual void MAKVrExchange::DtFrameratePlot::setSeriesEnabled ( QwtPlotItem *  item,
bool  enabled 
)
virtual

Sets the given series to be enabled or not.

If the series is enabled, it is visible and its min/max values are factored into scaling calculations; if the series is disabled, it is not visible and is not used in scaling calculations.

virtual void MAKVrExchange::DtFrameratePlot::setShowTimeLabels ( bool  show)
virtual

Sets whether the X-Axis time labels are visible.

virtual QSize MAKVrExchange::DtFrameratePlot::sizeHint ( ) const
virtual

Returns the size hint for the plot.

Overridden to allow smaller plots.

virtual void MAKVrExchange::DtFrameratePlot::updateAxisScaling ( )
virtual

Updates the axis scaling to show the only the data range.

Looks up most recently plotted time and calls updateAxisScaling( double ).

virtual void MAKVrExchange::DtFrameratePlot::updateAxisScaling ( double  t)
virtual

Updates the axis scaling to show the only the data range.

Updates the y axis scaling so all points on all series are visible. Updates the x axis scaling to respect the fixedXAxisLength (if set).

Parameters
tthe latest x axis value plotted.
virtual void MAKVrExchange::DtFrameratePlot::updateSeries ( unsigned int  seriesId,
double  t,
double  val 
)
virtual

Updates the given series with the given values Updates the series with the given values, updates the plot's scaling, and performs a replot.

Does nothing if the series ID is invalid.

Parameters
seriesIdthe id of the series to update
tthe time (x) value to update with
valthe value (y) value to update with

Member Data Documentation

bool MAKVrExchange::DtFrameratePlot::myDirtyMinMaxFlag
mutableprotected
bool MAKVrExchange::DtFrameratePlot::myDirtyPlotFlag
mutableprotected
bool MAKVrExchange::DtFrameratePlot::myEnableLazyMinMaxFlag
protected
double MAKVrExchange::DtFrameratePlot::myFixedXAxisLength
protected
LegendPosition MAKVrExchange::DtFrameratePlot::myLegendPosition
protected
bool MAKVrExchange::DtFrameratePlot::myLockUpdatesFlag
mutableprotected
double MAKVrExchange::DtFrameratePlot::myMaxVal
mutableprotected
double MAKVrExchange::DtFrameratePlot::myMinVal
mutableprotected
SeriesMap MAKVrExchange::DtFrameratePlot::mySeries
protected
const float MAKVrExchange::DtFrameratePlot::theScaleFactor
staticprotected

Constant used for scaling y axis.


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

Document ID: Generated on Mon May 25 18:45:12 EDT 2026 from SVN revision 289111
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)