Helpviewer/HelpBrowserWV.py

changeset 2954
bf0215fe12d1
parent 2585
242d6d991ca1
child 2999
28c75409a78f
equal deleted inserted replaced
2953:703452a2876f 2954:bf0215fe12d1
499 return self.__sslConfiguration 499 return self.__sslConfiguration
500 500
501 def showSslInfo(self, pos): 501 def showSslInfo(self, pos):
502 """ 502 """
503 Public slot to show some SSL information for the loaded page. 503 Public slot to show some SSL information for the loaded page.
504
505 @param pos position to show the info at (QPoint)
504 """ 506 """
505 if SSL_AVAILABLE and self.__sslConfiguration is not None: 507 if SSL_AVAILABLE and self.__sslConfiguration is not None:
506 from E5Network.E5SslInfoWidget import E5SslInfoWidget 508 from E5Network.E5SslInfoWidget import E5SslInfoWidget
507 widget = E5SslInfoWidget(self.mainFrame().url(), self.__sslConfiguration, 509 widget = E5SslInfoWidget(self.mainFrame().url(), self.__sslConfiguration,
508 self.view()) 510 self.view())
1775 return self.__isLoading 1777 return self.__isLoading
1776 1778
1777 def progress(self): 1779 def progress(self):
1778 """ 1780 """
1779 Public method to get the load progress. 1781 Public method to get the load progress.
1782
1783 @return load progress (integer)
1780 """ 1784 """
1781 return self.__progress 1785 return self.__progress
1782 1786
1783 def saveAs(self): 1787 def saveAs(self):
1784 """ 1788 """
2083 point.setX(point.x() - label.width() // 2) 2087 point.setX(point.x() - label.width() // 2)
2084 label.move(point) 2088 label.move(point)
2085 self.__accessKeyLabels.append(label) 2089 self.__accessKeyLabels.append(label)
2086 self.__accessKeyNodes[accessKey] = element 2090 self.__accessKeyNodes[accessKey] = element
2087 2091
2088 ############################################################################ 2092 ###########################################################################
2089 ## Miscellaneous methods below 2093 ## Miscellaneous methods below
2090 ############################################################################ 2094 ###########################################################################
2091 2095
2092 def createWindow(self, windowType): 2096 def createWindow(self, windowType):
2093 """ 2097 """
2094 Protected method called, when a new window should be created. 2098 Protected method called, when a new window should be created.
2095 2099
2096 @param windowType type of the requested window (QWebPage.WebWindowType) 2100 @param windowType type of the requested window (QWebPage.WebWindowType)
2101 @return reference to the created browser window (HelpBrowser)
2097 """ 2102 """
2098 self.mw.newTab() 2103 self.mw.newTab()
2099 return self.mw.currentBrowser() 2104 return self.mw.currentBrowser()
2100 2105
2101 def preferencesChanged(self): 2106 def preferencesChanged(self):
2106 if not self.__enableAccessKeys: 2111 if not self.__enableAccessKeys:
2107 self.__hideAccessKeys() 2112 self.__hideAccessKeys()
2108 2113
2109 self.reload() 2114 self.reload()
2110 2115
2111 ############################################################################ 2116 ###########################################################################
2112 ## RSS related methods below 2117 ## RSS related methods below
2113 ############################################################################ 2118 ###########################################################################
2114 2119
2115 def checkRSS(self): 2120 def checkRSS(self):
2116 """ 2121 """
2117 Public method to check, if the loaded page contains feed links. 2122 Public method to check, if the loaded page contains feed links.
2118 2123
2303 2308
2304 def contentSniff(data): 2309 def contentSniff(data):
2305 """ 2310 """
2306 Module function to do some content sniffing to check, if the data is HTML. 2311 Module function to do some content sniffing to check, if the data is HTML.
2307 2312
2313 @param data data block to sniff at (string)
2308 @return flag indicating HTML content (boolean) 2314 @return flag indicating HTML content (boolean)
2309 """ 2315 """
2310 if data.contains("<!doctype") or \ 2316 if data.contains("<!doctype") or \
2311 data.contains("<script") or \ 2317 data.contains("<script") or \
2312 data.contains("<html") or \ 2318 data.contains("<html") or \

eric ide

mercurial