PARP Research Group University of Murcia, Spain


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.

Protected Member Functions

bool linkUnspecifiedInputProperty (QVPropertyContainer *sourceContainer, QString sourcePropName, LinkType linkType=AsynchronousLink)
 Links properties from workers. This method safely links the "cpu stats" worker's property in a thread safe manner.


Detailed Description

Class for plot graphs of worker's cpustat properties.

This class lets us plot graphs for QVStat worker's output properties. Each QVWorker object is created with a property containing a stat object, resuming its time consumption and internal statistics. The class QVCPUPlot can be used to plot those time statistics.

The following code features how to create a CPU plot object in a QVision application:

void main()
        {
        [...]
        ComponentTreeWorker componentTreeWorker("Component Tree");
        CannyWorker cannyWorker("Canny operator");
        ContourPainter contourPainter("Contour painter");
        [...]
        QVCPUPlot cpuPlot("CPU Plot", true, 10);
        cpuPlot.linkProperty(componentTreeWorker);
        cpuPlot.linkProperty(cannyWorker);
        cpuPlot.linkProperty(contourPainter);
        [...]
        }

This application will display a plot like the following:

qvision_cpuplot_window.png

By default, the QVDefaultGUI includes the following button for CPU plot statistics displaying, which opens a QVNumericPlot widget plotting the worker CPU usage:

qvision_gui_graphbutton.png

See also:
QVNumericPlot

QVHistogramPlot

Definition at line 69 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 28 of file qvcpuplot.cpp.


Member Function Documentation

bool QVCPUPlot::linkUnspecifiedInputProperty ( QVPropertyContainer sourceContainer,
QString  sourcePropName,
LinkType  linkType = AsynchronousLink 
) [protected]

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. 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 32 of file qvcpuplot.cpp.


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



QVision framework. PARP research group, copyright 2007, 2008.