Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KIO::ProgressBase Class Reference

Base class for IO progress dialogs. More...

#include <progressbase.h>

Inheritance diagram for KIO::ProgressBase:

KIO::StatusbarProgress List of all members.

Public Slots

void slotStop ()
virtual void slotClean ()

Public Methods

void setOnlyClean (bool onlyClean)
void finished ()
 
Since:
3.1



Detailed Description

Base class for IO progress dialogs.

This class does all initialization stuff for progress, like connecting signals to slots. 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

void KIO::ProgressBase::setOnlyClean bool    onlyClean [inline]
 

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.

virtual void KIO::ProgressBase::slotClean   [virtual, slot]
 

This method is called when the widget should be cleaned (after job is finished). redefine this for custom behavior.

Reimplemented in KIO::StatusbarProgress.

void KIO::ProgressBase::slotStop   [slot]
 

This method should be called for correct cancelation of IO operation Connect this to the progress widgets buttons etc.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:33 2003 for kdelibs by doxygen1.2.18