4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing a canvas view class. |
7 Module implementing a canvas view class. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 import sys |
12 import sys |
11 |
13 |
12 from PyQt4.QtCore import pyqtSignal, QRectF, QSize, QSizeF, Qt |
14 from PyQt4.QtCore import pyqtSignal, QRectF, QSize, QSizeF, Qt |
13 from PyQt4.QtGui import QGraphicsView, QBrush, QPainter, QPixmap, QFont, QColor |
15 from PyQt4.QtGui import QGraphicsView, QBrush, QPainter, QPixmap, QFont, QColor |
37 Constructor |
39 Constructor |
38 |
40 |
39 @param scene reference to the scene object (QGraphicsScene) |
41 @param scene reference to the scene object (QGraphicsScene) |
40 @param parent parent widget (QWidget) |
42 @param parent parent widget (QWidget) |
41 """ |
43 """ |
42 super().__init__(scene, parent) |
44 super(E5GraphicsView, self).__init__(scene, parent) |
43 self.setObjectName("E5GraphicsView") |
45 self.setObjectName("E5GraphicsView") |
44 |
46 |
45 self.__initialSceneSize = self.scene().sceneRect().size() |
47 self.__initialSceneSize = self.scene().sceneRect().size() |
46 self.setBackgroundBrush(QBrush(Qt.white)) |
48 self.setBackgroundBrush(QBrush(Qt.white)) |
47 self.setRenderHint(QPainter.Antialiasing, True) |
49 self.setRenderHint(QPainter.Antialiasing, True) |