kget
TransferGroup Class Reference
#include <transfergroup.h>

Detailed Description
class TransferGroup:This class abstracts the concept of transfer group by means of which the user can sort his transfers into categories. By definition, we want each TransferGroup (transfer group) to be a JobQueue. Moreover this class calculates information such as:
- the size obtained by the sum of all the transfer's size
- the size obtained by the sum of all the transfer's processed size
- the global progress percentage within the group
- the global speed within the group
Definition at line 40 of file transfergroup.h.
Member Typedef Documentation
| typedef int TransferGroup::ChangesFlags |
Definition at line 56 of file transfergroup.h.
Member Enumeration Documentation
Definition at line 43 of file transfergroup.h.
Constructor & Destructor Documentation
| TransferGroup::TransferGroup | ( | TransferTreeModel * | model, | |
| Scheduler * | scheduler, | |||
| const QString & | name = QString() | |||
| ) |
Definition at line 28 of file transfergroup.cpp.
| TransferGroup::~TransferGroup | ( | ) | [virtual] |
Definition at line 40 of file transfergroup.cpp.
Member Function Documentation
| void TransferGroup::append | ( | Transfer * | transfer | ) |
Appends a new transfer to the list of the transfers.
- Parameters:
-
transfer the transfer to append
Definition at line 88 of file transfergroup.cpp.
| void TransferGroup::calculateDownloadLimit | ( | ) |
| void TransferGroup::calculateSpeedLimits | ( | ) |
| void TransferGroup::calculateUploadLimit | ( | ) |
| QString TransferGroup::defaultFolder | ( | ) | [inline] |
| int TransferGroup::downloadedSize | ( | ) | const [inline] |
- Returns:
- the sum of the downloaded sizes of the transfers belonging to this group
Definition at line 153 of file transfergroup.h.
| int TransferGroup::downloadLimit | ( | Transfer::SpeedLimit | limit | ) | const |
| int TransferGroup::downloadSpeed | ( | ) |
- Returns:
- the sum of the download speeds of the running transfers belonging this group
Definition at line 45 of file transfergroup.cpp.
| Transfer * TransferGroup::findTransfer | ( | const KUrl & | src | ) |
Finds the first transfer with source src.
- Parameters:
-
src the url of the source location
- Returns:
- the transfer pointer if the transfer has been found. Otherwise it returns 0
Definition at line 147 of file transfergroup.cpp.
| Transfer * TransferGroup::findTransferByDestination | ( | const KUrl & | dest | ) |
Finds the first transfer with destination dest.
- Parameters:
-
dest the url of the destination location
- Returns:
- the transfer pointer if the transfer has been found, else return 0
Definition at line 161 of file transfergroup.cpp.
| TransferGroupHandler * TransferGroup::handler | ( | ) | const |
inserts a transfer to the current group after the given transfer
- Parameters:
-
transfer The transfer to add in the current Group after The transfer after which to add the transfer
Definition at line 112 of file transfergroup.cpp.
| void TransferGroup::load | ( | const QDomElement & | e | ) |
Adds all the groups in the given QDomNode * to the group.
- Parameters:
-
n The QDomNode where the group will look for the transfers to add
Definition at line 351 of file transfergroup.cpp.
| TransferTreeModel* TransferGroup::model | ( | ) | [inline] |
Moves a transfer in the list.
- Parameters:
-
transfer The transfer to move. Note that this transfer can belong to other groups. In this situation this transfer is deleted from the previous group and moved inside this one. after The transfer after which we have to move the given one
Definition at line 129 of file transfergroup.cpp.
| const QString& TransferGroup::name | ( | ) | [inline] |
| Transfer * TransferGroup::operator[] | ( | int | i | ) | const |
- Returns:
- the Job in the queue at the given index i
Reimplemented from JobQueue.
Definition at line 175 of file transfergroup.cpp.
| int TransferGroup::percent | ( | ) | const [inline] |
| QPixmap TransferGroup::pixmap | ( | ) | [inline] |
| void TransferGroup::prepend | ( | Transfer * | transfer | ) |
Prepends a new transfer to the list of the transfers.
- Parameters:
-
transfer the transfer to prepend
Definition at line 104 of file transfergroup.cpp.
| void TransferGroup::remove | ( | Transfer * | transfer | ) |
Removes the given transfer from the list of the transfers.
- Parameters:
-
transfer the transfer to remove
Definition at line 120 of file transfergroup.cpp.
| void TransferGroup::save | ( | QDomElement | e | ) |
Saves this group object to the given QDomNode.
- Parameters:
-
n The QDomNode where the group will be saved
Definition at line 328 of file transfergroup.cpp.
| void TransferGroup::setDefaultFolder | ( | QString | folder | ) | [inline] |
Set a default Folder for the group.
- Parameters:
-
folder the new default folder
Definition at line 182 of file transfergroup.h.
| void TransferGroup::setDownloadLimit | ( | int | dlLimit, | |
| Transfer::SpeedLimit | limit | |||
| ) |
Set a Download-Limit for the group.
- Parameters:
-
limit the new download-limit
- Note:
- if limit is 0, no download-limit is set
Definition at line 199 of file transfergroup.cpp.
| void TransferGroup::setIconName | ( | QString | name | ) | [inline] |
Set the group's icon.
- Parameters:
-
name the icon's name
Definition at line 222 of file transfergroup.h.
| void TransferGroup::setName | ( | const QString & | name | ) | [inline] |
| void TransferGroup::setStatus | ( | Status | queueStatus | ) | [virtual] |
This function is reimplemented by JobQueue::setStatus.
- Parameters:
-
queueStatus the new JobQueue status
Reimplemented from JobQueue.
Definition at line 81 of file transfergroup.cpp.
| void TransferGroup::setUploadLimit | ( | int | ulLimit, | |
| Transfer::SpeedLimit | limit | |||
| ) |
Set a Upload-Limit for the group.
- Parameters:
-
limit the new upload-limit
- Note:
- if limit is 0, no upload-limit is set
Definition at line 187 of file transfergroup.cpp.
| bool TransferGroup::supportsSpeedLimits | ( | ) |
| int TransferGroup::totalSize | ( | ) | const [inline] |
- Returns:
- the sum of the sizes of the transfers belonging to this group
Definition at line 147 of file transfergroup.h.
| void TransferGroup::transferChangedEvent | ( | Transfer * | transfer | ) |
Notifies that the given transfer has changed.
- Parameters:
-
transfer The transfer that has changed
Definition at line 320 of file transfergroup.cpp.
| int TransferGroup::uploadedSize | ( | ) | const [inline] |
- Returns:
- the sum of the uploaded sizes of the transfers belonging to this group
Definition at line 159 of file transfergroup.h.
| int TransferGroup::uploadLimit | ( | Transfer::SpeedLimit | limit | ) | const |
| int TransferGroup::uploadSpeed | ( | ) |
- Returns:
- the sum of the download speeds of the running transfers belonging this group
Definition at line 57 of file transfergroup.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference