WebBrowser/WebBrowserTabWidget.py

changeset 6221
35ec993034e1
parent 6122
e7d98249f393
child 6625
a67fee7bc09c
equal deleted inserted replaced
6220:dd4a8b507144 6221:35ec993034e1
557 @param shutdown flag indicating a shutdown action 557 @param shutdown flag indicating a shutdown action
558 @type bool 558 @type bool
559 """ 559 """
560 for index in range(self.count() - 1, -1, -1): 560 for index in range(self.count() - 1, -1, -1):
561 self.closeBrowserAt(index, shutdown=shutdown) 561 self.closeBrowserAt(index, shutdown=shutdown)
562
563 def closeBrowserView(self, browser):
564 """
565 Public method to close the given browser.
566
567 @param browser reference to the web browser view to be closed
568 @type WebBrowserView
569 """
570 index = self.indexOf(browser)
571 self.closeBrowserAt(index)
562 572
563 def closeBrowserAt(self, index, shutdown=False): 573 def closeBrowserAt(self, index, shutdown=False):
564 """ 574 """
565 Public slot to close a browser based on its index. 575 Public slot to close a browser based on its index.
566 576
1048 1058
1049 @return reference to the current url bar (UrlBar) 1059 @return reference to the current url bar (UrlBar)
1050 """ 1060 """
1051 return self.__stackedUrlBar.currentWidget() 1061 return self.__stackedUrlBar.currentWidget()
1052 1062
1063 def urlBarForView(self, view):
1064 """
1065 Public method to get a reference to the UrlBar associated with the
1066 given view.
1067
1068 @param view reference to the view to get the urlbar for
1069 @type WebBrowserView
1070 @return reference to the associated urlbar
1071 @rtype UrlBar
1072 """
1073 for urlbar in self.__stackedUrlBar.urlBars():
1074 if urlbar.browser() is view:
1075 return urlbar
1076
1077 return None
1078
1053 def __lineEditReturnPressed(self, edit): 1079 def __lineEditReturnPressed(self, edit):
1054 """ 1080 """
1055 Private slot to handle the entering of an URL. 1081 Private slot to handle the entering of an URL.
1056 1082
1057 @param edit reference to the line edit 1083 @param edit reference to the line edit

eric ide

mercurial