Helpviewer/History/HistoryMenu.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 12
1d8dd9706f46
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
190 @param indexes list of indexes (QModelIndexList) 190 @param indexes list of indexes (QModelIndexList)
191 @return mime data (QMimeData) 191 @return mime data (QMimeData)
192 """ 192 """
193 urls = [] 193 urls = []
194 for index in indexes: 194 for index in indexes:
195 url = index.data(HistoryModel.UrlRole).toUrl() 195 url = index.data(HistoryModel.UrlRole)
196 urls.append(url) 196 urls.append(url)
197 197
198 mdata = QMimeData() 198 mdata = QMimeData()
199 mdata.setUrls(urls) 199 mdata.setUrls(urls)
200 return mdata 200 return mdata
230 230
231 @param idx index of the activated item (QModelIndex) 231 @param idx index of the activated item (QModelIndex)
232 """ 232 """
233 if self._keyboardModifiers & Qt.ControlModifier: 233 if self._keyboardModifiers & Qt.ControlModifier:
234 self.emit(SIGNAL("newUrl(const QUrl&, const QString&)"), 234 self.emit(SIGNAL("newUrl(const QUrl&, const QString&)"),
235 idx.data(HistoryModel.UrlRole).toUrl(), 235 idx.data(HistoryModel.UrlRole),
236 idx.data(HistoryModel.TitleRole).toString()) 236 idx.data(HistoryModel.TitleRole))
237 else: 237 else:
238 self.emit(SIGNAL("openUrl(const QUrl&, const QString&)"), 238 self.emit(SIGNAL("openUrl(const QUrl&, const QString&)"),
239 idx.data(HistoryModel.UrlRole).toUrl(), 239 idx.data(HistoryModel.UrlRole),
240 idx.data(HistoryModel.TitleRole).toString()) 240 idx.data(HistoryModel.TitleRole))
241 241
242 def prePopulated(self): 242 def prePopulated(self):
243 """ 243 """
244 Public method to add any actions before the tree. 244 Public method to add any actions before the tree.
245 245

eric ide

mercurial