Helpviewer/HelpBrowserWV.py

changeset 3591
2f2a4a76dd22
parent 3539
0c2dc1446ebf
child 3621
15f23ed3f216
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
185 self.__adBlockedEntries = [] 185 self.__adBlockedEntries = []
186 self.loadStarted.connect(self.__loadStarted) 186 self.loadStarted.connect(self.__loadStarted)
187 187
188 def acceptNavigationRequest(self, frame, request, type_): 188 def acceptNavigationRequest(self, frame, request, type_):
189 """ 189 """
190 Protected method to determine, if a request may be accepted. 190 Public method to determine, if a request may be accepted.
191 191
192 @param frame reference to the frame sending the request (QWebFrame) 192 @param frame reference to the frame sending the request (QWebFrame)
193 @param request reference to the request object (QNetworkRequest) 193 @param request reference to the request object (QNetworkRequest)
194 @param type_ type of the navigation request (QWebPage.NavigationType) 194 @param type_ type of the navigation request (QWebPage.NavigationType)
195 @return flag indicating acceptance (boolean) 195 @return flag indicating acceptance (boolean)
443 """ 443 """
444 Preferences.setHelp("UserAgent", agent) 444 Preferences.setHelp("UserAgent", agent)
445 445
446 def userAgentForUrl(self, url): 446 def userAgentForUrl(self, url):
447 """ 447 """
448 Protected method to determine the user agent for the given URL. 448 Public method to determine the user agent for the given URL.
449 449
450 @param url URL to determine user agent for (QUrl) 450 @param url URL to determine user agent for (QUrl)
451 @return user agent string (string) 451 @return user agent string (string)
452 """ 452 """
453 import Helpviewer.HelpWindow 453 import Helpviewer.HelpWindow
584 return True 584 return True
585 585
586 @classmethod 586 @classmethod
587 def webPluginFactory(cls): 587 def webPluginFactory(cls):
588 """ 588 """
589 Class method to get a reference to the web plug-in factory instance. 589 Class method to get a reference to the web plug-in factory
590 instance.
590 591
591 @return reference to the web plug-in factory instance (WebPluginFactory 592 @return reference to the web plug-in factory instance (WebPluginFactory
592 """ 593 """
593 if cls._webPluginFactory is None: 594 if cls._webPluginFactory is None:
594 from .WebPlugins.WebPluginFactory import WebPluginFactory 595 from .WebPlugins.WebPluginFactory import WebPluginFactory
596 597
597 return cls._webPluginFactory 598 return cls._webPluginFactory
598 599
599 def event(self, evt): 600 def event(self, evt):
600 """ 601 """
601 Protected method implementing the event handler. 602 Public method implementing the event handler.
602 603
603 @param evt reference to the event (QEvent) 604 @param evt reference to the event (QEvent)
604 @return flag indicating that the event was handled (boolean) 605 @return flag indicating that the event was handled (boolean)
605 """ 606 """
606 if evt.type() == QEvent.Leave: 607 if evt.type() == QEvent.Leave:
1768 1769
1769 super(HelpBrowser, self).focusOutEvent(evt) 1770 super(HelpBrowser, self).focusOutEvent(evt)
1770 1771
1771 def event(self, evt): 1772 def event(self, evt):
1772 """ 1773 """
1773 Protected method handling events. 1774 Public method handling events.
1774 1775
1775 @param evt reference to the event (QEvent) 1776 @param evt reference to the event (QEvent)
1776 @return flag indicating, if the event was handled (boolean) 1777 @return flag indicating, if the event was handled (boolean)
1777 """ 1778 """
1778 if evt.type() == QEvent.Gesture: 1779 if evt.type() == QEvent.Gesture:
2219 ## Miscellaneous methods below 2220 ## Miscellaneous methods below
2220 ########################################################################### 2221 ###########################################################################
2221 2222
2222 def createWindow(self, windowType): 2223 def createWindow(self, windowType):
2223 """ 2224 """
2224 Protected method called, when a new window should be created. 2225 Public method called, when a new window should be created.
2225 2226
2226 @param windowType type of the requested window (QWebPage.WebWindowType) 2227 @param windowType type of the requested window (QWebPage.WebWindowType)
2227 @return reference to the created browser window (HelpBrowser) 2228 @return reference to the created browser window (HelpBrowser)
2228 """ 2229 """
2229 self.mw.newTab(addNextTo=self) 2230 self.mw.newTab(addNextTo=self)

eric ide

mercurial