Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
shapecollection.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <vector>
4 
5 #include <QObject>
6 
7 #include "geometrize/shaperesult.h"
8 
9 namespace geometrize
10 {
11 
12 namespace task
13 {
14 
18 class ShapeCollection : public QObject
19 {
20  Q_OBJECT
21 public:
22  ShapeCollection() = default;
23  ShapeCollection& operator=(const ShapeCollection&) = delete;
24  ShapeCollection(const ShapeCollection&) = delete;
25  ~ShapeCollection() = default;
26 
27  bool empty() const;
28 
29  std::size_t size() const;
30 
31  void clear();
32 
33  const std::vector<geometrize::ShapeResult>& getShapeVector() const;
34 
35  void appendShapes(const std::vector<geometrize::ShapeResult>& shapes);
36 
37  geometrize::ShapeResult& back();
38 
39 signals:
40  void signal_beforeAppendShapes(const std::vector<geometrize::ShapeResult>&);
41  void signal_sizeChanged(std::size_t to);
42  void signal_afterAppendShapes(const std::vector<geometrize::ShapeResult>&);
43 
44 private:
45  std::vector<geometrize::ShapeResult> m_shapes;
46 };
47 
48 }
49 }
void appendShapes(const std::vector< geometrize::ShapeResult > &shapes)
Definition: shapecollection.cpp:34
void signal_sizeChanged(std::size_t to)
geometrize::ShapeResult & back()
Definition: shapecollection.cpp:42
bool empty() const
Definition: shapecollection.cpp:13
std::size_t size() const
Definition: shapecollection.cpp:18
const std::vector< geometrize::ShapeResult > & getShapeVector() const
Definition: shapecollection.cpp:29
The ShapeCollection class is a wrapper for the vector of shapes that have been added to the image tas...
Definition: shapecollection.h:18
ShapeCollection & operator=(const ShapeCollection &)=delete
std::vector< geometrize::ShapeResult > m_shapes
Definition: shapecollection.h:45
void signal_beforeAppendShapes(const std::vector< geometrize::ShapeResult > &)
void clear()
Definition: shapecollection.cpp:23
void signal_afterAppendShapes(const std::vector< geometrize::ShapeResult > &)