.TH "KIO::ProgressBase" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KIO::ProgressBase \- This class does all initialization stuff for progress, like connecting signals to slots. Base class for IO progress dialogs.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <progressbase.h>\fP
.PP
Inherits \fBQWidget\fP.
.PP
Inherited by KIO::DefaultProgress, and \fBKIO::StatusbarProgress\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "void \fBslotStop\fP ()"
.br
.ti -1c
.RI "virtual void \fBslotClean\fP ()"
.br
.ti -1c
.RI "virtual void \fBslotTotalSize\fP (\fBKIO::Job\fP *job, \fBKIO::filesize_t\fP bytes)"
.br
.ti -1c
.RI "virtual void \fBslotTotalFiles\fP (\fBKIO::Job\fP *job, unsigned long files)"
.br
.ti -1c
.RI "virtual void \fBslotTotalDirs\fP (\fBKIO::Job\fP *job, unsigned long dirs)"
.br
.ti -1c
.RI "virtual void \fBslotProcessedSize\fP (\fBKIO::Job\fP *job, \fBKIO::filesize_t\fP bytes)"
.br
.ti -1c
.RI "virtual void \fBslotProcessedFiles\fP (\fBKIO::Job\fP *job, unsigned long files)"
.br
.ti -1c
.RI "virtual void \fBslotProcessedDirs\fP (\fBKIO::Job\fP *job, unsigned long dirs)"
.br
.ti -1c
.RI "virtual void \fBslotSpeed\fP (\fBKIO::Job\fP *job, unsigned long speed)"
.br
.ti -1c
.RI "virtual void \fBslotPercent\fP (\fBKIO::Job\fP *job, unsigned long percent)"
.br
.ti -1c
.RI "virtual void \fBslotCopying\fP (\fBKIO::Job\fP *job, const \fBKURL\fP &src, const \fBKURL\fP &dest)"
.br
.ti -1c
.RI "virtual void \fBslotMoving\fP (\fBKIO::Job\fP *job, const \fBKURL\fP &src, const \fBKURL\fP &dest)"
.br
.ti -1c
.RI "virtual void \fBslotDeleting\fP (\fBKIO::Job\fP *job, const \fBKURL\fP &url)"
.br
.ti -1c
.RI "virtual void \fBslotCreatingDir\fP (\fBKIO::Job\fP *job, const \fBKURL\fP &dir)"
.br
.ti -1c
.RI "virtual void \fBslotCanResume\fP (\fBKIO::Job\fP *job, \fBKIO::filesize_t\fP from)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBstopped\fP ()"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBProgressBase\fP (\fBQWidget\fP *parent)"
.br
.ti -1c
.RI "void \fBsetJob\fP (\fBKIO::Job\fP *job)"
.br
.ti -1c
.RI "void \fBsetJob\fP (\fBKIO::CopyJob\fP *job)"
.br
.ti -1c
.RI "void \fBsetJob\fP (\fBKIO::DeleteJob\fP *job)"
.br
.ti -1c
.RI "void \fBsetStopOnClose\fP (bool stopOnClose)"
.br
.ti -1c
.RI "bool \fBstopOnClose\fP () const "
.br
.ti -1c
.RI "void \fBsetOnlyClean\fP (bool onlyClean)"
.br
.ti -1c
.RI "bool \fBonlyClean\fP () const "
.br
.ti -1c
.RI "void \fBfinished\fP ()"
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "void \fBslotFinished\fP (\fBKIO::Job\fP *)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBcloseEvent\fP (\fBQCloseEvent\fP *)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKIO::Job\fP * \fBm_pJob\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
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.
.PP
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.
.PP
E.g. \fBStatusbarProgress\fP only implements \fBslotTotalSize()\fP, \fBslotPercent()\fP and \fBslotSpeed()\fP.
.PP
Custom progress dialog will be used like this : 
.PP
.nf
 // create job
 CopyJob* job = KIO::copy(...);
 // create a dialog
 MyCustomProgress *customProgress;
 customProgress = new MyCustomProgress();
 // connect progress with job
 customProgress->setJob( job );
 ...

