KIO::ProgressBase Class Reference
This class does all initialization stuff for progress, like connecting signals to slots. Base class for IO progress dialogs. More...
#include <progressbase.h>
Inheritance diagram for KIO::ProgressBase:

Public Slots | |
void | slotStop () |
virtual void | slotClean () |
virtual void | slotTotalSize (KIO::Job *job, KIO::filesize_t bytes) |
virtual void | slotTotalFiles (KIO::Job *job, unsigned long files) |
virtual void | slotTotalDirs (KIO::Job *job, unsigned long dirs) |
virtual void | slotProcessedSize (KIO::Job *job, KIO::filesize_t bytes) |
virtual void | slotProcessedFiles (KIO::Job *job, unsigned long files) |
virtual void | slotProcessedDirs (KIO::Job *job, unsigned long dirs) |
virtual void | slotSpeed (KIO::Job *job, unsigned long speed) |
virtual void | slotPercent (KIO::Job *job, unsigned long percent) |
virtual void | slotCopying (KIO::Job *job, const KURL &src, const KURL &dest) |
virtual void | slotMoving (KIO::Job *job, const KURL &src, const KURL &dest) |
virtual void | slotDeleting (KIO::Job *job, const KURL &url) |
virtual void | slotCreatingDir (KIO::Job *job, const KURL &dir) |
virtual void | slotCanResume (KIO::Job *job, KIO::filesize_t from) |
Signals | |
void | stopped () |
Public Member Functions | |
ProgressBase (QWidget *parent) | |
void | setJob (KIO::Job *job) |
void | setJob (KIO::CopyJob *job) |
void | setJob (KIO::DeleteJob *job) |
void | setStopOnClose (bool stopOnClose) |
bool | stopOnClose () const |
void | setOnlyClean (bool onlyClean) |
bool | onlyClean () const |
void | finished () |
Protected Slots | |
void | slotFinished (KIO::Job *) |
Protected Member Functions | |
virtual void | closeEvent (QCloseEvent *) |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KIO::Job * | m_pJob |
Detailed Description
This class does all initialization stuff for progress, like connecting signals to slots. Base class for IO progress dialogs.All slots are implemented as pure virtual methods.
All custom IO progress dialog should inherit this class. Add your GUI code to the constructor and implemement those virtual methods which you need in order to display progress.
E.g. StatusbarProgress only implements slotTotalSize(), slotPercent() and slotSpeed().
Custom progress dialog will be used like this :
// create job CopyJob* job = KIO::copy(...); // create a dialog MyCustomProgress *customProgress; customProgress = new MyCustomProgress(); // connect progress with job customProgress->setJob( job ); ...
There is a special method setStopOnClose() that controls the behavior of the dialog.
- Author:
- Matej Koss <koss@miesto.sk>
Definition at line 70 of file progressbase.h.
Constructor & Destructor Documentation
|
Creates a new progress dialog.
Definition at line 24 of file progressbase.cpp. |
Member Function Documentation
|
Assign a KIO::Job to this progress dialog.
Reimplemented in KIO::StatusbarProgress. Definition at line 37 of file progressbase.cpp. References slotPercent(). |
|
Assign a KIO::Job to this progress dialog.
Definition at line 54 of file progressbase.cpp. References slotCopying(), slotCreatingDir(), slotMoving(), slotPercent(), slotProcessedDirs(), slotProcessedFiles(), slotProcessedSize(), slotSpeed(), slotTotalDirs(), slotTotalFiles(), and slotTotalSize(). |
|
Assign a KIO::Job to this progress dialog.
Definition at line 94 of file progressbase.cpp. References slotDeleting(), slotPercent(), slotProcessedDirs(), slotProcessedFiles(), slotProcessedSize(), slotSpeed(), slotTotalDirs(), slotTotalFiles(), and slotTotalSize(). |
|
This controls whether the dialog should be deleted or only cleaned when the KIO::Job is finished (or canceled). If your dialog is an embedded widget and not a separate window, you should setOnlyClean(true) in the constructor of your custom dialog.
Definition at line 115 of file progressbase.h. Referenced by KIO::StatusbarProgress::StatusbarProgress(). |
|
Checks whether the dialog should be deleted or cleaned.
Definition at line 123 of file progressbase.h. |
|
Call when the operation finished.
Definition at line 144 of file progressbase.cpp. References slotClean(). |
|
This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc.
Definition at line 158 of file progressbase.cpp. References KIO::Job::kill(), and stopped(). Referenced by KIO::StatusbarProgress::StatusbarProgress(). |
|
This method is called when the widget should be cleaned (after job is finished). redefine this for custom behavior. Reimplemented in KIO::StatusbarProgress. Definition at line 170 of file progressbase.cpp. Referenced by finished(). |
|
Called to set the total size.
Reimplemented in KIO::StatusbarProgress. Definition at line 149 of file progressbase.h. Referenced by setJob(). |
|
Called to set the total number of files.
Definition at line 156 of file progressbase.h. Referenced by setJob(). |
|
Called to set the total number of directories.
Definition at line 163 of file progressbase.h. Referenced by setJob(). |
|
Called to set the processed size.
Definition at line 171 of file progressbase.h. Referenced by setJob(). |
|
Called to set the number of processed files.
Definition at line 178 of file progressbase.h. Referenced by setJob(). |
|
Called to set the number of processed directories.
Definition at line 185 of file progressbase.h. Referenced by setJob(). |
|
Called to set the speed.
Reimplemented in KIO::StatusbarProgress. Definition at line 193 of file progressbase.h. Referenced by setJob(). |
|
Called to set the percentage.
Reimplemented in KIO::StatusbarProgress. Definition at line 201 of file progressbase.h. Referenced by setJob(). |
|
Called when the job is copying.
Definition at line 210 of file progressbase.h. Referenced by setJob(). |
|
Called when the job is moving.
Definition at line 218 of file progressbase.h. Referenced by setJob(). |
|
Called when the job is deleting.
Definition at line 225 of file progressbase.h. Referenced by setJob(). |
|
Called when the job is creating a directory.
Definition at line 232 of file progressbase.h. Referenced by setJob(). |
|
Called when the job is resuming..
Definition at line 240 of file progressbase.h. |
|
Called when the operation stopped.
Referenced by slotStop(). |
The documentation for this class was generated from the following files: