#include <KoProgressUpdater.h>
Inheritance diagram for KoUpdater:

Public Member Functions | |
| KoUpdater (const KoUpdater &other) | |
| copy constructor. | |
| void | cancel () |
| Call this when this subtask wants to abort all the actions. | |
| void | setProgress (int percent) |
| Update your progress. | |
| bool | interrupted () const |
| return true when this task should stop processing immediately. | |
| int | progress () const |
| return the progress this subtask has made. | |
| int | maximum () const |
| void | setValue (int value) |
| void | setRange (int minimum, int maximum) |
| void | setFormat (const QString &format) |
Public Attributes | |
| QPointer< KoProgressUpdaterPrivate > | d |
| int | range |
| int | min |
| int | max |
Protected Member Functions | |
| KoUpdater (KoProgressUpdaterPrivate *p) | |
Friends | |
| class | KoProgressUpdater |
This class is not thread safe, and it should only be used from one thread. The thread it is used in can be different from any other subtask or the KoProgressUpdater, though.
It is possible to create a KoProgressUpdater on a KoUpdater for when you need to recursively split up progress reporting. (For instance, when your progress reporting routine can be called by other progress reporting routines.)
KoUpdater implements KoProgressProxy because it is possible to recursively create anoter KoProgressUpdater with an updater as progress proxy.
| bool KoUpdater::interrupted | ( | ) | const |
return true when this task should stop processing immediately.
When the task has been cancelled all the subtasks will get interrupted and should stop working. It is therefor important to have repeated calls to this method at regular (time) intervals and as soon as the method returns true cancel the subtask.
| void KoUpdater::setProgress | ( | int | percent | ) |
Update your progress.
Progress is always from 0 to 100. The global progress shown to the user is determined by the total amount of subtasks there are. This means that each subtasks can just report its own private progress in the range from 0 to 100.
1.4.7