Replaced QMatrix (deprecated) with QTransform

This commit is contained in:
Luke Campagnola 2011-04-05 13:17:28 -04:00
parent bcfd47d8c3
commit 349561e133
2 changed files with 4 additions and 4 deletions

View File

@ -141,7 +141,7 @@ class GraphicsView(QtGui.QGraphicsView):
return
scale = Point(self.size().width()/self.range.width(), self.size().height()/self.range.height())
m = QtGui.QMatrix()
m = QtGui.QTransform()
## First center the viewport at 0
self.resetMatrix()
@ -163,7 +163,7 @@ class GraphicsView(QtGui.QGraphicsView):
st = translate
m.translate(-st[0], -st[1])
#print " translate:", st
self.setMatrix(m)
self.setTransform(m)
self.currentScale = scale
#self.emit(QtCore.SIGNAL('viewChanged'), self.range)
self.sigRangeChanged.emit(self, self.range)

View File

@ -1719,7 +1719,7 @@ class ViewBox(QtGui.QGraphicsWidget):
return
scale = Point(bounds.width()/vr.width(), bounds.height()/vr.height())
#print " scale:", scale
m = QtGui.QMatrix()
m = QtGui.QTransform()
## First center the viewport at 0
self.childGroup.resetMatrix()
@ -1742,7 +1742,7 @@ class ViewBox(QtGui.QGraphicsWidget):
st = translate
m.translate(-st[0], -st[1])
#print " translate:", st
self.childGroup.setMatrix(m)
self.childGroup.setTransform(m)
self.currentScale = scale
def invertY(self, b=True):