def __init__(self, tile, xoffset=0.0, yoffset=0.0, level=0): QGraphicsObject.__init__(self) if not isinstance(tile, Tile): tile = Tile(tile) self._tile = tile self._boundingRect = None self._cross = False self.setCacheMode(QGraphicsItem.DeviceCoordinateCache) # while moving the tile we use ItemCoordinateCache, see # Tile.setActiveAnimation self.__board = None self.setClippingFlags() self.__xoffset = xoffset self.__yoffset = yoffset self.__dark = False self.level = level self.activeAnimation = dict() # key is the property name self.queuedAnimations = []
def _set_rotation(self, rotation): """setter for property rotation""" QGraphicsObject.setRotation(self, rotation)
def _set_scale(self, scale): """setter for property scale""" QGraphicsObject.setScale(self, scale)
def _get_rotation(self): """getter for property rotation""" return QGraphicsObject.rotation(self)
def _set_pos(self, pos): """setter for property pos""" QGraphicsObject.setPos(self, pos)
def _get_scale(self): """getter for property scale""" return QGraphicsObject.scale(self)
def _get_pos(self): """getter for property pos""" return QGraphicsObject.pos(self)