26 const double DiamondTile::g_diagonal_length = 10.0;
27 const QPolygonF DiamondTile::g_start_polygon(QPolygonF() << QPointF(0, 0) << QPointF(g_diagonal_length / 2, g_diagonal_length / 2) << QPointF(g_diagonal_length, 0) << QPointF(g_diagonal_length / 2, -g_diagonal_length / 2));
31 QPainterPath PolygonToPath(
const QPolygonF &polygon)
34 path.moveTo(polygon.first());
35 path.lineTo(polygon.at(1));
36 path.lineTo(polygon.at(2));
53 return new DiamondTile(m_polygon.translated(-g_diagonal_length, 0), parentItem());
58 return new DiamondTile(m_polygon.translated(g_diagonal_length, 0), parentItem());
63 return new DiamondTile(m_polygon.translated(-g_diagonal_length / 2, -g_diagonal_length / 2), parentItem());
68 return new DiamondTile(m_polygon.translated(g_diagonal_length / 2, g_diagonal_length / 2), parentItem());
72 :
Tile(polygon, PolygonToPath(polygon))
74 setParentItem(parentItem);
Namespace for SimPT tissue editor package.
virtual DiamondTile * Up() const
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Down()) Paren...
Interface for DiamondTile.
virtual DiamondTile * Down() const
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Up()) Parent ...
virtual ~DiamondTile()
Destructor.
DiamondTile()
Constructor.
virtual DiamondTile * Right() const
Creates a new tile to the right of this tile (should normally be the opposite of Tile::Left()) Parent...
virtual DiamondTile * Left() const
Creates a new tile to the left of this tile (should normally be the opposite of Tile::Right()) Parent...
Abstract base class for cell pattern tiles.
see the online Qt documentation