VPTissue Reference Manual
RegularTiling.h
Go to the documentation of this file.
1 #ifndef SIMPT_EDITOR_REGULAR_TILING_H_INCLUDED
2 #define SIMPT_EDITOR_REGULAR_TILING_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 <QGraphicsItem>
23 
24 #include <list>
25 #include <utility>
26 
27 namespace SimPT_Editor {
28 
29 class Tile;
30 
35 {
36 public:
44  RegularTiling(Tile *seed, const QRectF &rect, QGraphicsItem *parent = nullptr);
45 
49  virtual ~RegularTiling();
50 
51 
57  void SetRectangle(const QRectF &rect);
58 
64  std::list<QPolygonF> GetPolygons() const;
65 
66 protected:
67  virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
68 
69 private:
70  void ResizeTileRow(std::list<Tile*> &row);
71  void ResizeTiles();
72 
73  std::list<std::list<Tile*>> m_tiles;
74  QRectF m_parent_rect;
75  QRectF m_rect;
76 };
77 
78 } // namespace
79 
80 #endif // end-of-include-guard
RegularTiling(Tile *seed, const QRectF &rect, QGraphicsItem *parent=nullptr)
Constructor.
Namespace for SimPT tissue editor package.
Definition: Cell.h:32
void SetRectangle(const QRectF &rect)
The rectangle the tiling should overlay.
std::list< QPolygonF > GetPolygons() const
Get the polygons associated with this tiling.
see the online Qt documentation
Class of a cell tiling with regular polygons.
Definition: RegularTiling.h:34
Abstract base class for cell pattern tiles.
Definition: Tile.h:29
virtual ~RegularTiling()
Destructor.
see the online Qt documentation