Helpviewer/History/HistoryDialog.py

changeset 7
c679fb30c8f3
parent 0
de9c2efb9d02
child 12
1d8dd9706f46
equal deleted inserted replaced
6:52e8c820d0dd 7:c679fb30c8f3
121 @param newTab flag indicating to open the history entry in a new tab (boolean) 121 @param newTab flag indicating to open the history entry in a new tab (boolean)
122 """ 122 """
123 idx = self.historyTree.currentIndex() 123 idx = self.historyTree.currentIndex()
124 if newTab: 124 if newTab:
125 self.emit(SIGNAL("newUrl(const QUrl&, const QString&)"), 125 self.emit(SIGNAL("newUrl(const QUrl&, const QString&)"),
126 idx.data(HistoryModel.UrlRole).toUrl(), 126 idx.data(HistoryModel.UrlRole),
127 idx.data(HistoryModel.TitleRole).toString()) 127 idx.data(HistoryModel.TitleRole))
128 else: 128 else:
129 self.emit(SIGNAL("openUrl(const QUrl&, const QString&)"), 129 self.emit(SIGNAL("openUrl(const QUrl&, const QString&)"),
130 idx.data(HistoryModel.UrlRole).toUrl(), 130 idx.data(HistoryModel.UrlRole),
131 idx.data(HistoryModel.TitleRole).toString()) 131 idx.data(HistoryModel.TitleRole))
132 132
133 def __copyHistory(self): 133 def __copyHistory(self):
134 """ 134 """
135 Private slot to copy a history entry's URL to the clipboard. 135 Private slot to copy a history entry's URL to the clipboard.
136 """ 136 """
137 idx = self.historyTree.currentIndex() 137 idx = self.historyTree.currentIndex()
138 if not idx.parent().isValid(): 138 if not idx.parent().isValid():
139 return 139 return
140 140
141 url = idx.data(HistoryModel.UrlStringRole).toString() 141 url = idx.data(HistoryModel.UrlStringRole)
142 142
143 clipboard = QApplication.clipboard() 143 clipboard = QApplication.clipboard()
144 clipboard.setText(url) 144 clipboard.setText(url)

eric ide

mercurial