|
|
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 implmement those virtual methods which you need in order to display progress.
E.g. KIOLittleProgressDialog only implements slotTotalSize, slotPercent and slotSpeed.
Custom progress dialog will be used like this :
// create a dialog MyCustomProgressDlg *customProgress; customProgress = new MyCustomProgressDlg(); ... // create KIOJob and set the progress KIOJob* job; job->setGUImode( KIOJob::CUSTOM ); job->setProgressDlg( customProgress ); ...
You can either keep the pointer to the dialog, or simply call KIOJob::progressDlg() in order to obtain this pointer.
There is a special method setStopOnClose that controls the behaviour of the dialog.
void iconify ( bool ) |
Use this to iconify / deiconify the dialog.
Parameters:
stop | if true - KIOJob will be killed. if false - Dialog will be closed without killing the job ( IO will continue ). |
void refill () |
Use this method to get the values from KIOJob and refill the fields. This method automatically calls all slots, and thus it refills only those values, for which the slots were reimplemented.
Use this method when you open the dialog in the middle of IO.
void setStopOnClose ( bool stop ) |
Use this to set whether progress dialog should also kill the KIOJob when closed.
Parameters:
stop | if true - KIOJob will be killed. if false - Dialog will be closed without killing the job ( IO will continue ). |
bool m_bOnlyClean |
This variable controls wether the dialog should be deleted or only cleaned when the KIOJob is finished ( or canceled ).
If your dialog is embedded widget and not a separate window, you should set this variable to true in the constructor of your custom dialog.
If true - Dialog will only call method clean. If false - Dialog will be deleted.