ProcessInterface Class Reference

Interface class controlling threadding in OpenFlipper. More...

#include <ProcessInterface.hh>

List of all members.

Signals

virtual void startJob (QString, QString, int, int, bool=false)
 announce a new job
virtual void setJobState (QString, int)
 update job state
virtual void setJobName (QString, QString)
 update job's name
virtual void setJobDescription (QString, QString)
 update job's description text
virtual void cancelJob (QString)
 Cancel your job.
virtual void finishJob (QString)
 Finish your job.

Public Member Functions

virtual ~ProcessInterface ()
 Destructor.

Private Slots

virtual void canceledJob (QString)
 A job has been canceled.

Detailed Description

Interface class controlling threadding in OpenFlipper.

Example:
OpenFlipperThread* thread = new OpenFlipperThread(name() + "unique id"); // Create your thread containing a unique id
connect(thread,SIGNAL( state(QString, int)), this,SIGNAL(setJobState(QString, int))); // connect your threads state info to the global one
connect(thread,SIGNAL( finished(QString)), this,SIGNAL(finishJob(QString))); // connect your threads finish info to the global one ( you can do the same for a local one )
connect(thread,SIGNAL( function()), this,SLOT(testFunctionThread()),Qt::DirectConnection); // You can directly give a slot of your app that gets called
emit startJob( name() + "unique id", "Description" , 0 , 100 , false); // Tell the core about your thread thread->start(); // start thread thread->startProcessing(); // start processing

Definition at line 70 of file ProcessInterface.hh.


Member Function Documentation

virtual void ProcessInterface::canceledJob ( QString   )  [inline, private, virtual, slot]

A job has been canceled.

This function is called when the user cancels a job. The returned name is the name of the job which has been canceled

Definition at line 133 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobDescription ( QString  ,
QString   
) [inline, virtual, signal]

update job's description text

Emit this signal to tell the core to change a job's widget's description.

_text The text of the job's description

Definition at line 117 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobName ( QString  ,
QString   
) [inline, virtual, signal]

update job's name

Emit this signal to tell the core to change a job's name.

_caption The new name of the job

Definition at line 109 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobState ( QString  ,
int   
) [inline, virtual, signal]

update job state

Emit this signal to tell the core about your job status.

_value has to be in the range you defined!

Definition at line 101 of file ProcessInterface.hh.

virtual void ProcessInterface::startJob ( QString  ,
QString  ,
int  ,
int  ,
bool  = false 
) [inline, virtual, signal]

announce a new job

Use this function to announce a new job. The Job Id should be a unique id for your job. Prepend your PluginName to your id to make it unique across plugins.

The description will be the string visible to the user.

min and max define the range your status values will be in.

blocking will define, if user interaction with the core should still be possible

Definition at line 93 of file ProcessInterface.hh.


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

acg pic Project OpenFlipper, ©  Computer Graphics Group, RWTH Aachen. Documentation generated using doxygen .