def itemChange(self, change, variant): if change != QGraphicsItem.ItemSelectedChange: global Dirty Dirty = True ''' if change== QGraphicsItem.ItemPositionChange: if (parentFormvars().has_key('dicLine') ): if parentForm.dicLine!=None: lines=[ line for line in self.dicLine.values() if ( line.fromBox.boxName== self.boxName or line.toBox.boxName==self.boxName)] for line in lines: line.resetLine(); parentForm.scene.update() ''' return QGraphicsTextItem.itemChange(self, change, variant)
def itemChange(self, change, value): if change == QGraphicsItem.ItemPositionChange and self.scene(): command = CommandMoveText(self, value) self.scene().undoStack.push(command) return QGraphicsTextItem.itemChange(self, change, value)
def itemChange(self, change, variant): if change != QGraphicsItem.ItemSelectedChange: global Dirty Dirty = True return QGraphicsTextItem.itemChange(self, change, variant)
def itemChange(self, change, value): if change == QGraphicsTextItem.ItemPositionChange and self.scene(): command = CommandMoveText(self, value) # Notice that the value here is the new position, not the delta. self.scene().undoStack.push(command) return QGraphicsTextItem.itemChange(self, change, value)