Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
synchronousimagetask.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <vector>
5 
6 #include <QObject>
7 
9 
10 namespace geometrize
11 {
12 class Bitmap;
13 struct ShapeResult;
14 }
15 
16 namespace geometrize
17 {
18 
19 namespace task
20 {
21 
27 class SynchronousImageTask : public QObject
28 {
29  Q_OBJECT
30 public:
31  SynchronousImageTask(Bitmap& target);
32  virtual ~SynchronousImageTask();
35 
40  Bitmap& getTarget();
41 
46  Bitmap& getCurrent();
47 
51  void stepModel();
52 
57 
63 
69 
74  std::vector<geometrize::ShapeResult> getShapes() const;
75 
76 private:
78  std::unique_ptr<SynchronousImageTaskImpl> d;
79 };
80 
81 }
82 
83 }
std::vector< geometrize::ShapeResult > getShapes() const
getShapes Gets a vector of shapes generated so far by this task.
Definition: synchronousimagetask.cpp:124
The SynchronousImageTask class transforms a source image into a collection of shapes approximating th...
Definition: synchronousimagetask.h:27
The ImageTaskPreferences class models the preferences associated with an image task.
Definition: imagetaskpreferences.h:28
geometrize::preferences::ImageTaskPreferences & getPreferences()
getPreferences Gets a reference to the current preferences of this task.
Definition: synchronousimagetask.cpp:114
SynchronousImageTask & operator=(const SynchronousImageTask &)=delete
void drawBackgroundRectangle()
drawBackgroundRectangle Convenience function that draws a background rectangle shape using the target...
Definition: synchronousimagetask.cpp:109
void setPreferences(preferences::ImageTaskPreferences preferences)
setPreferences Sets the preferences for this task.
Definition: synchronousimagetask.cpp:119
void stepModel()
stepModel Steps the internal model, typically adding a shape.
Definition: synchronousimagetask.cpp:104
std::unique_ptr< SynchronousImageTaskImpl > d
Definition: synchronousimagetask.h:77
Bitmap & getCurrent()
getCurrent Gets the current bitmap.
Definition: synchronousimagetask.cpp:99
virtual ~SynchronousImageTask()
Definition: synchronousimagetask.cpp:90
Bitmap & getTarget()
getTarget Gets the target bitmap.
Definition: synchronousimagetask.cpp:94
SynchronousImageTask(Bitmap &target)
Definition: synchronousimagetask.cpp:86