--- a/src/eric7/WebBrowser/WebBrowserTabWidget.py Fri Dec 22 13:57:47 2023 +0100 +++ b/src/eric7/WebBrowser/WebBrowserTabWidget.py Fri Dec 22 17:24:07 2023 +0100 @@ -57,7 +57,8 @@ """ Constructor - @param parent reference to the parent widget (QWidget) + @param parent reference to the parent widget + @type QWidget """ super().__init__(parent, dnd=True) @@ -227,8 +228,10 @@ """ Private slot to show the tab context menu. - @param coord the position of the mouse pointer (QPoint) - @param index index of the tab the menu is requested for (integer) + @param coord the position of the mouse pointer + @type QPoint + @param index index of the tab the menu is requested for + @type int """ coord = self.mapToGlobal(coord) if index == -1: @@ -473,10 +476,12 @@ """ Public method to create a new web browser tab after a given one. - @param browser reference to the browser to add after (WebBrowserView) - @param link link to be shown (string or QUrl) - @param background flag indicating to open the tab in the - background (bool) + @param browser reference to the browser to add after + @type WebBrowserView + @param link link to be shown + @type str or QUrl + @param background flag indicating to open the tab in the background + @type bool @return reference to the new browser @rtype WebBrowserView """ @@ -498,7 +503,8 @@ """ Private slot called to handle the navigation button menu selection. - @param act reference to the selected action (QAction) + @param act reference to the selected action + @type QAction """ index = act.data() if index is not None: @@ -589,7 +595,8 @@ """ Public method to get a reference to the current browser. - @return reference to the current browser (WebBrowserView) + @return reference to the current browser + @rtype WebBrowserView """ return self.currentWidget() @@ -597,8 +604,10 @@ """ Public method to get a reference to the browser with the given index. - @param index index of the browser to get (integer) - @return reference to the indexed browser (WebBrowserView) + @param index index of the browser to get + @type int + @return reference to the indexed browser + @rtype WebBrowserView """ return self.widget(index) @@ -606,7 +615,8 @@ """ Public method to get a list of references to all browsers. - @return list of references to browsers (list of WebBrowserView) + @return list of references to browsers + @rtype list of WebBrowserView """ li = [] for index in range(self.count()): @@ -618,7 +628,8 @@ """ Public slot called to print the displayed page. - @param browser reference to the browser to be printed (WebBrowserView) + @param browser reference to the browser to be printed + @type WebBrowserView """ if browser is None: browser = self.currentBrowser() @@ -631,7 +642,8 @@ """ Public slot called to print the displayed page to PDF. - @param browser reference to the browser to be printed (HelpBrowser) + @param browser reference to the browser to be printed + @type WebBrowserView """ if browser is None: browser = self.currentBrowser() @@ -644,7 +656,8 @@ """ Public slot called to show a print preview of the displayed file. - @param browser reference to the browser to be printed (WebBrowserView) + @param browser reference to the browser to be printed + @type WebBrowserView """ if browser is None: browser = self.currentBrowser() @@ -688,10 +701,14 @@ """ Private method to elide some text. - @param txt text to be elided (string) - @param mode elide mode (Qt.TextElideMode) - @param length amount of characters to be used (integer) - @return the elided text (string) + @param txt text to be elided + @type str + @param mode elide mode + @type Qt.TextElideMode + @param length amount of characters to be used + @type int + @return the elided text + @rtype str """ if mode == Qt.TextElideMode.ElideNone or len(txt) < length: return txt @@ -776,6 +793,7 @@ Public method to get a list of all opened Qt help files. @return dictionary with tab id as key and host/namespace as value + @rtype dict """ sourceList = {} for i in range(self.count()): @@ -789,7 +807,8 @@ """ Public method to check, if the application should be shut down. - @return flag indicating a shut down (boolean) + @return flag indicating a shut down + @rtype bool """ if self.count() > 1 and Preferences.getWebBrowser("WarnOnMultipleClose"): mb = EricMessageBox.EricMessageBox( @@ -825,7 +844,8 @@ """ Public method to get a reference to the stacked url bar. - @return reference to the stacked url bar (StackedUrlBar) + @return reference to the stacked url bar + @rtype StackedUrlBar """ return self.__stackedUrlBar @@ -833,7 +853,8 @@ """ Public method to get a reference to the current url bar. - @return reference to the current url bar (UrlBar) + @return reference to the current url bar + @rtype UrlBar """ return self.__stackedUrlBar.currentWidget() @@ -871,7 +892,8 @@ """ Private slot called when a URL is selected from the completer. - @param path path to be shown (string) + @param path path to be shown + @type str """ url = self.__guessUrlFromPath(path) self.currentBrowser().setSource(url) @@ -880,8 +902,10 @@ """ Private method to guess an URL given a path string. - @param path path string to guess an URL for (string) - @return guessed URL (QUrl) + @param path path string to guess an URL for + @type str + @return guessed URL + @rtype QUrl """ manager = self.__mainWindow.openSearchManager() path = FileSystemUtilities.fromNativeSeparators(path) @@ -912,7 +936,8 @@ """ Private slot to handle an index change. - @param index new index (integer) + @param index new index + @type int """ self.__stackedUrlBar.setCurrentIndex(index) @@ -941,7 +966,8 @@ """ Public method to check, if closed tabs can be restored. - @return flag indicating that closed tabs can be restored (boolean) + @return flag indicating that closed tabs can be restored + @rtype bool """ return self.__closedTabsManager.isClosedTabAvailable() @@ -987,7 +1013,8 @@ """ Public slot to get a reference to the closed tabs manager. - @return reference to the closed tabs manager (ClosedTabsManager) + @return reference to the closed tabs manager + @rtype ClosedTabsManager """ return self.__closedTabsManager @@ -995,7 +1022,8 @@ """ Private slot to handle changes of the availability of closed tabs. - @param avail flag indicating the availability of closed tabs (boolean) + @param avail flag indicating the availability of closed tabs + @type bool """ self.__closedTabsButton.setEnabled(avail) self.__restoreClosedTabAct.setEnabled(avail)