.fi
.PP
.PP
There is a special method setStopOnClose() that controls the behavior of the dialog. 
.PP
\fBAuthor:\fP
.RS 4
Matej Koss <koss@miesto.sk> 
.RE
.PP

.PP
Definition at line 70 of file progressbase.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KIO::ProgressBase::ProgressBase (\fBQWidget\fP * parent)"
.PP
Creates a new progress dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP the parent of this dialog window, or 0 
.RE
.PP

.PP
Definition at line 24 of file progressbase.cpp.
.SH "Member Function Documentation"
.PP 
.SS "void KIO::ProgressBase::setJob (\fBKIO::Job\fP * job)"
.PP
Assign a \fBKIO::Job\fP to this progress dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the job to assign 
.RE
.PP

.PP
Reimplemented in \fBKIO::StatusbarProgress\fP.
.PP
Definition at line 37 of file progressbase.cpp.
.PP
References slotPercent().
.SS "void KIO::ProgressBase::setJob (\fBKIO::CopyJob\fP * job)"
.PP
Assign a \fBKIO::Job\fP to this progress dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the job to assign 
.RE
.PP

.PP
Definition at line 54 of file progressbase.cpp.
.PP
References slotCopying(), slotCreatingDir(), slotMoving(), slotPercent(), slotProcessedDirs(), slotProcessedFiles(), slotProcessedSize(), slotSpeed(), slotTotalDirs(), slotTotalFiles(), and slotTotalSize().
.SS "void KIO::ProgressBase::setJob (\fBKIO::DeleteJob\fP * job)"
.PP
Assign a \fBKIO::Job\fP to this progress dialog. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the job to assign 
.RE
.PP

.PP
Definition at line 94 of file progressbase.cpp.
.PP
References slotDeleting(), slotPercent(), slotProcessedDirs(), slotProcessedFiles(), slotProcessedSize(), slotSpeed(), slotTotalDirs(), slotTotalFiles(), and slotTotalSize().
.SS "void KIO::ProgressBase::setOnlyClean (bool onlyClean)\fC [inline]\fP"
.PP
This controls whether the dialog should be deleted or only cleaned when the \fBKIO::Job\fP is finished (or canceled). 
.PP
If your dialog is an embedded widget and not a separate window, you should setOnlyClean(true) in the constructor of your custom dialog.
.PP
\fBParameters:\fP
.RS 4
\fIonlyClean\fP If true the dialog will only call method slotClean. If false the dialog will be deleted. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBonlyClean()\fP 
.RE
.PP

.PP
Definition at line 115 of file progressbase.h.
.PP
Referenced by KIO::StatusbarProgress::StatusbarProgress().
.SS "bool KIO::ProgressBase::onlyClean () const\fC [inline]\fP"
.PP
Checks whether the dialog should be deleted or cleaned. 
.PP
\fBReturns:\fP
.RS 4
true if the dialog only calls slotClean, false if it will be deleted 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetOnlyClean()\fP 
.RE
.PP

.PP
Definition at line 123 of file progressbase.h.
.SS "void KIO::ProgressBase::finished ()"
.PP
Call when the operation finished. 
.PP
\fBSince:\fP
.RS 4
3.1 
.RE
.PP

.PP
Definition at line 144 of file progressbase.cpp.
.PP
References slotClean().
.SS "void KIO::ProgressBase::slotStop ()\fC [slot]\fP"
.PP
This method should be called for correct cancellation of IO operation Connect this to the progress widgets buttons etc. 
.PP
Definition at line 158 of file progressbase.cpp.
.PP
References KIO::Job::kill(), and stopped().
.PP
Referenced by KIO::StatusbarProgress::StatusbarProgress().
.SS "void KIO::ProgressBase::slotClean ()\fC [virtual, slot]\fP"
.PP
This method is called when the widget should be cleaned (after job is finished). 
.PP
redefine this for custom behavior. 
.PP
Reimplemented in \fBKIO::StatusbarProgress\fP.
.PP
Definition at line 170 of file progressbase.cpp.
.PP
References QWidget::hide().
.PP
Referenced by finished().
.SS "virtual void KIO::ProgressBase::slotTotalSize (\fBKIO::Job\fP * job, \fBKIO::filesize_t\fP bytes)\fC [inline, virtual, slot]\fP"
.PP
Called to set the total size. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIbytes\fP the total size in bytes 
.RE
.PP

