#include <progressbase.h>
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 :
There is a special method setStopOnClose() that controls the behavior of the dialog.
Base class for IO progress dialogs.
Definition at line 70 of file progressbase.h.
Constructor & Destructor Documentation
◆ ProgressBase()
TDEIO::ProgressBase::ProgressBase | ( | TQWidget * | parent | ) |
Creates a new progress dialog.
- Parameters
-
parent the parent of this dialog window, or 0
Definition at line 24 of file progressbase.cpp.
Member Function Documentation
◆ finished()
void TDEIO::ProgressBase::finished | ( | ) |
◆ onlyClean()
|
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
-
job the 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
-
job the 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
-
job the job to assign
Definition at line 37 of file progressbase.cpp.
◆ setOnlyClean()
|
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
-
onlyClean If 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
|
inlinevirtualslot |
Called when the job is resuming.
- Parameters
-
job the TDEIO::Job from the position to resume from in bytes
Definition at line 240 of file progressbase.h.
◆ 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
|
inlinevirtualslot |
Called when the job is copying.
- Parameters
-
job the TDEIO::Job src the source of the operation dest the destination of the operation
Definition at line 210 of file progressbase.h.
◆ slotCreatingDir
|
inlinevirtualslot |
Called when the job is creating a directory.
- Parameters
-
job the TDEIO::Job dir the URL of the directory to create
Definition at line 232 of file progressbase.h.
◆ slotDeleting
|
inlinevirtualslot |
Called when the job is deleting.
- Parameters
-
job the TDEIO::Job url the URL to delete
Definition at line 225 of file progressbase.h.
◆ slotMoving
|
inlinevirtualslot |
Called when the job is moving.
- Parameters
-
job the TDEIO::Job src the source of the operation dest the destination of the operation
Definition at line 218 of file progressbase.h.
◆ slotPercent
|
inlinevirtualslot |
Called to set the percentage.
- Parameters
-
job the TDEIO::Job percent the percentage
Definition at line 201 of file progressbase.h.
◆ slotProcessedDirs
|
inlinevirtualslot |
Called to set the number of processed directories.
- Parameters
-
job the TDEIO::Job dirs the number of directories
Definition at line 185 of file progressbase.h.
◆ slotProcessedFiles
|
inlinevirtualslot |
Called to set the number of processed files.
- Parameters
-
job the TDEIO::Job files the number of files
Definition at line 178 of file progressbase.h.
◆ slotProcessedSize
|
inlinevirtualslot |
Called to set the processed size.
- Parameters
-
job the TDEIO::Job bytes the processed size in bytes
Definition at line 171 of file progressbase.h.
◆ slotSpeed
|
inlinevirtualslot |
Called to set the speed.
- Parameters
-
job the TDEIO::Job speed the speed in bytes/second
Definition at line 193 of file progressbase.h.
◆ 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
|
inlinevirtualslot |
Called to set the total number of directories.
- Parameters
-
job the TDEIO::Job dirs the number of directories
Definition at line 163 of file progressbase.h.
◆ slotTotalFiles
|
inlinevirtualslot |
Called to set the total number of files.
- Parameters
-
job the TDEIO::Job files the number of files
Definition at line 156 of file progressbase.h.
◆ slotTotalSize
|
inlinevirtualslot |
Called to set the total size.
- Parameters
-
job the TDEIO::Job size the total size in bytes
Definition at line 149 of file progressbase.h.
◆ stopped
|
signal |
Called when the operation stopped.
The documentation for this class was generated from the following files: