org.kde.koala
public class Job extends QObject
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 null );See JobSignals for signals emitted by Job
UNKNOWN: The base class for all jobs.
Constructor Summary | |
---|---|
protected | Job(Class dummy) |
Job(boolean showProgressInfo) |
Method Summary | |
---|---|
void | addMetaData(String key, String value)
Add key/value pair to the meta data that is sent to the slave. |
protected void | addSubjob(Job job, boolean inheritMetaData)
Add a job that has to be finished before a result
is emitted. |
protected void | addSubjob(Job job) |
String | className() |
ArrayList | detailedErrorStrings(KURL reqUrl, int method)
Converts an error code and a non-i18n error message into i18n
strings suitable for presentation in a detailed error message box. |
ArrayList | detailedErrorStrings(KURL reqUrl) |
ArrayList | detailedErrorStrings() |
protected void | emitPercent(long processedSize, long totalSize)
Utility function for inherited jobs.
|
protected void | emitResult()
Utility function to emit the result signal, and suicide this job.
|
protected void | emitSpeed(long speed)
Utility function for inherited jobs.
|
int | error()
Returns the error code, if there has been an error.
|
String | errorString()
Converts an error code and a non-i18n error message into an
error message in the current language. |
String | errorText()
Returns the error text if there has been an error.
|
protected int | extraFlags() |
long | getProcessedSize()
Returns the processed size for this job. |
boolean | isAutoErrorHandlingEnabled()
Returns whether automatic error handling is enabled or disabled. |
boolean | isAutoWarningHandlingEnabled()
Returns whether automatic warning handling is enabled or disabled.
|
boolean | isInteractive()
Returns whether message display is enabled or disabled. |
void | kill(boolean quietly)
Abort this job.
|
void | kill() |
QMetaObject | metaObject() |
Job | parentJob()
Returns the parent job, if there is one. |
int | progressId()
Returns the progress id for this job. |
String | queryMetaData(String key)
Query meta data received from the slave.
|
protected void | removeSubjob(Job job)
Mark a sub job as being done. |
protected void | removeSubjob(Job job, boolean mergeMetaData, boolean emitResultIfLast)
Overloaded version of removeSubjob |
void | setAutoErrorHandlingEnabled(boolean enable, QWidget parentWidget)
Enable or disable the automatic error handling. |
void | setAutoErrorHandlingEnabled(boolean enable) |
void | setAutoWarningHandlingEnabled(boolean enable)
Enable or disable the automatic warning handling. |
void | setInteractive(boolean enable)
Enable or disable the message display from the job.
|
void | setParentJob(Job parentJob)
Set the parent Job.
|
protected void | setProcessedSize(long size)
Set the processed size, does not emit processedSize |
void | setWindow(QWidget window)
Associate this job with a window given by window. |
void | showErrorDialog(QWidget parent)
Display a dialog box to inform the user of the error given by
this job.
|
void | showErrorDialog() |
protected void | slotInfoMessage(Job job, String msg)
Forward signal from subjob. |
protected void | slotResult(Job job)
Called whenever a subjob finishes.
|
protected void | slotSpeed(Job job, long speed)
Forward signal from subjob. |
protected void | slotSpeedTimeout()
Remove speed information. |
QWidget | window()
Returns the window this job is associated with. |
Parameters: key the key of the meta data value the value of the meta data
UNKNOWN: Add key/value pair to the meta data that is sent to the slave.
Parameters: job the subjob to add inheritMetaData if true, the subjob will inherit the meta data from this job.
UNKNOWN: Add a job that has to be finished before a result is emitted.
Parameters: reqUrl the request URL that generated this error message method the method that generated this error message (unimplemented)
Returns: the following strings: caption, error + description, causes+solutions
UNKNOWN: Converts an error code and a non-i18n error message into i18n strings suitable for presentation in a detailed error message box.
Parameters: processedSize the processed size in bytes totalSize the total size in bytes
UNKNOWN: Utility function for inherited jobs.
UNKNOWN: Utility function to emit the result signal, and suicide this job.
Parameters: speed the speed in bytes/s
UNKNOWN: Utility function for inherited jobs.
Returns: the error code for this job, 0 if no error. Error codes are defined in KIO.Error.
UNKNOWN: Returns the error code, if there has been an error.
i18n( "Could not read\n%1" ).arg( errortext );Use this to display the error yourself, but for a dialog box use Job.showErrorDialog. Do not call it if error() is not 0.
Returns: the error message and if there is no error, a message telling the user that the app is broken, so check with error() whether there is an error
UNKNOWN: Converts an error code and a non-i18n error message into an error message in the current language.
Returns: a string to help understand the error, usually the url related to the error. Only valid if error() is not 0.
UNKNOWN: Returns the error text if there has been an error.
See Also: Job
UNKNOWN: Returns the processed size for this job.
Returns: true if automatic error handling is enabled
See Also: Job
UNKNOWN: Returns whether automatic error handling is enabled or disabled.
Returns: true if automatic warning handling is enabled
See Also: Job
UNKNOWN: Returns whether automatic warning handling is enabled or disabled.
Returns: true if message display is enabled
See Also: Job
UNKNOWN: Returns whether message display is enabled or disabled.
Parameters: quietly if false, Job will emit signal result
and ask kio_uiserver to close the progress window.
quietly
is set to true for subjobs. Whether applications
should call with true or false depends on whether they rely
on result being emitted or not.
UNKNOWN: Abort this job.
Returns: the parent job, or 0 if there is none
See Also: Job
UNKNOWN: Returns the parent job, if there is one.
Returns: the progress id for this job, as returned by uiserver
UNKNOWN: Returns the progress id for this job.
Parameters: key the key of the meta data to retrieve
Returns: the value of the meta data, or null if the
key
does not exist
UNKNOWN: Query meta data received from the slave.
Parameters: job the subjob to add
UNKNOWN: Mark a sub job as being done.
Parameters: job the subjob to remove mergeMetaData if set, the metadata received by the subjob is merged into this job. emitResultIfLast if this was the last subjob, emit result, i.e. terminate this job.
UNKNOWN: Overloaded version of removeSubjob
parentWidget
(if supplied) , right before
the emission of the result signal.
The default is false.Parameters: enable enable or disable automatic error handling parentWidget the parent widget, passed to showErrorDialog. Can be 0 for top-level
UNKNOWN: Enable or disable the automatic error handling.
Parameters: enable enable or disable automatic warning handling
See Also: Job
UNKNOWN: Enable or disable the automatic warning handling.
Parameters: enable enable or disable message display
UNKNOWN: Enable or disable the message display from the job.
Parameters: parentJob the new parent job
UNKNOWN: Set the parent Job.
UNKNOWN: Set the processed size, does not emit processedSize
window.
Parameters: window the window to associate to
See Also: Job
UNKNOWN: Associate this job with a window given by window.
Parameters: parent the parent widget for the dialog box, can be 0 for top-level
UNKNOWN: Display a dialog box to inform the user of the error given by this job.
Parameters: job the subjob msg the info message
See Also: Job
UNKNOWN: Forward signal from subjob.
Parameters: job the subjob
See Also: Job
UNKNOWN: Called whenever a subjob finishes.
Parameters: job the subjob speed the speed in bytes/s
See Also: Job
UNKNOWN: Forward signal from subjob.
UNKNOWN: Remove speed information.
Returns: the associated window
See Also: Job
UNKNOWN: Returns the window this job is associated with.