Add missing enums
This commit is contained in:
parent
7e8d34ecd8
commit
e892ad37aa
@ -165,7 +165,7 @@ class GraphicsScene(QtGui.QGraphicsScene):
|
|||||||
## set focus on the topmost focusable item under this click
|
## set focus on the topmost focusable item under this click
|
||||||
items = self.items(ev.scenePos())
|
items = self.items(ev.scenePos())
|
||||||
for i in items:
|
for i in items:
|
||||||
if i.isEnabled() and i.isVisible() and (i.flags() & i.ItemIsFocusable):
|
if i.isEnabled() and i.isVisible() and (i.flags() & i.GraphicsItemFlag.ItemIsFocusable):
|
||||||
i.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
i.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
||||||
break
|
break
|
||||||
|
|
||||||
@ -344,7 +344,7 @@ class GraphicsScene(QtGui.QGraphicsScene):
|
|||||||
if event.isAccepted():
|
if event.isAccepted():
|
||||||
#print " --> accepted"
|
#print " --> accepted"
|
||||||
self.dragItem = item
|
self.dragItem = item
|
||||||
if item.flags() & item.ItemIsFocusable:
|
if item.flags() & item.GraphicsItemFlag.ItemIsFocusable:
|
||||||
item.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
item.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
||||||
break
|
break
|
||||||
elif self.dragItem is not None:
|
elif self.dragItem is not None:
|
||||||
@ -389,7 +389,7 @@ class GraphicsScene(QtGui.QGraphicsScene):
|
|||||||
debug.printExc("Error sending click event:")
|
debug.printExc("Error sending click event:")
|
||||||
|
|
||||||
if ev.isAccepted():
|
if ev.isAccepted():
|
||||||
if item.flags() & item.ItemIsFocusable:
|
if item.flags() & item.GraphicsItemFlag.ItemIsFocusable:
|
||||||
item.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
item.setFocus(QtCore.Qt.FocusReason.MouseFocusReason)
|
||||||
break
|
break
|
||||||
self.sigMouseClicked.emit(ev)
|
self.sigMouseClicked.emit(ev)
|
||||||
|
@ -29,7 +29,6 @@ class CurvePoint(GraphicsObject):
|
|||||||
self.setProperty('position', 0.0)
|
self.setProperty('position', 0.0)
|
||||||
self.setProperty('index', 0)
|
self.setProperty('index', 0)
|
||||||
|
|
||||||
if hasattr(self, 'ItemHasNoContents'):
|
|
||||||
self.setFlags(self.flags() | self.GraphicsItemFlag.ItemHasNoContents)
|
self.setFlags(self.flags() | self.GraphicsItemFlag.ItemHasNoContents)
|
||||||
|
|
||||||
if pos is not None:
|
if pos is not None:
|
||||||
|
@ -9,7 +9,6 @@ class ItemGroup(GraphicsObject):
|
|||||||
|
|
||||||
def __init__(self, *args):
|
def __init__(self, *args):
|
||||||
GraphicsObject.__init__(self, *args)
|
GraphicsObject.__init__(self, *args)
|
||||||
if hasattr(self, "ItemHasNoContents"):
|
|
||||||
self.setFlag(self.GraphicsItemFlag.ItemHasNoContents)
|
self.setFlag(self.GraphicsItemFlag.ItemHasNoContents)
|
||||||
|
|
||||||
def boundingRect(self):
|
def boundingRect(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user