Helpviewer/UrlBar/FavIconLabel.py

changeset 2403
e3d7a861547c
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 3002
6ffc581f00f1
equal deleted inserted replaced
2402:304fcefd3b04 2403:e3d7a861547c
7 Module implementing the label to show the web site icon. 7 Module implementing the label to show the web site icon.
8 """ 8 """
9 9
10 from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData 10 from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData
11 from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap 11 from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap
12
13 import Helpviewer.HelpWindow
14 12
15 13
16 class FavIconLabel(QLabel): 14 class FavIconLabel(QLabel):
17 """ 15 """
18 Class implementing the label to show the web site icon. 16 Class implementing the label to show the web site icon.
37 35
38 def __browserIconChanged(self): 36 def __browserIconChanged(self):
39 """ 37 """
40 Private slot to set the icon. 38 Private slot to set the icon.
41 """ 39 """
40 import Helpviewer.HelpWindow
42 try: 41 try:
43 url = QUrl() 42 url = QUrl()
44 if self.__browser: 43 if self.__browser:
45 url = self.__browser.url() 44 url = self.__browser.url()
46 self.setPixmap(Helpviewer.HelpWindow.HelpWindow.icon(url).pixmap(16, 16)) 45 self.setPixmap(Helpviewer.HelpWindow.HelpWindow.icon(url).pixmap(16, 16))

eric ide

mercurial