kget
KGet Class Reference
#include <kget.h>
List of all members.
Detailed Description
This is our
KGet class.
This is where the user's transfers and searches are stored and organized. Use this class from the views to add or remove transfers or searches In order to organize the transfers inside categories we have a TransferGroup class. By definition, a transfer must always belong to a TransferGroup. If we don't want it to be displayed by the gui inside a specific group, we will put it in the group named "Not grouped" (better name?).
Definition at line 56 of file kget.h.
|
Static Public Member Functions |
| static KActionCollection * | actionCollection () |
| static bool | addGroup (const QString &groupName) |
| static void | addObserver (ModelObserver *observer) |
| static void | addTransfer (KUrl::List srcUrls, QString destDir=QString(), const QString &groupName=QString(), bool start=false) |
| static void | addTransfer (const QDomElement &e, const QString &groupName=QString()) |
| static void | addTransfer (KUrl srcUrl, QString destDir=QString(), const QString &groupName=QString(), bool start=false) |
| static void | addTransferView (QAbstractItemView *view) |
static QList
< TransferGroupHandler * > | allTransferGroups () |
| static QList< TransferHandler * > | allTransfers () |
| static void | calculateGlobalDownloadLimit () |
| static void | calculateGlobalSpeedLimits () |
| static void | calculateGlobalUploadLimit () |
| static void | checkSystemTray () |
| static TransferDataSource * | createTransferDataSource (const KUrl &src) |
| static QStringList | defaultFolders (const KUrl &filename, const QString &groupname) |
| static void | delGroup (const QString &groupName) |
| static void | delObserver (ModelObserver *observer) |
| static bool | delTransfer (TransferHandler *transfer) |
| static TransferFactory * | factory (TransferHandler *transfer) |
| static TransferHandler * | findTransfer (const KUrl &src) |
| static QList< TransferHandler * > | finishedTransfers () |
| static void | load (QString filename=QString()) |
| static void | moveTransfer (TransferHandler *transfer, const QString &groupName) |
| static void | redownloadTransfer (TransferHandler *transfer) |
| static void | registerKJob (KJob *) |
| static void | reloadKJobs () |
| static void | renameGroup (const QString &oldName, const QString &newName) |
| static void | save (QString filename=QString()) |
| static bool | schedulerRunning () |
static QList
< TransferGroupHandler * > | selectedTransferGroups () |
| static QList< TransferHandler * > | selectedTransfers () |
| static TransferTreeSelectionModel * | selectionModel () |
| static KGet & | self (MainWindow *mainWindow=0) |
| static void | setGlobalDownloadLimit (int limit) |
| static void | setGlobalUploadLimit (int limit) |
| static void | setPluginsSettingsWidget (KTabWidget *widget) |
| static void | setSchedulerRunning (bool running=true) |
| static void | settingsChanged () |
| static QStringList | transferGroupNames () |
| static void | unregisterKJob (KJob *) |
Member Function Documentation
| KActionCollection * KGet::actionCollection |
( |
|
) |
[static] |
- Returns:
- a pointer to the KActionCollection objects
Definition at line 486 of file kget.cpp.
| bool KGet::addGroup |
( |
const QString & |
groupName |
) |
[static] |
Adds a new group to the KGet.
- Parameters:
-
| groupName | The name of the new group |
- Returns:
- true if the group has been successully added, otherwise it returns false, probably because a group with that named already exists
Definition at line 91 of file kget.cpp.
Adds a new observer of the KGet.
See observer.h for more info about it.
- Parameters:
-
| observer | The new observer |
Definition at line 68 of file kget.cpp.
| void KGet::addTransfer |
( |
KUrl::List |
srcUrls, |
|
|
QString |
destDir = QString(), |
|
|
const QString & |
groupName = QString(), |
|
|
bool |
start = false | |
|
) |
| | [static] |
Adds new transfers to the KGet.
- Parameters:
-
| srcUrls | The urls to be downloaded |
| destDir | The destination directory. If empty we show a dialog where the user can choose it. |
| groupName | The name of the group the new transfer will belong to |
| start | Specifies if the newly added transfers should be started. If the group queue is already in a running state, this flag does nothing |
Definition at line 209 of file kget.cpp.
Adds a new transfer to the KGet.
- Parameters:
-
| e | The transfer's dom element |
| groupName | The name of the group the new transfer will belong to |
Definition at line 191 of file kget.cpp.
Adds a new transfer to the KGet.
- Parameters:
-
| srcUrl | The url to be downloaded |
| destDir | The destination directory. If empty we show a dialog where the user can choose it. |
| groupName | The name of the group the new transfer will belong to |
| start | Specifies if the newly added transfers should be started. If the group queue is already in a running state, this flag does nothing |
Definition at line 142 of file kget.cpp.
Gets all transfer-groups.
Definition at line 537 of file kget.cpp.
Gets all transfers.
Definition at line 526 of file kget.cpp.
| void KGet::calculateGlobalDownloadLimit |
( |
|
) |
[static] |
Recalculates the global download-limit.
Definition at line 654 of file kget.cpp.
| void KGet::calculateGlobalSpeedLimits |
( |
|
) |
[static] |
Recalculates the global speedlimits.
Definition at line 646 of file kget.cpp.
| void KGet::calculateGlobalUploadLimit |
( |
|
) |
[static] |
Recalculates the global upload-limit.
Definition at line 659 of file kget.cpp.
| void KGet::checkSystemTray |
( |
|
) |
[static] |
Run this function for enabling the systemTray (will be automatically done, if there is download running).
Definition at line 553 of file kget.cpp.
Scans for all the available plugins and creates the proper transfer DataSource object for transfers Containers.
- Parameters:
-
Definition at line 730 of file kget.cpp.
| QStringList KGet::defaultFolders |
( |
const KUrl & |
filename, |
|
|
const QString & |
groupname | |
|
) |
| | [static] |
- Returns:
- a list of the defaultFolders for a transfer
Definition at line 598 of file kget.cpp.
| void KGet::delGroup |
( |
const QString & |
groupName |
) |
[static] |
Removes a group from the KGet.
- Parameters:
-
| groupName | The name of the group to be deleted |
Definition at line 109 of file kget.cpp.
Removes an observer of the KGet.
See observer.h for more info about it.
- Parameters:
-
| observer | The observer to remove |
Definition at line 86 of file kget.cpp.
Removes a transfer from the KGet.
- Parameters:
-
| transfer | The transfer to be removed |
Definition at line 267 of file kget.cpp.
- Returns:
- The factory of a given transfer
- Parameters:
-
| transfer | the transfer about which we want to have the factory |
Definition at line 481 of file kget.cpp.
Get the transfer with the given url.
- Parameters:
-
Definition at line 548 of file kget.cpp.
- Returns:
- the list of the finished transfers
Definition at line 341 of file kget.cpp.
Imports the transfers and groups included in the provided xml file.
- Parameters:
-
| filename | the file name to |
Definition at line 379 of file kget.cpp.
Moves a transfer to a new group.
- Parameters:
-
| transfer | The transfer to be moved |
| groupName | The name of the new transfer's group |
Definition at line 285 of file kget.cpp.
Redownload a transfer.
- Parameters:
-
| transfer | the transfer to redownload |
Definition at line 291 of file kget.cpp.
| void KGet::registerKJob |
( |
KJob * |
job |
) |
[static] |
Returns the kget kuiserver jobs manager.
Definition at line 583 of file kget.cpp.
| void KGet::reloadKJobs |
( |
|
) |
[static] |
| void KGet::renameGroup |
( |
const QString & |
oldName, |
|
|
const QString & |
newName | |
|
) |
| | [static] |
Changes the name of the group.
- Parameters:
-
| oldName | the name of the group to be changed |
| newName | the new name of the group |
Definition at line 121 of file kget.cpp.
Exports all the transfers and groups to the given file.
- Parameters:
-
Definition at line 439 of file kget.cpp.
| bool KGet::schedulerRunning |
( |
|
) |
[static] |
Returns true if the scheduler has running jobs.
Definition at line 502 of file kget.cpp.
- Returns:
- the list of selected groups
Definition at line 354 of file kget.cpp.
- Returns:
- the list of selected transfers
Definition at line 304 of file kget.cpp.
This is our KGet class.
This is where the user's transfers and searches are stored and organized. Use this class from the views to add or remove transfers or searches In order to organize the transfers inside categories we have a TransferGroup class. By definition, a transfer must always belong to a TransferGroup. If we don't want it to be displayed by the gui inside a specific group, we will put it in the group named "Not grouped" (better name?).
Definition at line 57 of file kget.cpp.
| void KGet::setGlobalDownloadLimit |
( |
int |
limit |
) |
[static] |
Sets the global download limit.
- Parameters:
-
| limit | the new global download limit |
Definition at line 632 of file kget.cpp.
| void KGet::setGlobalUploadLimit |
( |
int |
limit |
) |
[static] |
Sets the global upload limit.
- Parameters:
-
| limit | the new global upload limit |
Definition at line 639 of file kget.cpp.
| void KGet::setPluginsSettingsWidget |
( |
KTabWidget * |
widget |
) |
[static] |
Adds a Settings tab for every plugins that needs one to the KTabWidget.
Definition at line 507 of file kget.cpp.
| void KGet::setSchedulerRunning |
( |
bool |
running = true |
) |
[static] |
if running == true starts the scheduler if running == false stops the scheduler
Definition at line 491 of file kget.cpp.
| void KGet::settingsChanged |
( |
|
) |
[static] |
This will be called when the settings have been changed.
Definition at line 570 of file kget.cpp.
- Returns:
- the name of the available transfers groups
Definition at line 131 of file kget.cpp.
| void KGet::unregisterKJob |
( |
KJob * |
job |
) |
[static] |
The documentation for this class was generated from the following files: