The base class for widget based job trackers.
More...
#include <KAbstractWidgetJobTracker>
|
void | resume (KJob *job) |
| Emitted when the user resumed the operation.
|
|
void | stopped (KJob *job) |
| Emitted when the user aborted the operation.
|
|
void | suspend (KJob *job) |
| Emitted when the user suspended the operation.
|
|
|
void | registerJob (KJob *job) override |
| Register a new job in this tracker.
|
|
void | unregisterJob (KJob *job) override |
| Unregister a job from this tracker.
|
|
|
void | finished (KJob *job) override |
| Called when a job is finished, in any case.
|
|
virtual void | slotClean (KJob *job) |
| This method is called when the widget should be cleaned (after job is finished).
|
|
virtual void | slotResume (KJob *job) |
| This method should be called for pause/resume Connect this to the progress widgets buttons etc.
|
|
virtual void | slotStop (KJob *job) |
| This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc.
|
|
virtual void | slotSuspend (KJob *job) |
| This method should be called for pause/resume Connect this to the progress widgets buttons etc.
|
|
|
std::unique_ptr< KAbstractWidgetJobTrackerPrivate > const | d |
|
QWidget * | parent = nullptr) |
|
The base class for widget based job trackers.
◆ KAbstractWidgetJobTracker()
KAbstractWidgetJobTracker::KAbstractWidgetJobTracker |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Creates a new KAbstractWidgetJobTracker.
- Parameters
-
parent | the parent of this object and of the widget displaying the job progresses |
◆ ~KAbstractWidgetJobTracker()
KAbstractWidgetJobTracker::~KAbstractWidgetJobTracker |
( |
| ) |
|
|
override |
◆ autoDelete()
bool KAbstractWidgetJobTracker::autoDelete |
( |
KJob * |
job | ) |
const |
Checks whether the dialog should be deleted or cleaned.
- Parameters
-
job | the job's widget that will be auto-deleted |
- Returns
- false if the dialog only calls slotClean, true if it will be deleted
- See also
- setAutoDelete()
◆ finished
void KAbstractWidgetJobTracker::finished |
( |
KJob * |
job | ) |
|
|
overrideprotectedslot |
Called when a job is finished, in any case.
It is used to notify that the job is terminated and that progress UI (if any) can be hidden.
- Parameters
-
job | the job that emitted this signal |
◆ registerJob
void KAbstractWidgetJobTracker::registerJob |
( |
KJob * |
job | ) |
|
|
overrideslot |
Register a new job in this tracker.
Note that job trackers inheriting from this class can have only one job registered at a time.
- Parameters
-
◆ resume
void KAbstractWidgetJobTracker::resume |
( |
KJob * |
job | ) |
|
|
signal |
Emitted when the user resumed the operation.
- Parameters
-
job | The job that has been resumed |
◆ setAutoDelete()
void KAbstractWidgetJobTracker::setAutoDelete |
( |
KJob * |
job, |
|
|
bool |
autoDelete |
|
) |
| |
This controls whether the dialog should be deleted or only cleaned when the KJob is finished (or canceled).
If your dialog is an embedded widget and not a separate window, you should setAutoDelete(false) in the constructor of your custom dialog.
- Parameters
-
job | the job's widget that is going to be auto-deleted |
autoDelete | If false the dialog will only call method slotClean. If true the dialog will be deleted. |
- See also
- autoDelete()
◆ setStopOnClose()
void KAbstractWidgetJobTracker::setStopOnClose |
( |
KJob * |
job, |
|
|
bool |
stopOnClose |
|
) |
| |
This controls whether the job should be canceled if the dialog is closed.
- Parameters
-
job | the job's widget that will be stopped when closing |
stopOnClose | If true the job will be stopped if the dialog is closed, otherwise the job will continue even on close. |
- See also
- stopOnClose()
◆ slotClean
virtual void KAbstractWidgetJobTracker::slotClean |
( |
KJob * |
job | ) |
|
|
protectedvirtualslot |
This method is called when the widget should be cleaned (after job is finished).
redefine this for custom behavior.
- Parameters
-
job | The job that is being cleaned |
◆ slotResume
virtual void KAbstractWidgetJobTracker::slotResume |
( |
KJob * |
job | ) |
|
|
protectedvirtualslot |
This method should be called for pause/resume Connect this to the progress widgets buttons etc.
- Parameters
-
job | The job that is being resumed |
◆ slotStop
virtual void KAbstractWidgetJobTracker::slotStop |
( |
KJob * |
job | ) |
|
|
protectedvirtualslot |
This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc.
- Parameters
-
job | The job that is being stopped |
◆ slotSuspend
virtual void KAbstractWidgetJobTracker::slotSuspend |
( |
KJob * |
job | ) |
|
|
protectedvirtualslot |
This method should be called for pause/resume Connect this to the progress widgets buttons etc.
- Parameters
-
job | The job that is being suspended |
◆ stopOnClose()
bool KAbstractWidgetJobTracker::stopOnClose |
( |
KJob * |
job | ) |
const |
Checks whether the job will be killed when the dialog is closed.
- Parameters
-
job | the job's widget that will be stopped when closing |
- Returns
- true if the job is killed on close event, false otherwise.
- See also
- setStopOnClose()
◆ stopped
void KAbstractWidgetJobTracker::stopped |
( |
KJob * |
job | ) |
|
|
signal |
Emitted when the user aborted the operation.
- Parameters
-
job | The job that has been stopped |
◆ suspend
void KAbstractWidgetJobTracker::suspend |
( |
KJob * |
job | ) |
|
|
signal |
Emitted when the user suspended the operation.
- Parameters
-
job | The job that has been suspended |
◆ unregisterJob
void KAbstractWidgetJobTracker::unregisterJob |
( |
KJob * |
job | ) |
|
|
overrideslot |
Unregister a job from this tracker.
- Parameters
-
◆ widget()
virtual QWidget * KAbstractWidgetJobTracker::widget |
( |
KJob * |
job | ) |
|
|
pure virtual |
The widget associated to this tracker.
- Parameters
-
job | the job that is assigned the widget we want to return |
- Returns
- the widget displaying the job progresses
Implemented in KStatusBarJobTracker, and KWidgetJobTracker.