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.
|
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.
References KIO::filesize_t, slotCopying(), slotCreatingDir(), slotMoving(), slotPercent(), slotProcessedDirs(), slotProcessedFiles(), slotProcessedSize(), slotSpeed(), slotTotalDirs(), slotTotalFiles(), and slotTotalSize(). |
|
Assign a KIO::Job to this progress dialog.
References KIO::filesize_t, 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.
Referenced by KIO::StatusbarProgress::StatusbarProgress(). |
|
Checks whether the dialog should be deleted or cleaned.
|
|
Call when the operation finished.
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. References QWidget::hide(). Referenced by finished(). |
|
Called to set the total size.
Reimplemented in KIO::StatusbarProgress. Definition at line 149 of file progressbase.h. References KIO::filesize_t. Referenced by setJob(). |
|
Called to set the total number of files.
Referenced by setJob(). |
|
Called to set the total number of directories.
Referenced by setJob(). |
|
Called to set the processed size.
References KIO::filesize_t. Referenced by setJob(). |
|
Called to set the number of processed files.
Referenced by setJob(). |
|
Called to set the number of processed directories.
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.
Referenced by setJob(). |
|
Called when the job is moving.
Referenced by setJob(). |
|
Called when the job is deleting.
Referenced by setJob(). |
|
Called when the job is creating a directory.
Referenced by setJob(). |
|
Called when the job is resuming..
References KIO::filesize_t. |
|
Called when the operation stopped.
Referenced by slotStop(). |
The documentation for this class was generated from the following files: