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 """ |