Helpviewer/UrlBar/FavIconLabel.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2403
e3d7a861547c
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
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
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11 try:
12 str = unicode
13 except (NameError):
14 pass
9 15
10 from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData 16 from PyQt4.QtCore import Qt, QPoint, QUrl, QMimeData
11 from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap 17 from PyQt4.QtGui import QLabel, QApplication, QDrag, QPixmap
12 18
13 19
19 """ 25 """
20 Constructor 26 Constructor
21 27
22 @param parent reference to the parent widget (QWidget) 28 @param parent reference to the parent widget (QWidget)
23 """ 29 """
24 super().__init__(parent) 30 super(FavIconLabel, self).__init__(parent)
25 31
26 self.__browser = None 32 self.__browser = None
27 self.__dragStartPos = QPoint() 33 self.__dragStartPos = QPoint()
28 34
29 self.setFocusPolicy(Qt.NoFocus) 35 self.setFocusPolicy(Qt.NoFocus)
69 75
70 @param evt reference to the mouse event (QMouseEvent) 76 @param evt reference to the mouse event (QMouseEvent)
71 """ 77 """
72 if evt.button() == Qt.LeftButton: 78 if evt.button() == Qt.LeftButton:
73 self.__dragStartPos = evt.pos() 79 self.__dragStartPos = evt.pos()
74 super().mousePressEvent(evt) 80 super(FavIconLabel, self).mousePressEvent(evt)
75 81
76 def mouseMoveEvent(self, evt): 82 def mouseMoveEvent(self, evt):
77 """ 83 """
78 Protected method to handle mouse move events. 84 Protected method to handle mouse move events.
79 85

eric ide

mercurial