Helpviewer/HelpBrowserWV.py

changeset 634
7b84cbd2f752
parent 629
c88489b378fb
child 638
265c31231d9d
equal deleted inserted replaced
633:4bda1d24b8a7 634:7b84cbd2f752
324 324
325 self.mw = parent 325 self.mw = parent
326 self.ctrlPressed = False 326 self.ctrlPressed = False
327 self.__downloadWindows = [] 327 self.__downloadWindows = []
328 self.__isLoading = False 328 self.__isLoading = False
329 self.__progress = 0
329 330
330 self.__currentZoom = 100 331 self.__currentZoom = 100
331 self.__zoomLevels = [ 332 self.__zoomLevels = [
332 30, 50, 67, 80, 90, 333 30, 50, 67, 80, 90,
333 100, 334 100,
1041 def __loadStarted(self): 1042 def __loadStarted(self):
1042 """ 1043 """
1043 Private method to handle the loadStarted signal. 1044 Private method to handle the loadStarted signal.
1044 """ 1045 """
1045 self.__isLoading = True 1046 self.__isLoading = True
1047 self.__progress = 0
1046 self.mw.setLoading(self) 1048 self.mw.setLoading(self)
1047 self.mw.progressBar().show() 1049 self.mw.progressBar().show()
1048 1050
1049 def __loadProgress(self, progress): 1051 def __loadProgress(self, progress):
1050 """ 1052 """
1051 Private method to handle the loadProgress signal. 1053 Private method to handle the loadProgress signal.
1052 1054
1053 @param progress progress value (integer) 1055 @param progress progress value (integer)
1054 """ 1056 """
1057 self.__progress = progress
1055 self.mw.progressBar().setValue(progress) 1058 self.mw.progressBar().setValue(progress)
1056 1059
1057 def __loadFinished(self, ok): 1060 def __loadFinished(self, ok):
1058 """ 1061 """
1059 Private method to handle the loadFinished signal. 1062 Private method to handle the loadFinished signal.
1060 1063
1061 @param ok flag indicating the result (boolean) 1064 @param ok flag indicating the result (boolean)
1062 """ 1065 """
1063 self.__isLoading = False 1066 self.__isLoading = False
1067 self.__progress = 0
1064 self.mw.progressBar().hide() 1068 self.mw.progressBar().hide()
1065 self.mw.resetLoading(self, ok) 1069 self.mw.resetLoading(self, ok)
1066 1070
1067 self.__iconChanged() 1071 self.__iconChanged()
1068 1072
1075 Public method to get the loading state. 1079 Public method to get the loading state.
1076 1080
1077 @return flag indicating the loading state (boolean) 1081 @return flag indicating the loading state (boolean)
1078 """ 1082 """
1079 return self.__isLoading 1083 return self.__isLoading
1084
1085 def progress(self):
1086 """
1087 Public method to get the load progress.
1088 """
1089 return self.__progress
1080 1090
1081 def saveAs(self): 1091 def saveAs(self):
1082 """ 1092 """
1083 Public method to save the current page to a file. 1093 Public method to save the current page to a file.
1084 """ 1094 """

eric ide

mercurial