Developer Documentation

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Signals | Public Member Functions | Private Slots | List of all members
ProcessInterface Class Reference

Interface class for Thread handling. More...

`#include <OpenFlipper/BasePlugin/ProcessInterface.hh>`

Inheritance diagram for ProcessInterface:

## Signals
virtual void | startJob (QString _jobId, QString _description, int _min, int _max, bool _blocking=false)
| announce a new job More...

## Public Member Functions
virtual | ~ProcessInterface ()
| Destructor.
virtual void | setJobState (QString _jobId, int _value)
| update job state More...
virtual void | setJobName (QString _jobId, QString _name)
| update job's name More...
virtual void | setJobDescription (QString _jobId, QString _text)
| update job's description text More...
virtual void | cancelJob (QString _jobId)
| Cancel your job. More...
virtual void | finishJob (QString _jobId)
| Finish your job. More...

## Private Slots
virtual void | canceledJob (QString _job)
| A job has been canceled. More...

## Detailed Description

Interface class for Thread handling.

Detailed description
This Interface is used to handle threads in OpenFlipper. You can run arbitrary slots within separate threads.

Definition at line 75 of file ProcessInterface.hh.

## Member Function Documentation

virtual void ProcessInterface::canceledJob | ( | QString | _job | ) |
| 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

Parameters

  _job | String which is used as the id of the thread

Reimplemented in DecimaterPlugin.

Definition at line 152 of file ProcessInterface.hh.

virtual void ProcessInterface::cancelJob | ( | QString | _jobId | ) |
| inline virtual

Cancel your job.

Parameters

  _jobId | String which is used as the id of the thread

Definition at line 132 of file ProcessInterface.hh.

virtual void ProcessInterface::finishJob | ( | QString | _jobId | ) |
| inline virtual

Finish your job.

This signal has to be emitted when your job has finished. You can directly connect the threads finished signal to this signal.

Parameters

  _jobId | String which is used as the id of the thread

Definition at line 141 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobDescription | ( | QString | _jobId,
|  | QString | _text
| ) |  |
| inline virtual

update job's description text

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

Parameters

  _jobId | String which is used as the id of the thread
  _text | The text of the job's description

Definition at line 126 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobName | ( | QString | _jobId,
|  | QString | _name
| ) |  |
| inline virtual

update job's name

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

Parameters

  _jobId | String which is used as the id of the thread
  _name | The new name of the job

Definition at line 117 of file ProcessInterface.hh.

virtual void ProcessInterface::setJobState | ( | QString | _jobId,
|  | int | _value
| ) |  |
| inline virtual

update job state

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

Parameters

  _jobId | String which is used as the id of the thread
  _value | The status value has to be in the range you defined in ProcessInterface::startJob()

Definition at line 108 of file ProcessInterface.hh.

virtual void ProcessInterface::startJob | ( | QString | _jobId,
|  | QString | _description,
|  | int | _min,
|  | int | _max,
|  | bool | _blocking = `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 range between _min and _max will be used to compute the progress percentage based on the ProcessInterface::setJobState() values provided by the thread. You could for example set it to the number of steps performed in your algorithm.

Parameters

  _jobId | String which is used as the id of the thread
  _description | The description will be the string visible to the user.
  _min | minimum of the status value range
  _max | maximum of the status range
  _blocking | If the thread is blocking, no other interaction will be allowed

Definition at line 99 of file ProcessInterface.hh.

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

- OpenFlipper/BasePlugin/ProcessInterface.hh