6.106. sibl_gui.components.addons.onlineUpdater.downloadManager

downloadManager.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines the DownloadManager class.

Others:

6.106.1. Module Attributes

sibl_gui.components.addons.onlineUpdater.downloadManager.LOGGER
sibl_gui.components.addons.onlineUpdater.downloadManager.UI_FILE

6.106.2. Classes

class sibl_gui.components.addons.onlineUpdater.downloadManager.DownloadManager(parent, networkAccessManager, downloadDirectory, requests=None, *args, **kwargs)[source]

Bases: foundations.ui.common.QWidget

Defines the Application download manager.
Once initialized with a QNetworkAccessManager instance, a download directory and a list of requests ( List of online resources / files ), this class can proceed of the download of those requests using the DownloadManager.startDownload() method.

Initializes the class.

Parameters:
  • parent (QObject) – Object parent.
  • networkAccessManager (QNetworkAccessManager) – Network access manager.
  • downloadDirectory (unicode) – Download directory.
  • requests (list) – Download requests.
  • *args (*) – Arguments.
  • **kwargs (**) – Keywords arguments.
downloadFinished

This signal is emited by the DownloadManager class when a download is finished. ( pyqtSignal )

container[source]

Property for self.__container attribute.

Returns:self.__container.
Return type:QObject
networkAccessManager[source]

Property for self.__networkAccessManager attribute.

Returns:self.__networkAccessManager.
Return type:QNetworkAccessManager
downloadDirectory[source]

Property for self.__downloadDirectory attribute.

Returns:self.__downloadDirectory.
Return type:unicode
uiResourcesDirectory[source]

Property for self.__uiResourcesDirectory attribute.

Returns:self.__uiResourcesDirectory.
Return type:unicode
uiLogoImage[source]

Property for self.__uiLogoImage attribute.

Returns:self.__uiLogoImage.
Return type:unicode
requests[source]

Property for self.__requests attribute.

Returns:self.__requests.
Return type:list
downloads[source]

Property for self.__downloads attribute.

Returns:self.__downloads.
Return type:dict
currentRequest[source]

Property for self.__currentRequest attribute.

Returns:self.__currentRequest.
Return type:QNetworkReply
currentFile[source]

Property for self.__currentFile attribute.

Returns:self.__currentFile.
Return type:QFile
currentFilePath[source]

Property for self.__currentFilePath attribute.

Returns:self.__currentFilePath.
Return type:unicode
downloadStatus[source]

Property for self.__downloadStatus attribute.

Returns:self.__downloadStatus.
Return type:QObject
closeEvent(event)[source]

Reimplements the QWidget.closeEvent() method.

Parameters:event (QEvent) – QEvent.
startDownload()[source]

Triggers the download.

Returns:Method success.
Return type:bool
abortDownload()[source]

Aborts the current download.

Returns:Method success.
Return type:bool