• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

  • TDEIO
  • ProgressBase
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
TDEIO::ProgressBase Class Reference

#include <progressbase.h>

Inheritance diagram for TDEIO::ProgressBase:
TDEIO::StatusbarProgress

Public Slots

void slotStop ()
 
virtual void slotClean ()
 
virtual void slotTotalSize (TDEIO::Job *job, TDEIO::filesize_t size)
 
virtual void slotTotalFiles (TDEIO::Job *job, unsigned long files)
 
virtual void slotTotalDirs (TDEIO::Job *job, unsigned long dirs)
 
virtual void slotProcessedSize (TDEIO::Job *job, TDEIO::filesize_t bytes)
 
virtual void slotProcessedFiles (TDEIO::Job *job, unsigned long files)
 
virtual void slotProcessedDirs (TDEIO::Job *job, unsigned long dirs)
 
virtual void slotSpeed (TDEIO::Job *job, unsigned long speed)
 
virtual void slotPercent (TDEIO::Job *job, unsigned long percent)
 
virtual void slotCopying (TDEIO::Job *job, const KURL &src, const KURL &dest)
 
virtual void slotMoving (TDEIO::Job *job, const KURL &src, const KURL &dest)
 
virtual void slotDeleting (TDEIO::Job *job, const KURL &url)
 
virtual void slotCreatingDir (TDEIO::Job *job, const KURL &dir)
 
virtual void slotCanResume (TDEIO::Job *job, TDEIO::filesize_t from)
 

Signals

void stopped ()
 

Public Member Functions

 ProgressBase (TQWidget *parent)
 
void setJob (TDEIO::Job *job)
 
void setJob (TDEIO::CopyJob *job)
 
void setJob (TDEIO::DeleteJob *job)
 
void setStopOnClose (bool stopOnClose)
 
bool stopOnClose () const
 
void setOnlyClean (bool onlyClean)
 
bool onlyClean () const
 
void finished ()
 

Protected Slots

void slotFinished (TDEIO::Job *)
 

Protected Member Functions

virtual void closeEvent (TQCloseEvent *)
 
virtual void virtual_hook (int id, void *data)
 

Protected Attributes

TDEIO::Job * m_pJob
 

