• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

KGet Class Reference

#include <kget.h>

List of all members.


Detailed Description

Definition at line 58 of file kget.h.


Static Public Member Functions

static KGet & self (MainWindow *mainWindow=0)
static void addObserver (ModelObserver *observer)
static void delObserver (ModelObserver *observer)
static bool addGroup (const QString &groupName)
static void delGroup (const QString &groupName)
static void renameGroup (const QString &oldName, const QString &newName)
static QStringList transferGroupNames ()
static void addTransfer (KUrl srcUrl, QString destDir=QString(), const QString &groupName=QString(), bool start=false)
static void addTransfer (const QDomElement &e, const QString &groupName=QString())
static void addTransfer (KUrl::List srcUrls, QString destDir=QString(), const QString &groupName=QString(), bool start=false)
static void delTransfer (TransferHandler *transfer)
static void moveTransfer (TransferHandler *transfer, const QString &groupName)
static QList< TransferHandler * > selectedTransfers ()
static QList
< TransferGroupHandler * > 
selectedTransferGroups ()
static TransferTreeSelectionModel * selectionModel ()
static void load (QString filename=QString())
static void save (QString filename=QString())
static TransferFactory * factory (TransferHandler *transfer)
static KActionCollection * actionCollection ()
static void setSchedulerRunning (bool running=true)
static bool schedulerRunning ()
static void addTransferView (QAbstractItemView *view)
static void setPluginsSettingsWidget (KTabWidget *widget)
static QList< TransferHandler * > allTransfers ()
static void checkSystemTray ()

Friends

class NewTransferDialog
class TransferFinishedObserver

Member Function Documentation

KGet & KGet::self ( MainWindow *  mainWindow = 0  )  [static]

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 54 of file kget.cpp.

void KGet::addObserver ( ModelObserver *  observer  )  [static]

Adds a new observer of the KGet.

See observer.h for more info about it.

Parameters:
observer The new observer

Definition at line 65 of file kget.cpp.

void KGet::delObserver ( ModelObserver *  observer  )  [static]

Removes an observer of the KGet.

See observer.h for more info about it.

Parameters:
observer The observer to remove

Definition at line 83 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 88 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 105 of file kget.cpp.

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 117 of file kget.cpp.

QStringList KGet::transferGroupNames (  )  [static]

Returns:
the name of the available transfers groups

Definition at line 127 of file kget.cpp.

void KGet::addTransfer ( KUrl  srcUrl,
QString  destDir = QString(),
const QString &  groupName = QString(),
bool  start = false 
) [static]

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 138 of file kget.cpp.

void KGet::addTransfer ( const QDomElement &  e,
const QString &  groupName = QString() 
) [static]

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 187 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 205 of file kget.cpp.

void KGet::delTransfer ( TransferHandler *  transfer  )  [static]

Removes a transfer from the KGet.

Parameters:
transfer The transfer to be removed

Definition at line 263 of file kget.cpp.

void KGet::moveTransfer ( TransferHandler *  transfer,
const QString &  groupName 
) [static]

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 287 of file kget.cpp.

QList< TransferHandler * > KGet::selectedTransfers (  )  [static]

Returns:
the list of selected transfers

Definition at line 293 of file kget.cpp.

QList< TransferGroupHandler * > KGet::selectedTransferGroups (  )  [static]

Returns:
the list of selected groups

Definition at line 330 of file kget.cpp.

TransferTreeSelectionModel * KGet::selectionModel (  )  [static]

Returns:
a pointer to the QItemSelectionModel object

Definition at line 345 of file kget.cpp.

void KGet::load ( QString  filename = QString()  )  [static]

Imports the transfers and groups included in the provided xml file.

Parameters:
filename the file name to

Definition at line 355 of file kget.cpp.

void KGet::save ( QString  filename = QString()  )  [static]

Exports all the transfers and groups to the given file.

Parameters:
filename the file name

Definition at line 415 of file kget.cpp.

TransferFactory * KGet::factory ( TransferHandler *  transfer  )  [static]

Returns:
The factory of a given transfer

Parameters:
transfer the transfer about which we want to have the factory

Definition at line 457 of file kget.cpp.

KActionCollection * KGet::actionCollection (  )  [static]

Returns:
a pointer to the KActionCollection objects

Definition at line 462 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 467 of file kget.cpp.

bool KGet::schedulerRunning (  )  [static]

Returns true if the scheduler has running jobs.

Definition at line 478 of file kget.cpp.

void KGet::addTransferView ( QAbstractItemView *  view  )  [static]

Sets the given view to the TransferTreeModel object.

Definition at line 350 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 483 of file kget.cpp.

QList< TransferHandler * > KGet::allTransfers (  )  [static]

Gets all transfers which are running.

Definition at line 502 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 514 of file kget.cpp.


Friends And Related Function Documentation

friend class NewTransferDialog [friend]

Definition at line 60 of file kget.h.

friend class TransferFinishedObserver [friend]

Definition at line 61 of file kget.h.


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

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal