QVCpuPlot Class Reference
[Graphical User Interface]

Class for plot graphs of worker's cpustat properties. More...

#include <qvgui/qvcpuplot.h>

List of all members.

Public Member Functions

 QVCpuPlot (const QString name=QString(), bool decorations=true, bool autoShow=true, bool time=true, int step=100, QWidget *parent=0)
 Constructs a QVCpuPlot with a given string identifier, showing properties and iteration's parameters.
void linkProperty (QVWorker &worker)
 Links properties from workers. This method safely links the "cpu stats" worker's property in a thread safe manner.
void linkProperty (QVWorker &worker, const QString propertyName)
 Links properties from workers.


Detailed Description

Class for plot graphs of worker's cpustat properties.

This class lets us plot graphs for QVStat worker's output properties. First, we need workers with QVStat 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<QVStat>("statistics", outputFlag);
   
                        ...

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

   ...
   
   MyWorker myWorker("worker");
   QVCpuPlot cpuPlot("statistics plot");
   cpuPlot.linkProperty(myWorker, "statistics");
   
   ...

Showing us a graph window like this:

qvision_cpuplot_window.png

If we link some workers QVStat properties to one QVCpuPlot, it plots all QVStat's time flags in link order, like this:

qvision_somecpuplots_window.png

All workers have a QVStat output property, "cpu stats", that can be linked like this:

   ...
   
   MyWorker myWorker("worker");
   QVCpuPlot cpuPlot("statistics plot");
   cpuPlot.linkProperty(myWorker);
   
   ...

And it's QVCpuPlot graph is shown when we puss the graph worker GUI button:

qvision_gui_graphbutton.png
And plots the cpu time between each timeFlag() in the worker's iterate().

See also: QVNumericPlot class QVHistogramPlot class.

Definition at line 91 of file qvcpuplot.h.


Constructor & Destructor Documentation

QVCpuPlot::QVCpuPlot ( const QString  name = QString(),
bool  decorations = true,
bool  autoShow = true,
bool  time = true,
int  step = 100,
QWidget *  parent = 0 
)

Constructs a QVCpuPlot with a given string identifier, showing properties and iteration's parameters.

Parameters:
name Identifier for the object to be created.
decorations Indicate if the plot must shown the scale axis.
autoShow Indicate if the plot are shown at the beginning or must be shown by the user.
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 29 of file qvcpuplot.cpp.


Member Function Documentation

void QVCpuPlot::linkProperty ( QVWorker worker  ) 

Links properties from workers. This method safely links the "cpu stats" worker's property in a thread safe manner.

See also QVPropertyContainer::LinkType.

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

Definition at line 44 of file qvcpuplot.cpp.

void QVCpuPlot::linkProperty ( QVWorker worker,
const QString  propertyName 
)

Links properties from workers.

This method safely links QVStat 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 QVStat properties.

See also linkProperty(QVWorker &worker, const QString propertyName).

Parameters:
worker The source QVWorker.

Definition at line 33 of file qvcpuplot.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Jul 17 17:23:29 2008 for QVision by  doxygen 1.5.3