SimplePlot Class Reference

A simple plotting widget. More...

#include <simpleplot.h>

List of all members.

Signals

void valueClicked (int line, int sample)

Public Member Functions

 SimplePlot (int lineSize, QPointF lineAxis, const QDateTime &startStamp, QWidget *parent=0)
 ~SimplePlot ()
void initCurves (int curveCount)
void setData (const double *x, const QVector< QVector< double > > &vYData)
void setLineAxisBounds (QPointF p)
void setSampleBounds (QPoint p)
QPoint getSampleBounds () const
bool isValid () const
QSize minimumSizeHint () const

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
void mouseMoveEvent (QMouseEvent *event)
void enterEvent (QEvent *event)
void leaveEvent (QEvent *event)
virtual void paintEvent (QPaintEvent *event)


Detailed Description

A simple plotting widget.

SimplePlot is a widget which has the capabilites to plot 2D graphs. It can hold a set number of curves (lines) with a fixed sample rate (number of points).

Definition at line 41 of file simpleplot.h.


Constructor & Destructor Documentation

SimplePlot::SimplePlot ( int  lineSize,
QPointF  lineAxis,
const QDateTime &  startStamp,
QWidget *  parent = 0 
)

Constructor.

Parameters:
lineSize Length of the curves.
lineAxis Y-axis scale.
startStamp Starting point of the plot.
parent Parent widget.

Definition at line 38 of file simpleplot.cpp.

SimplePlot::~SimplePlot (  ) 

Destructor.

Definition at line 64 of file simpleplot.cpp.


Member Function Documentation

void SimplePlot::enterEvent ( QEvent *  event  )  [protected]

Event handler for mouse/focus enter widget.

bla bla

Parameters:
event Event info.

Definition at line 233 of file simpleplot.cpp.

QPoint SimplePlot::getSampleBounds (  )  const [inline]

Get DetailPlot X-axis scale.

Returns:
QPoint containing X-axis scale.

Definition at line 170 of file simpleplot.h.

void SimplePlot::initCurves ( int  curveCount  ) 

Initialize curves.

Parameters:
curveCount Number of curves to initialize.

Definition at line 72 of file simpleplot.cpp.

bool SimplePlot::isValid (  )  const [inline]

Returns:
true if this plot has curves and data set.

Definition at line 87 of file simpleplot.h.

void SimplePlot::leaveEvent ( QEvent *  event  )  [protected]

Event handler for mouse/focus leave widget.

bla bla

Parameters:
event Event info.

Definition at line 240 of file simpleplot.cpp.

QSize SimplePlot::minimumSizeHint (  )  const [inline]

Reimplementation.

Definition at line 90 of file simpleplot.h.

void SimplePlot::mouseMoveEvent ( QMouseEvent *  event  )  [protected]

Event handler for mouse moved.

bla bla

Parameters:
event Event info.

Definition at line 219 of file simpleplot.cpp.

void SimplePlot::mousePressEvent ( QMouseEvent *  event  )  [protected]

Event handler for mouse pressed.

bla bla

Parameters:
event Event info.

Definition at line 198 of file simpleplot.cpp.

void SimplePlot::paintEvent ( QPaintEvent *  event  )  [protected, virtual]

Reimplemantion of QWidget paintEvent.

bla bla

Parameters:
event Event info.

Definition at line 181 of file simpleplot.cpp.

void SimplePlot::setData ( const double *  x,
const QVector< QVector< double > > &  vYData 
)

Set curve data.

Parameters:
x X-axis values.
vYData Y-axis values in a vector with size == linesize.

Definition at line 88 of file simpleplot.cpp.

void SimplePlot::setLineAxisBounds ( QPointF  p  )  [inline]

Set Y-axis scale.

Parameters:
p A pair of points, min and max.

Definition at line 172 of file simpleplot.h.

void SimplePlot::setSampleBounds ( QPoint  p  )  [inline]

Set DetailPlot X-axis scale. Used to calculate marker rectangle and to calculate starting sample to show in DetailPlot.

Parameters:
p A pair of points, min and max.

Definition at line 168 of file simpleplot.h.

void SimplePlot::valueClicked ( int  line,
int  sample 
) [signal]

Value clicked signal.

bla bla

Parameters:
line Curve line number.
sample Sample number.


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

Generated on Wed May 20 14:28:20 2009 for CardioCurves by  doxygen 1.5.9