DataHandler Class Reference

A data handler class. More...

#include <datahandler.h>

List of all members.

Public Types

enum  Constants {
  numberofLines = 8,
  secondsprLine = 30,
  secondsprDetailLine = 10,
  standardSamplingRate = 500
}

Public Member Functions

 DataHandler ()
 DataHandler (int samplesprSecond)
 DataHandler (const QDateTime &startingPoint, int samplesprSecond)
 ~DataHandler ()
void setStartStamp (const QDateTime &start)
void setDetailStamp (const QDateTime &detail)
QDateTime getStartStamp () const
QDateTime getDetailStamp () const
QString getStartStampText () const
QString getStartStampText (int line, int sample) const
QVector< QVector< double > > & getYLines ()
const double * getYLine (int line) const
const double * getXLine () const
int getSamplesPrLine () const
int getSamplesPrDetailLine () const
double * getLineSample (int line, int sample)
QPoint getLineSampleBounds () const
QPoint getDetailLineSampleBounds () const
void setLineAxisBounds (double min, double max)
void setLineAxisBounds (QPointF p)
QPointF getLineAxisBounds () const
void setDetailAxisBounds (double min, double max)
QPointF getDetailAxisBounds () const
void setSampleprSecond (int sprsec)


Detailed Description

A data handler class.

DataHandler is a class that contains Constants defining how data read from _readers_ will be interpreted. It also contains a static data structure which contains curve data for plots currently on screen.

See also:
SimplePlot::setData(), DetailPlot::setData(), Plotting

Definition at line 40 of file datahandler.h.


Member Enumeration Documentation

Constants defining curve / line attributes.

Enumerator:
numberofLines  How many curves/lines to show on the screen at once.
secondsprLine  How many seconds of data does a curve/line contains.
secondsprDetailLine  How many seconds of data does a detailed curve/line contain.
standardSamplingRate  Standard sampling rate for this application.

Definition at line 44 of file datahandler.h.


Constructor & Destructor Documentation

DataHandler::DataHandler (  ) 

Default constructor.

Definition at line 27 of file datahandler.cpp.

DataHandler::DataHandler ( int  samplesprSecond  ) 

Constructor.

Parameters:
samplesprSecond Create the DataHandler with this samplerate.

Definition at line 36 of file datahandler.cpp.

DataHandler::DataHandler ( const QDateTime &  startingPoint,
int  samplesprSecond 
)

Constructor.

Parameters:
startingPoint Starting date and time of the curve data.
samplesprSecond Create the DataHandler with this samplerate.

Definition at line 45 of file datahandler.cpp.

DataHandler::~DataHandler (  ) 

Destructor.

Definition at line 54 of file datahandler.cpp.


Member Function Documentation

QPointF DataHandler::getDetailAxisBounds (  )  const [inline]

return The bounds of the detail view line.

Definition at line 209 of file datahandler.h.

QPoint DataHandler::getDetailLineSampleBounds (  )  const

return a point (0, getSamplesPrDetailLine())

Definition at line 88 of file datahandler.cpp.

QDateTime DataHandler::getDetailStamp (  )  const [inline]

Gets the date and time of the detail view selection.

Returns:
The date and time of the detail view selection.

Definition at line 99 of file datahandler.h.

QPointF DataHandler::getLineAxisBounds (  )  const [inline]

return The bounds of a line.

Definition at line 205 of file datahandler.h.

double * DataHandler::getLineSample ( int  line,
int  sample 
)

Returns a pointer to a sample at a specific line.

Parameters:
line The line number in the simple plot.
sample The sample number.
Returns:
Pointer to the specified sample.

Definition at line 75 of file datahandler.cpp.

QPoint DataHandler::getLineSampleBounds (  )  const

return a point (0, getSamplesPrLine())

Definition at line 83 of file datahandler.cpp.

int DataHandler::getSamplesPrDetailLine (  )  const [inline]

return Number of samples per line in detail view.

Definition at line 139 of file datahandler.h.

int DataHandler::getSamplesPrLine (  )  const [inline]

return Number of samples per line.

Definition at line 136 of file datahandler.h.

QDateTime DataHandler::getStartStamp (  )  const [inline]

Gets the starting date and time of the curve data.

Returns:
The starting date and time object.

Definition at line 93 of file datahandler.h.

QString DataHandler::getStartStampText ( int  line,
int  sample 
) const

Gets the date and time as a string offset x lines and y samples.

Parameters:
line Number of lines from top.
sample Number of samples from left.
Returns:
The offset date and time.

Definition at line 105 of file datahandler.cpp.

QString DataHandler::getStartStampText (  )  const

Gets the starting date and time as a string.

Returns:
The starting date and time as a string.

Definition at line 100 of file datahandler.cpp.

const double* DataHandler::getXLine (  )  const [inline]

Gets a pointer to the x-axis resolution array.

Returns:
Constant pointer to the x-axis resolution array.

Definition at line 133 of file datahandler.h.

const double* DataHandler::getYLine ( int  line  )  const [inline]

Gets a pointer to the data in a specific on screen line.

Parameters:
line The line of interest.
Returns:
Constant pointer to data in specified line.

Definition at line 126 of file datahandler.h.

QVector<QVector<double> >& DataHandler::getYLines (  )  [inline]

Gets the vector containing the graphs shown on screen.

Returns:
A vector containing the data shown on screen.

Definition at line 119 of file datahandler.h.

void DataHandler::setDetailAxisBounds ( double  min,
double  max 
) [inline]

Sets the bounds of the detail view line.

Parameters:
min Minimum x-value.
max Maximum y-value.

Definition at line 207 of file datahandler.h.

void DataHandler::setDetailStamp ( const QDateTime &  detail  )  [inline]

Sets the date and time of the detail view selection.

Parameters:
detail The detail view date and time.

Definition at line 87 of file datahandler.h.

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

Sets the bounds of a line.

Parameters:
p The extremal point.

Definition at line 203 of file datahandler.h.

void DataHandler::setLineAxisBounds ( double  min,
double  max 
) [inline]

Sets the bounds of a line.

Parameters:
min Minimum x-value.
max Maximum y-value.

Definition at line 201 of file datahandler.h.

void DataHandler::setSampleprSecond ( int  sprsec  ) 

Sets the samplerate.

Parameters:
sprsec Samples pr second

Definition at line 93 of file datahandler.cpp.

void DataHandler::setStartStamp ( const QDateTime &  start  )  [inline]

Sets the starting date and time of the curve data.

Parameters:
start The starting date and time.

Definition at line 81 of file datahandler.h.


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