QVHistogramPlot Class Reference
[Graphical User Interface]

Class for plot worker's histograms. More...

#include <qvgui/qvhistogramplot.h>

List of all members.

Public Member Functions

 QVHistogramPlot (const QString name=QString(), bool time=true, int step=10, double maxim=0, double minim=0, QWidget *parent=0)
 Constructs a QVHistogramPlot with a given string identifier, and a iteration's parameters.
bool linkProperty (QVWorker &worker, const QString propertyName)
 Links properties from workers.


Detailed Description

Class for plot worker's histograms.

This class lets us plot graphs for a QList<double> worker's output property. First, we need a worker with a QList<double> output property, 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<QList<double> >("FirstRow", outputFlag);
   
                        ...

And then, in the main function, we can create a QVHistogramPlot and link it with that property, like this:

   ...
   
   MyWorker myWorker("worker");
   QVHistogramPlot histPlot("histFirstRow", false, 10, 300);
   histPlot.linkProperty(myWorker, "FirstRow");
   
   ...

Showing us a graph window like this:

qvision_histogramplot_window.png

See also: QVNumericPlot class QVCpuPlot class.

Definition at line 69 of file qvhistogramplot.h.


Constructor & Destructor Documentation

QVHistogramPlot::QVHistogramPlot ( const QString  name = QString (),
bool  time = true,
int  step = 10,
double  maxim = 0,
double  minim = 0,
QWidget *  parent = 0 
)

Constructs a QVHistogramPlot with a given string identifier, and a iteration's parameters.

Parameters:
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.
maxim The left axis maximum value shown, if it is 0, the maximum value is auto scale.
minim The left axis minimum value shown, it must be less than maximum value.
parent Identifier for the parent widget.

Definition at line 32 of file qvhistogramplot.cpp.


Member Function Documentation

bool QVHistogramPlot::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 QList<double> properties.

See also QVPropertyContainer::LinkType.

Parameters:
worker The source QVWorker.
propertyName Identifying QString for the source property.

Definition at line 42 of file qvhistogramplot.cpp.

Referenced by main().


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