|
|
The base class for all jobs. For all jobs created in an application, the code looks like
KIO::Job * job = KIO::someoperation( some parameters ); connect( job, SIGNAL( result( KIO::Job * ) ), this, SLOT( slotResult( KIO::Job * ) ) ); |
(other connects, specific to the job)
And slotResult is usually at least:
if ( job->error() ) job->showErrorDialog( this or 0L ); |
|
[protected]
~ |
[virtual]
void |
[virtual]
Abort job This kills all subjobs and deletes the job
Parameters:
int |
Returns: the error code for this job, 0 if no error Error codes are defined in KIO::Error. Only call this method from the slot connected to result.
int |
Returns: the progress id for this job, as returned by uiserver
const QString & |
Returns: a string to help understand the error, usually the url related to the error. Only call if error is not 0. This is really internal, better use errorString or errorDialog.
QString |
Converts an error code and a non-i18n error message into an error message in the current language. The low level (non-i18n) error message (usually a url) is put into the translated error message using %1. Example for errid == ERR_CANNOT_OPEN_FOR_READING: i18n( "Could not read\n%1" ).arg( errortext ); Use this to display the error yourself, but for a dialog box use KIO::ErrorDialog.
void |
Display a dialog box to inform the user of the error given by this job. Only call if error is not 0, and only in the slot connected to result.
Parameters:
void |
Associate this job with a window given by window
QWidget * |
[const]
Returns the window this job is associated with.
void |
[signal]
Emitted when the job is finished, in any case (completed, canceled, failed...). Use error to know the result.
void |
[signal]
Emitted when the job is canceled.
Signal result
is emitted as well, and error() is,
in this case, ERR_USER_CANCELED.
void |
[signal]
Emitted to display information about this job, as sent by the slave. Examples of message are "Resolving host", "Connecting to host...", etc.
void |
[signal]
Emitted when the slave successfully connected to the host. There is no guarantee the slave will send this, and this is currently unused (in the applications).
void |
[signal]
Progress signal showing the overall progress of the job This is valid for any kind of job, and allows using a a progress bar very easily (see KProgress)
void |
[signal]
Emitted when we know the size of this job (data size for transfers, number of entries for listings).
void |
[signal]
Regularly emitted to show the progress of this job (current data size for transfers, entries listed).
void |
[signal]
Emitted to display information about the speed of this job.
void |
[protected virtual slot]
Called whenever a subjob finishes. Default implementation checks for errors and propagates to parent job, then calls removeSubjob. Override if you don't want subjobs errors to be propagated.
void |
[protected slot]
Forward signal from subjob
void |
[protected slot]
Forward signal from subjob
void |
[protected slot]
Remove speed information
void |
[protected virtual]
Add a job that has to be finished before a result is emitted. This has obviously to be called before the finish signal is emitted by the slave.
void |
[protected virtual]
Mark a sub job as being done. If it's the last to wait on the job will emit a result - jobs with two steps might want to override slotResult in order to avoid calling this method.
void |
[protected]
Utility function for inherited jobs. Emits the percent signal if bigger than m_percent, after calculating it from the parameters.
void |
[protected]
Utility function for inherited jobs. Emits the speed signal and starts the timer for removing that info
void |
[protected]
Utility function to emit the result signal, and suicide this job. It first tells the observer to hide the progress dialog for this job.
QList |
[protected]
int |
[protected]
QString |
[protected]
unsigned long |
[protected]
int |
[protected]
QTimer * |
[protected]
QGuardedPtr<QWidget> |
[protected]
Generated by: prospector@porky.devel.redhat.com on Fri Nov 3 09:58:58 2000, using kdoc 2.0a42. |