#include <qvgui/qvnumericplot.h>
Public Member Functions | |
QVNumericPlot (const QString name=QString(), bool time=true, int step=10, QWidget *parent=0) | |
Constructs a QVNumericPlot with a given string identifier, and iteration's parameters. Construct a new plot that shows int and double properties graphs. This plot shows decorations, it hasn't got a pie graph, don't brush the data and autoshow. It can show graphs of int and double linked properties of different workers. | |
bool | linkProperty (QVWorker &worker, const QString propertyName) |
Links properties from workers. | |
void | linkProperty (QVWorker &worker) |
Links properties from workers. |
This class lets us plot graphs for int and double worker's output properties. First, we need a worker with int or double output properties, like this:
class MyWorker: public QVWorker { public: MyWorker(QString name): QVWorker(name) { addProperty< QVImage<uChar,1> >("Input image", inputFlag|outputFlag); addProperty< QVImage<uChar,1> >("Output image", outputFlag); addProperty<int>("Max pixel", outputFlag); addProperty<int>("Min pixel", outputFlag); ...
And then, in the main function, we can create a QVNumericPlot and link it with some of those properties, like this:
... MyWorker myWorker("worker"); QVNumericPlot numericPlot("MinMax"); numericPlot.linkProperty(myWorker, "Max pixel"); numericPlot.linkProperty(myWorker, "Min pixel"); ...
Showing us a graph window like this:
See also: QVHistogramPlot class QVCpuPlot class.
Definition at line 70 of file qvnumericplot.h.
QVNumericPlot::QVNumericPlot | ( | const QString | name = QString () , |
|
bool | time = true , |
|||
int | step = 10 , |
|||
QWidget * | parent = 0 | |||
) |
Constructs a QVNumericPlot with a given string identifier, and iteration's parameters. Construct a new plot that shows int and double properties graphs. This plot shows decorations, it hasn't got a pie graph, don't brush the data and autoshow. It can show graphs of int and double linked properties of different workers.
name | Identifier for the object to be created. | |
time | True if the iterations are based on clock time (in second hundredths), and false if they are based on worker's iterations. | |
step | Set the base measure to plot's iterations ratio. | |
parent | Identifier for the parent widget. |
Definition at line 28 of file qvnumericplot.cpp.
bool QVNumericPlot::linkProperty | ( | QVWorker & | worker, | |
const QString | propertyName | |||
) |
Links properties from workers.
This method safely links properties from workers in a thread safe manner. If the iterations are based on worker's iterations (time == false), the worker must be synchronised with previous linked workers. Only can be linked int or double properties.
See also QVPropertyContainer::LinkType.
worker | The source QVWorker. | |
propertyName | Identifying QString for the source property. |
Definition at line 31 of file qvnumericplot.cpp.
Referenced by linkProperty(), and main().
void QVNumericPlot::linkProperty | ( | QVWorker & | worker | ) |
Links properties from workers.
This method safely links all int and double output properties from a container with news properties with the same name, holders in a thread safe manner.
See also linkProperty(QVWorker &worker, const QString propertyName).
worker | The source QVWorker. |
Definition at line 43 of file qvnumericplot.cpp.