291 |
291 |
292 @param idx index of the activated item (QModelIndex) |
292 @param idx index of the activated item (QModelIndex) |
293 """ |
293 """ |
294 if self._keyboardModifiers & Qt.ControlModifier: |
294 if self._keyboardModifiers & Qt.ControlModifier: |
295 self.newUrl.emit( |
295 self.newUrl.emit( |
296 idx.data(HistoryModel.UrlRole), |
296 idx.data(HistoryModel.UrlRole), |
297 idx.data(HistoryModel.TitleRole)) |
297 idx.data(HistoryModel.TitleRole)) |
298 else: |
298 else: |
299 self.openUrl.emit( |
299 self.openUrl.emit( |
300 idx.data(HistoryModel.UrlRole), |
300 idx.data(HistoryModel.UrlRole), |
301 idx.data(HistoryModel.TitleRole)) |
301 idx.data(HistoryModel.TitleRole)) |
302 |
302 |
303 def prePopulated(self): |
303 def prePopulated(self): |
304 """ |
304 """ |
305 Public method to add any actions before the tree. |
305 Public method to add any actions before the tree. |
306 |
306 |
445 |
445 |
446 @param idx index of the activated item (QModelIndex) |
446 @param idx index of the activated item (QModelIndex) |
447 """ |
447 """ |
448 if self._keyboardModifiers & Qt.ControlModifier: |
448 if self._keyboardModifiers & Qt.ControlModifier: |
449 self.newUrl.emit( |
449 self.newUrl.emit( |
450 idx.data(HistoryModel.UrlRole), |
450 idx.data(HistoryModel.UrlRole), |
451 idx.data(HistoryModel.TitleRole)) |
451 idx.data(HistoryModel.TitleRole)) |
452 else: |
452 else: |
453 self.openUrl.emit( |
453 self.openUrl.emit( |
454 idx.data(HistoryModel.UrlRole), |
454 idx.data(HistoryModel.UrlRole), |
455 idx.data(HistoryModel.TitleRole)) |
455 idx.data(HistoryModel.TitleRole)) |
456 |
456 |
457 def prePopulated(self): |
457 def prePopulated(self): |
458 """ |
458 """ |
459 Public method to add any actions before the tree. |
459 Public method to add any actions before the tree. |
460 |
460 |