35 |
35 |
36 def __init__(self, parent=None): |
36 def __init__(self, parent=None): |
37 """ |
37 """ |
38 Constructor |
38 Constructor |
39 |
39 |
40 @param parent reference to the parent object (QObject) |
40 @param parent reference to the parent object |
|
41 @type QObject |
41 """ |
42 """ |
42 super().__init__() |
43 super().__init__() |
43 |
44 |
44 self.__closedTabs = [] |
45 self.__closedTabs = [] |
45 |
46 |
46 def recordBrowser(self, browser, position): |
47 def recordBrowser(self, browser, position): |
47 """ |
48 """ |
48 Public method to record the data of a browser about to be closed. |
49 Public method to record the data of a browser about to be closed. |
49 |
50 |
50 @param browser reference to the browser to be closed (HelpBrowser) |
51 @param browser reference to the browser to be closed |
51 @param position index of the tab to be closed (integer) |
52 @type WebBrowserView |
|
53 @param position index of the tab to be closed |
|
54 @type int |
52 """ |
55 """ |
53 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
56 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
54 |
57 |
55 if WebBrowserWindow.isPrivate(): |
58 if WebBrowserWindow.isPrivate(): |
56 return |
59 return |
64 |
67 |
65 def getClosedTabAt(self, index): |
68 def getClosedTabAt(self, index): |
66 """ |
69 """ |
67 Public method to get the indexed closed tab. |
70 Public method to get the indexed closed tab. |
68 |
71 |
69 @param index index of the tab to return (integer) |
72 @param index index of the tab to return |
70 @return requested tab (ClosedTab) |
73 @type int |
|
74 @return requested tab |
|
75 @rtype ClosedTab |
71 """ |
76 """ |
72 tab = ( |
77 tab = ( |
73 self.__closedTabs.pop(index) |
78 self.__closedTabs.pop(index) |
74 if (len(self.__closedTabs) > 0 and len(self.__closedTabs) > index) |
79 if (len(self.__closedTabs) > 0 and len(self.__closedTabs) > index) |
75 else ClosedTab() |
80 else ClosedTab() |