.PP
Reimplemented in \fBKIO::StatusbarProgress\fP.
.PP
Definition at line 149 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotTotalFiles (\fBKIO::Job\fP * job, unsigned long files)\fC [inline, virtual, slot]\fP"
.PP
Called to set the total number of files. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIfiles\fP the number of files 
.RE
.PP

.PP
Definition at line 156 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotTotalDirs (\fBKIO::Job\fP * job, unsigned long dirs)\fC [inline, virtual, slot]\fP"
.PP
Called to set the total number of directories. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIdirs\fP the number of directories 
.RE
.PP

.PP
Definition at line 163 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotProcessedSize (\fBKIO::Job\fP * job, \fBKIO::filesize_t\fP bytes)\fC [inline, virtual, slot]\fP"
.PP
Called to set the processed size. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIbytes\fP the processed size in bytes 
.RE
.PP

.PP
Definition at line 171 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotProcessedFiles (\fBKIO::Job\fP * job, unsigned long files)\fC [inline, virtual, slot]\fP"
.PP
Called to set the number of processed files. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIfiles\fP the number of files 
.RE
.PP

.PP
Definition at line 178 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotProcessedDirs (\fBKIO::Job\fP * job, unsigned long dirs)\fC [inline, virtual, slot]\fP"
.PP
Called to set the number of processed directories. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIdirs\fP the number of directories 
.RE
.PP

.PP
Definition at line 185 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotSpeed (\fBKIO::Job\fP * job, unsigned long speed)\fC [inline, virtual, slot]\fP"
.PP
Called to set the speed. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIspeed\fP the speed in bytes/second 
.RE
.PP

.PP
Reimplemented in \fBKIO::StatusbarProgress\fP.
.PP
Definition at line 193 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotPercent (\fBKIO::Job\fP * job, unsigned long percent)\fC [inline, virtual, slot]\fP"
.PP
Called to set the percentage. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIpercent\fP the percentage 
.RE
.PP

.PP
Reimplemented in \fBKIO::StatusbarProgress\fP.
.PP
Definition at line 201 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotCopying (\fBKIO::Job\fP * job, const \fBKURL\fP & src, const \fBKURL\fP & dest)\fC [inline, virtual, slot]\fP"
.PP
Called when the job is copying. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIsrc\fP the source of the operation 
.br
\fIdest\fP the destination of the operation 
.RE
.PP

.PP
Definition at line 210 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotMoving (\fBKIO::Job\fP * job, const \fBKURL\fP & src, const \fBKURL\fP & dest)\fC [inline, virtual, slot]\fP"
.PP
Called when the job is moving. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIsrc\fP the source of the operation 
.br
\fIdest\fP the destination of the operation 
.RE
.PP

.PP
Definition at line 218 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotDeleting (\fBKIO::Job\fP * job, const \fBKURL\fP & url)\fC [inline, virtual, slot]\fP"
.PP
Called when the job is deleting. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIurl\fP the URL to delete 
.RE
.PP

.PP
Definition at line 225 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotCreatingDir (\fBKIO::Job\fP * job, const \fBKURL\fP & dir)\fC [inline, virtual, slot]\fP"
.PP
Called when the job is creating a directory. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIdir\fP the URL of the directory to create 
.RE
.PP

.PP
Definition at line 232 of file progressbase.h.
.PP
Referenced by setJob().
.SS "virtual void KIO::ProgressBase::slotCanResume (\fBKIO::Job\fP * job, \fBKIO::filesize_t\fP from)\fC [inline, virtual, slot]\fP"
.PP
Called when the job is resuming.. 
.PP
\fBParameters:\fP
.RS 4
\fIjob\fP the \fBKIO::Job\fP 
.br
\fIfrom\fP the position to resume from in bytes 
.RE
.PP

.PP
Definition at line 240 of file progressbase.h.
.SS "void KIO::ProgressBase::stopped ()\fC [signal]\fP"
.PP
Called when the operation stopped. 
.PP
Referenced by slotStop().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
