VPTissue Reference Manual
Tile.h
Go to the documentation of this file.
1 #ifndef SIMPT_EDITOR_TILE_H_INCLUDED
2 #define SIMPT_EDITOR_TILE_H_INCLUDED
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include <QGraphicsPathItem>
23 
24 namespace SimPT_Editor {
25 
29 class Tile : public QGraphicsPathItem
30 {
31 public:
38  Tile(const QPolygonF &polygon, const QPainterPath &path) : QGraphicsPathItem(path), m_polygon(polygon) {}
39 
43  virtual ~Tile() {}
44 
45 
51  const QPolygonF &GetPolygon() const { return m_polygon; }
52 
53 
60  virtual Tile *Left() const = 0;
61 
68  virtual Tile *Right() const = 0;
69 
76  virtual Tile *Up() const = 0;
77 
84  virtual Tile *Down() const = 0;
85 
86 protected:
87  const QPolygonF m_polygon;
88 };
89 
90 } // namespace
91 
92 #endif // end-of-include-guard
see the online Qt documentation
Namespace for SimPT tissue editor package.
Definition: Cell.h:32
Tile(const QPolygonF &polygon, const QPainterPath &path)
Constructor.
Definition: Tile.h:38
virtual Tile * Left() const =0
Creates a new tile to the left of this tile (should normally be the opposite of Tile::Right()) Parent...
virtual ~Tile()
(Virtual) Destructor
Definition: Tile.h:43
virtual Tile * Down() const =0
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Up()) Parent ...
virtual Tile * Up() const =0
Creates a new tile on the row under this tile (should normally be the opposite of Tile::Down()) Paren...
Abstract base class for cell pattern tiles.
Definition: Tile.h:29
const QPolygonF & GetPolygon() const
Returns to the polygon of this tile.
Definition: Tile.h:51
virtual Tile * Right() const =0
Creates a new tile to the right of this tile (should normally be the opposite of Tile::Left()) Parent...