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 () |
This method should be called for correct cancelation of IO operation Connect this to the progress widgets buttons etc. | |
virtual void | slotClean () |
This method is called when the widget should be cleaned (after job is finished). | |
virtual void | slotTotalSize (KIO::Job *, KIO::filesize_t) |
virtual void | slotTotalFiles (KIO::Job *, unsigned long) |
virtual void | slotTotalDirs (KIO::Job *, unsigned long) |
virtual void | slotProcessedSize (KIO::Job *, KIO::filesize_t) |
virtual void | slotProcessedFiles (KIO::Job *, unsigned long) |
virtual void | slotProcessedDirs (KIO::Job *, unsigned long) |
virtual void | slotSpeed (KIO::Job *, unsigned long) |
virtual void | slotPercent (KIO::Job *, unsigned long) |
virtual void | slotCopying (KIO::Job *, const KURL &, const KURL &) |
virtual void | slotMoving (KIO::Job *, const KURL &, const KURL &) |
virtual void | slotDeleting (KIO::Job *, const KURL &) |
virtual void | slotCreatingDir (KIO::Job *, const KURL &) |
virtual void | slotCanResume (KIO::Job *, KIO::filesize_t) |
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) |
This controls whether the dialog should be deleted or only cleaned when the KIO::Job is finished (or canceled). | |
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.
Member Function Documentation
|
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. If true - Dialog will only call method slotClean. If false - Dialog will be deleted. Definition at line 99 of file progressbase.h. |
|
Definition at line 144 of file progressbase.cpp. References slotClean(). |
|
This method should be called for correct cancelation of IO operation Connect this to the progress widgets buttons etc.
Definition at line 158 of file progressbase.cpp. References KIO::Job::kill(). |
|
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(). |
The documentation for this class was generated from the following files: