Geometrize  1.0
An application for geometrizing images into geometric primitives
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;
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 }
geometrize::task::ShapeCollection::ShapeCollection
ShapeCollection()=default
geometrize::task::ShapeCollection::clear
void clear()
Definition: shapecollection.cpp:23
geometrize::task::ShapeCollection::operator=
ShapeCollection & operator=(const ShapeCollection &)=delete
geometrize::task::ShapeCollection::m_shapes
std::vector< geometrize::ShapeResult > m_shapes
Definition: shapecollection.h:45
shapecollection.h
geometrize::task::ShapeCollection::~ShapeCollection
~ShapeCollection()=default
geometrize::task::ShapeCollection::getShapeVector
const std::vector< geometrize::ShapeResult > & getShapeVector() const
Definition: shapecollection.cpp:29
geometrize::task::ShapeCollection::ShapeCollection
ShapeCollection(const ShapeCollection &)=delete
geometrize
Definition: commandlineparser.cpp:73
geometrize::task::ShapeCollection
The ShapeCollection class is a wrapper for the vector of shapes that have been added to the image tas...
Definition: shapecollection.h:19
geometrize::task::ShapeCollection::signal_afterAppendShapes
void signal_afterAppendShapes(const std::vector< geometrize::ShapeResult > &)
geometrize::task::ShapeCollection::size
std::size_t size() const
Definition: shapecollection.cpp:18
geometrize::task::ShapeCollection::empty
bool empty() const
Definition: shapecollection.cpp:13
geometrize::task::ShapeCollection::signal_beforeAppendShapes
void signal_beforeAppendShapes(const std::vector< geometrize::ShapeResult > &)
geometrize::task::ShapeCollection::signal_sizeChanged
void signal_sizeChanged(std::size_t to)
geometrize::task::ShapeCollection::appendShapes
void appendShapes(const std::vector< geometrize::ShapeResult > &shapes)
Definition: shapecollection.cpp:34
geometrize::task::ShapeCollection::back
geometrize::ShapeResult & back()
Definition: shapecollection.cpp:42