src/eric7/WebBrowser/Download/DownloadItem.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
--- a/src/eric7/WebBrowser/Download/DownloadItem.py	Fri Dec 22 13:57:47 2023 +0100
+++ b/src/eric7/WebBrowser/Download/DownloadItem.py	Fri Dec 22 17:24:07 2023 +0100
@@ -262,8 +262,10 @@
         """
         Private method to calculate a name for the file to download.
 
-        @param directory name of the directory to store the file into (string)
-        @return proposed filename and original filename (string, string)
+        @param directory name of the directory to store the file into
+        @type str
+        @return proposed filename and original filename
+        @rtype tuple of (str, str)
         """
         fpath = pathlib.Path(self.__downloadRequest.downloadFileName())
         origName = fpath.name
@@ -359,7 +361,8 @@
         """
         Public method to get the total number of bytes of the download.
 
-        @return total number of bytes (integer)
+        @return total number of bytes
+        @rtype int
         """
         if self.__bytesTotal == -1:
             self.__bytesTotal = self.__downloadRequest.totalBytes()
@@ -369,7 +372,8 @@
         """
         Public method to get the number of bytes received.
 
-        @return number of bytes received (integer)
+        @return number of bytes received
+        @rtype int
         """
         return self.__bytesReceived
 
@@ -377,7 +381,8 @@
         """
         Public method to get an estimation for the remaining time.
 
-        @return estimation for the remaining time (float)
+        @return estimation for the remaining time
+        @rtype float
         """
         if not self.downloading():
             return -1.0
@@ -400,7 +405,8 @@
         """
         Public method to get an estimation for the download speed.
 
-        @return estimation for the download speed (float)
+        @return estimation for the download speed
+        @rtype float
         """
         if not self.downloading():
             return -1.0
@@ -449,7 +455,8 @@
         """
         Public method to determine, if a download is in progress.
 
-        @return flag indicating a download is in progress (boolean)
+        @return flag indicating a download is in progress
+        @rtype bool
         """
         return self.__state == DownloadState.Downloading
 
@@ -457,7 +464,8 @@
         """
         Public method to check for a successful download.
 
-        @return flag indicating a successful download (boolean)
+        @return flag indicating a successful download
+        @rtype bool
         """
         return self.__state == DownloadState.Successful
 
@@ -465,7 +473,8 @@
         """
         Public method to check, if the download was cancelled.
 
-        @return flag indicating a canceled download (boolean)
+        @return flag indicating a canceled download
+        @rtype bool
         """
         return self.__state == DownloadState.Cancelled
 
@@ -503,7 +512,8 @@
         """
         Public method to check, if the user canceled the file selection.
 
-        @return flag indicating cancellation (boolean)
+        @return flag indicating cancellation
+        @rtype bool
         """
         return self.__canceledFileSelect
 
@@ -511,7 +521,8 @@
         """
         Public method to set the download icon.
 
-        @param icon reference to the icon to be set (QIcon)
+        @param icon reference to the icon to be set
+        @type QIcon
         """
         self.fileIcon.setPixmap(icon.pixmap(48, 48))
 
@@ -519,7 +530,8 @@
         """
         Public method to get the name of the output file.
 
-        @return name of the output file (string)
+        @return name of the output file
+        @rtype str
         """
         return self.__fileName
 
@@ -527,7 +539,8 @@
         """
         Public method to get the absolute path of the output file.
 
-        @return absolute path of the output file (string)
+        @return absolute path of the output file
+        @rtype str
         """
         return str(pathlib.Path(self.__fileName).resolve())
 
@@ -607,7 +620,8 @@
         """
         Public method to get the text of the info label.
 
-        @return text of the info label (string)
+        @return text of the info label
+        @rtype str
         """
         return self.infoLabel.text()
 
@@ -615,7 +629,8 @@
         """
         Public method to get the URL of the download page.
 
-        @return URL of the download page (QUrl)
+        @return URL of the download page
+        @rtype QUrl
         """
         return self.__pageUrl
 

eric ide

mercurial