Ejemplo n.º 1
0
 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 = []
Ejemplo n.º 2
0
 def _set_rotation(self, rotation):
     """setter for property rotation"""
     QGraphicsObject.setRotation(self, rotation)
Ejemplo n.º 3
0
 def _set_scale(self, scale):
     """setter for property scale"""
     QGraphicsObject.setScale(self, scale)
Ejemplo n.º 4
0
 def _get_rotation(self):
     """getter for property rotation"""
     return QGraphicsObject.rotation(self)
Ejemplo n.º 5
0
 def _set_pos(self, pos):
     """setter for property pos"""
     QGraphicsObject.setPos(self, pos)
Ejemplo n.º 6
0
 def _get_scale(self):
     """getter for property scale"""
     return QGraphicsObject.scale(self)
Ejemplo n.º 7
0
 def _set_rotation(self, rotation):
     """setter for property rotation"""
     QGraphicsObject.setRotation(self, rotation)
Ejemplo n.º 8
0
 def _get_pos(self):
     """getter for property pos"""
     return QGraphicsObject.pos(self)
Ejemplo n.º 9
0
 def _get_rotation(self):
     """getter for property rotation"""
     return QGraphicsObject.rotation(self)
Ejemplo n.º 10
0
 def _set_scale(self, scale):
     """setter for property scale"""
     QGraphicsObject.setScale(self, scale)
Ejemplo n.º 11
0
 def _get_scale(self):
     """getter for property scale"""
     return QGraphicsObject.scale(self)
Ejemplo n.º 12
0
 def _set_pos(self, pos):
     """setter for property pos"""
     QGraphicsObject.setPos(self, pos)
Ejemplo n.º 13
0
 def _get_pos(self):
     """getter for property pos"""
     return QGraphicsObject.pos(self)