#include <simpleplot.h>
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) |
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.
SimplePlot::SimplePlot | ( | int | lineSize, | |
QPointF | lineAxis, | |||
const QDateTime & | startStamp, | |||
QWidget * | parent = 0 | |||
) |
Constructor.
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 | ( | ) |
void SimplePlot::enterEvent | ( | QEvent * | event | ) | [protected] |
Event handler for mouse/focus enter widget.
bla bla
event | Event info. |
Definition at line 233 of file simpleplot.cpp.
QPoint SimplePlot::getSampleBounds | ( | ) | const [inline] |
Get DetailPlot X-axis scale.
Definition at line 170 of file simpleplot.h.
void SimplePlot::initCurves | ( | int | curveCount | ) |
Initialize curves.
curveCount | Number of curves to initialize. |
Definition at line 72 of file simpleplot.cpp.
bool SimplePlot::isValid | ( | ) | const [inline] |
void SimplePlot::leaveEvent | ( | QEvent * | event | ) | [protected] |
Event handler for mouse/focus leave widget.
bla bla
event | Event info. |
Definition at line 240 of file simpleplot.cpp.
QSize SimplePlot::minimumSizeHint | ( | ) | const [inline] |
void SimplePlot::mouseMoveEvent | ( | QMouseEvent * | event | ) | [protected] |
Event handler for mouse moved.
bla bla
event | Event info. |
Definition at line 219 of file simpleplot.cpp.
void SimplePlot::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Event handler for mouse pressed.
bla bla
event | Event info. |
Definition at line 198 of file simpleplot.cpp.
void SimplePlot::paintEvent | ( | QPaintEvent * | event | ) | [protected, virtual] |
Reimplemantion of QWidget paintEvent.
bla bla
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.
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.
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.
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
line | Curve line number. | |
sample | Sample number. |