#include <datahandler.h>
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) |
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.
Definition at line 40 of file datahandler.h.
Constants defining curve / line attributes.
Definition at line 44 of file datahandler.h.
DataHandler::DataHandler | ( | ) |
DataHandler::DataHandler | ( | int | samplesprSecond | ) |
Constructor.
samplesprSecond | Create the DataHandler with this samplerate. |
Definition at line 36 of file datahandler.cpp.
DataHandler::DataHandler | ( | const QDateTime & | startingPoint, | |
int | samplesprSecond | |||
) |
Constructor.
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 | ( | ) |
QPointF DataHandler::getDetailAxisBounds | ( | ) | const [inline] |
QPoint DataHandler::getDetailLineSampleBounds | ( | ) | const |
QDateTime DataHandler::getDetailStamp | ( | ) | const [inline] |
Gets the date and time of the detail view selection.
Definition at line 99 of file datahandler.h.
QPointF DataHandler::getLineAxisBounds | ( | ) | const [inline] |
double * DataHandler::getLineSample | ( | int | line, | |
int | sample | |||
) |
Returns a pointer to a sample at a specific line.
line | The line number in the simple plot. | |
sample | The sample number. |
Definition at line 75 of file datahandler.cpp.
QPoint DataHandler::getLineSampleBounds | ( | ) | const |
int DataHandler::getSamplesPrDetailLine | ( | ) | const [inline] |
int DataHandler::getSamplesPrLine | ( | ) | const [inline] |
QDateTime DataHandler::getStartStamp | ( | ) | const [inline] |
Gets the starting date and time of the curve data.
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.
line | Number of lines from top. | |
sample | Number of samples from left. |
Definition at line 105 of file datahandler.cpp.
QString DataHandler::getStartStampText | ( | ) | const |
Gets 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.
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.
line | The line of interest. |
Definition at line 126 of file datahandler.h.
QVector<QVector<double> >& DataHandler::getYLines | ( | ) | [inline] |
Gets the vector containing the graphs 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.
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.
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.
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.
min | Minimum x-value. | |
max | Maximum y-value. |
Definition at line 201 of file datahandler.h.
void DataHandler::setSampleprSecond | ( | int | sprsec | ) |
Sets the samplerate.
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.
start | The starting date and time. |
Definition at line 81 of file datahandler.h.