24 const double RectangularTile::g_side_length = 10.0;
25 const QPolygonF RectangularTile::g_start_polygon(QRectF(0, 0, g_side_length, g_side_length));
29 QPainterPath PolygonToPath(
const QPolygonF &polygon)
32 path.moveTo(polygon.first());
33 path.lineTo(polygon.at(1));
34 path.lineTo(polygon.at(2));
51 return new RectangularTile(m_polygon.translated(-g_side_length, 0), parentItem());
56 return new RectangularTile(m_polygon.translated(g_side_length, 0), parentItem());
61 return new RectangularTile(m_polygon.translated(0, -g_side_length), parentItem());
66 return new RectangularTile(m_polygon.translated(0, g_side_length), parentItem());
70 :
Tile(polygon, PolygonToPath(polygon))
72 setParentItem(parentItem);
virtual RectangularTile * Up() const
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Down()) Paren...
Namespace for SimPT tissue editor package.
virtual RectangularTile * Left() const
Creates a new tile to the left of this tile (should normally be the opposite of Tile::Right()) Parent...
virtual ~RectangularTile()
Destructor.
Abstract base class for cell pattern tiles.
virtual RectangularTile * Right() const
Creates a new tile to the right of this tile (should normally be the opposite of Tile::Left()) Parent...
RectangularTile()
Constructor.
virtual RectangularTile * Down() const
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Up()) Parent ...
Interface for RectangularTile.
see the online Qt documentation