Detailed Description

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 = TDEIO::copy(...);
// create a dialog
MyCustomProgress *customProgress;
customProgress = new MyCustomProgress();
// connect progress with job
customProgress->setJob( job );
...
TDEIO::copy
TDEIO_EXPORT CopyJob * copy(const KURL &src, const KURL &dest, bool showProgressInfo=true)
Copy a file or directory src into the destination dest, which can be a file (including the final file...
Definition: job.cpp:3950

There is a special method setStopOnClose() that controls the behavior of the dialog.

Base class for IO progress dialogs.

Author
Matej Koss koss@.nosp@m.mies.nosp@m.to.sk

Definition at line 70 of file progressbase.h.

Constructor & Destructor Documentation

◆ ProgressBase()

TDEIO::ProgressBase::ProgressBase ( TQWidget *  parent)

Creates a new progress dialog.

Parameters
parentthe parent of this dialog window, or 0

Definition at line 24 of file progressbase.cpp.

Member Function Documentation

◆ finished()

void TDEIO::ProgressBase::finished ( )

Call when the operation finished.

Since
3.1

Definition at line 144 of file progressbase.cpp.

◆ onlyClean()

bool TDEIO::ProgressBase::onlyClean ( ) const
inline

Checks whether the dialog should be deleted or cleaned.

Returns
true if the dialog only calls slotClean, false if it will be deleted
See also
setOnlyClean()

Definition at line 123 of file progressbase.h.

◆ setJob() [1/3]

void TDEIO::ProgressBase::setJob ( TDEIO::CopyJob *  job)

Assign a TDEIO::Job to this progress dialog.

Parameters
jobthe job to assign

Definition at line 54 of file progressbase.cpp.

◆ setJob() [2/3]

void TDEIO::ProgressBase::setJob ( TDEIO::DeleteJob *  job)

Assign a TDEIO::Job to this progress dialog.

Parameters
jobthe job to assign

Definition at line 94 of file progressbase.cpp.

◆ setJob() [3/3]

void TDEIO::ProgressBase::setJob ( TDEIO::Job *  job)

Assign a TDEIO::Job to this progress dialog.

Parameters
jobthe job to assign

Definition at line 37 of file progressbase.cpp.

◆ setOnlyClean()

void TDEIO::ProgressBase::setOnlyClean ( bool  onlyClean)
inline

This controls whether the dialog should be deleted or only cleaned when the TDEIO::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.

Parameters
onlyCleanIf true the dialog will only call method slotClean. If false the dialog will be deleted.
See also
onlyClean()

Definition at line 115 of file progressbase.h.

◆ slotCanResume

virtual void TDEIO::ProgressBase::slotCanResume ( TDEIO::Job *  job,
TDEIO::filesize_t  from 
)
inlinevirtualslot

Called when the job is resuming.

Parameters
jobthe TDEIO::Job
fromthe position to resume from in bytes

Definition at line 240 of file progressbase.h.

◆ slotClean

void TDEIO::ProgressBase::slotClean ( )
virtualslot

This method is called when the widget should be cleaned (after job is finished).

redefine this for custom behavior.

Definition at line 170 of file progressbase.cpp.

◆ slotCopying

virtual void TDEIO::ProgressBase::slotCopying ( TDEIO::Job *  job,
const KURL &  src,
const KURL &  dest 
)
inlinevirtualslot

Called when the job is copying.

Parameters
jobthe TDEIO::Job
srcthe source of the operation
destthe destination of the operation

Definition at line 210 of file progressbase.h.

◆ slotCreatingDir

virtual void TDEIO::ProgressBase::slotCreatingDir ( TDEIO::Job *  job,
const KURL &  dir 
)
inlinevirtualslot

Called when the job is creating a directory.

Parameters
jobthe TDEIO::Job
dirthe URL of the directory to create

Definition at line 232 of file progressbase.h.

◆ slotDeleting

virtual void TDEIO::ProgressBase::slotDeleting ( TDEIO::Job *  job,
const KURL &  url 
)
inlinevirtualslot

Called when the job is deleting.

Parameters
jobthe TDEIO::Job
urlthe URL to delete

Definition at line 225 of file progressbase.h.

◆ slotMoving

virtual void TDEIO::ProgressBase::slotMoving ( TDEIO::Job *  job,
const KURL &  src,
const KURL &  dest 
)
inlinevirtualslot

Called when the job is moving.

Parameters
jobthe TDEIO::Job
srcthe source of the operation
destthe destination of the operation

Definition at line 218 of file progressbase.h.

◆ slotPercent

virtual void TDEIO::ProgressBase::slotPercent ( TDEIO::Job *  job,
unsigned long  percent 
)
inlinevirtualslot

Called to set the percentage.

Parameters
jobthe TDEIO::Job
percentthe percentage

Definition at line 201 of file progressbase.h.

◆ slotProcessedDirs

virtual void TDEIO::ProgressBase::slotProcessedDirs ( TDEIO::Job *  job,
unsigned long  dirs 
)
inlinevirtualslot

Called to set the number of processed directories.

Parameters
jobthe TDEIO::Job
dirsthe number of directories

Definition at line 185 of file progressbase.h.

◆ slotProcessedFiles

virtual void TDEIO::ProgressBase::slotProcessedFiles ( TDEIO::Job *  job,
unsigned long  files 
)
inlinevirtualslot

Called to set the number of processed files.

Parameters
jobthe TDEIO::Job
filesthe number of files

Definition at line 178 of file progressbase.h.

◆ slotProcessedSize

virtual void TDEIO::ProgressBase::slotProcessedSize ( TDEIO::Job *  job,
TDEIO::filesize_t  bytes 
)
inlinevirtualslot

Called to set the processed size.

Parameters
jobthe TDEIO::Job
bytesthe processed size in bytes

Definition at line 171 of file progressbase.h.

◆ slotSpeed

virtual void TDEIO::ProgressBase::slotSpeed ( TDEIO::Job *  job,
unsigned long  speed 
)
inlinevirtualslot

Called to set the speed.

Parameters
jobthe TDEIO::Job
speedthe speed in bytes/second

Definition at line 193 of file progressbase.h.

◆ slotStop

void TDEIO::ProgressBase::slotStop ( )
slot

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

Definition at line 158 of file progressbase.cpp.

◆ slotTotalDirs

virtual void TDEIO::ProgressBase::slotTotalDirs ( TDEIO::Job *  job,
unsigned long  dirs 
)
inlinevirtualslot

Called to set the total number of directories.

Parameters
jobthe TDEIO::Job
dirsthe number of directories

Definition at line 163 of file progressbase.h.

◆ slotTotalFiles

virtual void TDEIO::ProgressBase::slotTotalFiles ( TDEIO::Job *  job,
unsigned long  files 
)
inlinevirtualslot

Called to set the total number of files.

Parameters
jobthe TDEIO::Job
filesthe number of files

Definition at line 156 of file progressbase.h.

◆ slotTotalSize

virtual void TDEIO::ProgressBase::slotTotalSize ( TDEIO::Job *  job,
TDEIO::filesize_t  size 
)
inlinevirtualslot

Called to set the total size.

Parameters
jobthe TDEIO::Job
sizethe total size in bytes

Definition at line 149 of file progressbase.h.

◆ stopped

void TDEIO::ProgressBase::stopped ( )
signal

Called when the operation stopped.


The documentation for this class was generated from the following files:
  • progressbase.h
  • progressbase.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.