MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes

A tab widget with components for graphing data over time. More...

+ Inheritance diagram for DtAssistantPlotWidget:
+ Collaboration diagram for DtAssistantPlotWidget:

Public Member Functions

 DtAssistantPlotWidget (const QString &units, QWidget *parent=0)
 Default CTOR Instantiates a new DtAssistantPlotWidget.
virtual ~DtAssistantPlotWidget ()
 Virtual DTOR (no-op)
virtual unsigned createNewSeries (const QString &seriesName)
 Creates a new series to be plotted and returns the series ID.
virtual void updateSeries (unsigned seriesId, double time, double val)
 Updates the given plotter's series with the latest data.
virtual void setSeriesData (unsigned seriesId, double *times, double *vals, unsigned numVals)
 Updates the given plotter's series with the latest data.
virtual void clear ()
 Clears all data from the plot.
virtual const DtAssistantPlotplotter () const
virtual DtAssistantPlotplotter ()
virtual void updatePlots ()
virtual QSize sizeHint () const

Protected Slots

void visibleTimeScaleFactorChanged (float factor)
void scrollbarPositionChanged (int val)
 Updates the visible plot ranges when the scrollbar is adjusted.

Protected Member Functions

void layoutTab ()
 Sets up the layout of the tab (non-virtual) This method is called from the constructor to set up the tab's layout on instantiation.
virtual void resizeEvent (QResizeEvent *evt)
 Updates the amount of time visible on the plot when resized.

Protected Attributes

unsigned myNextSeriesId
double myLastPlottedTime
double myFirstPlottedTime
double myNumSecondsVisible
float myVisibleTimeScaleFactor
DtAssistantPlotmyPlotter
QScrollBar * myScrollbar
QAction * myAction
QString myUnits

Detailed Description

A tab widget with components for graphing data over time.

Constructor & Destructor Documentation

DtAssistantPlotWidget::DtAssistantPlotWidget ( const QString &  units,
QWidget parent = 0 
)

Default CTOR Instantiates a new DtAssistantPlotWidget.

Parameters
unitsthe units for the y axis
parentthe QWidget's parent

References layoutTab().

DtAssistantPlotWidget::~DtAssistantPlotWidget ( )
virtual

Virtual DTOR (no-op)

References myPlotter, and myScrollbar.

Member Function Documentation

void DtAssistantPlotWidget::clear ( )
virtual

Clears all data from the plot.

References DtAssistantPlot::clear(), and myPlotter.

Referenced by DtGraphDialog::clearGraph().

unsigned DtAssistantPlotWidget::createNewSeries ( const QString &  seriesName)
virtual

Creates a new series to be plotted and returns the series ID.

Parameters
seriesNamethe name assigned to the new series

References DtAssistantPlot::createPlotSeries(), myNextSeriesId, myPlotter, DtAssistantPlotSeries::seriesId(), and DtAssistantPlot::setSeriesEnabled().

Referenced by DtGraphDialog::DtGraphDialog().

void DtAssistantPlotWidget::layoutTab ( )
protected

Sets up the layout of the tab (non-virtual) This method is called from the constructor to set up the tab's layout on instantiation.

References connect(), DtAssistantPlot::create(), myPlotter, myScrollbar, myUnits, and scrollbarPositionChanged().

Referenced by DtAssistantPlotWidget().

const DtAssistantPlot & DtAssistantPlotWidget::plotter ( ) const
virtual

References myPlotter.

DtAssistantPlot & DtAssistantPlotWidget::plotter ( )
virtual

References myPlotter.

void DtAssistantPlotWidget::resizeEvent ( QResizeEvent *  evt)
protectedvirtual

Updates the amount of time visible on the plot when resized.

References myNumSecondsVisible, myPlotter, myVisibleTimeScaleFactor, and updatePlots().

void DtAssistantPlotWidget::scrollbarPositionChanged ( int  val)
protectedslot

Updates the visible plot ranges when the scrollbar is adjusted.

Parameters
valthe new value of the scrollbar

References updatePlots().

Referenced by layoutTab().

void DtAssistantPlotWidget::setSeriesData ( unsigned  seriesId,
double *  times,
double *  vals,
unsigned  numVals 
)
virtual

Updates the given plotter's series with the latest data.

Parameters
seriesIdthe id of the series to set
timesthe times for each snapshot of data ( x axis values )
valsthe values of the data at the given times ( y axis values )
numValsthe number of values in times and vals

References DtAssistantPlot::findSeries(), myLastPlottedTime, myPlotter, myScrollbar, DtAssistantPlotSeries::setData(), and updatePlots().

QSize DtAssistantPlotWidget::sizeHint ( ) const
virtual
void DtAssistantPlotWidget::updatePlots ( )
virtual
void DtAssistantPlotWidget::updateSeries ( unsigned  seriesId,
double  time,
double  val 
)
virtual

Updates the given plotter's series with the latest data.

Parameters
seriesIdthe id of the series to update
timethe time the data snapshot was taken ( x axis value )
valthe value of the data at the given time ( y axis value )

References myFirstPlottedTime, myLastPlottedTime, myPlotter, DtAssistantPlot::setBaseTime(), DtAssistantPlot::setLockUpdates(), updatePlots(), and DtAssistantPlot::updateSeries().

Referenced by DtGraphDialog::addPoint().

void DtAssistantPlotWidget::visibleTimeScaleFactorChanged ( float  factor)
protectedslot

Member Data Documentation

QAction* DtAssistantPlotWidget::myAction
protected
double DtAssistantPlotWidget::myFirstPlottedTime
protected

Referenced by updatePlots(), and updateSeries().

double DtAssistantPlotWidget::myLastPlottedTime
protected
unsigned DtAssistantPlotWidget::myNextSeriesId
protected

Referenced by createNewSeries().

double DtAssistantPlotWidget::myNumSecondsVisible
protected
DtAssistantPlot* DtAssistantPlotWidget::myPlotter
protected
QScrollBar* DtAssistantPlotWidget::myScrollbar
protected
QString DtAssistantPlotWidget::myUnits
protected

Referenced by layoutTab().

float DtAssistantPlotWidget::myVisibleTimeScaleFactor
protected

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

Document ID: Generated on Wed Mar 11 20:26:49 EDT 2015 from SVN revision 150939
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (www.mak.com)