src/eric7/WebBrowser/Sync/SyncCheckPage.py

branch
eric7
changeset 10436
f6881d10e995
parent 10069
435cc5875135
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
25 25
26 def __init__(self, parent=None): 26 def __init__(self, parent=None):
27 """ 27 """
28 Constructor 28 Constructor
29 29
30 @param parent reference to the parent widget (QWidget) 30 @param parent reference to the parent widget
31 @type QWidget
31 """ 32 """
32 super().__init__(parent) 33 super().__init__(parent)
33 self.setupUi(self) 34 self.setupUi(self)
34 35
35 def initializePage(self): 36 def initializePage(self):
118 119
119 def __updateMessages(self, type_, msg): 120 def __updateMessages(self, type_, msg):
120 """ 121 """
121 Private slot to update the synchronization status info. 122 Private slot to update the synchronization status info.
122 123
123 @param type_ type of synchronization data (string) 124 @param type_ type of synchronization data
124 @param msg synchronization message (string) 125 @type str
126 @param msg synchronization message
127 @type str
125 """ 128 """
126 if type_ == "bookmarks": 129 if type_ == "bookmarks":
127 self.bookmarkMsgLabel.setText(msg) 130 self.bookmarkMsgLabel.setText(msg)
128 elif type_ == "history": 131 elif type_ == "history":
129 self.historyMsgLabel.setText(msg) 132 self.historyMsgLabel.setText(msg)
137 @pyqtSlot(str, bool, bool) 140 @pyqtSlot(str, bool, bool)
138 def __updateLabels(self, type_, status, download): 141 def __updateLabels(self, type_, status, download):
139 """ 142 """
140 Private slot to handle a finished synchronization event. 143 Private slot to handle a finished synchronization event.
141 144
142 @param type_ type of the synchronization event (string one 145 @param type_ type of the synchronization event (one of "bookmarks",
143 of "bookmarks", "history", "passwords", "useragents" or 146 "history", "passwords", "useragents" or "speeddial")
144 "speeddial") 147 @type str
145 @param status flag indicating success (boolean) 148 @param status flag indicating success
146 @param download flag indicating a download of a file (boolean) 149 @type bool
150 @param download flag indicating a download of a file
151 @type bool
147 """ 152 """
148 if type_ == "bookmarks": 153 if type_ == "bookmarks":
149 if status: 154 if status:
150 self.bookmarkLabel.setPixmap(EricPixmapCache.getPixmap("syncCompleted")) 155 self.bookmarkLabel.setPixmap(EricPixmapCache.getPixmap("syncCompleted"))
151 else: 156 else:
179 184
180 def __syncError(self, message): 185 def __syncError(self, message):
181 """ 186 """
182 Private slot to handle general synchronization issues. 187 Private slot to handle general synchronization issues.
183 188
184 @param message error message (string) 189 @param message error message
190 @type str
185 """ 191 """
186 self.syncErrorLabel.show() 192 self.syncErrorLabel.show()
187 self.syncErrorLabel.setText( 193 self.syncErrorLabel.setText(
188 self.tr('<font color="#FF0000"><b>Error:</b> {0}</font>').format(message) 194 self.tr('<font color="#FF0000"><b>Error:</b> {0}</font>').format(message)
189 ) 195 )

eric ide

mercurial