Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
imagetaskrunnerwidget.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include <QString>
6 #include <QWidget>
7 
8 class QEvent;
9 
10 namespace geometrize
11 {
12 
13 namespace task
14 {
15 class ImageTask;
16 }
17 
18 }
19 
20 namespace geometrize
21 {
22 
23 namespace dialog
24 {
25 
29 class ImageTaskRunnerWidget : public QWidget
30 {
31  Q_OBJECT
32 
33 public:
34  ImageTaskRunnerWidget(QWidget* parent = nullptr);
35  virtual ~ImageTaskRunnerWidget();
36 
41  void setImageTask(task::ImageTask* task);
42 
47  void setRunStopButtonText(const QString& text);
48 
54  void syncUserInterface();
55 
56 signals:
57  void runStopButtonClicked();
58  void stepButtonClicked();
59  void clearButtonClicked();
60 
61 protected:
62  void changeEvent(QEvent*) override;
63 
64 private slots:
66  void on_stepButton_clicked();
68 
69  void on_usesRectangles_clicked(bool checked);
70  void on_usesRotatedRectangles_clicked(bool checked);
71  void on_usesTriangles_clicked(bool checked);
72  void on_usesEllipses_clicked(bool checked);
73  void on_usesRotatedEllipses_clicked(bool checked);
74  void on_usesCircles_clicked(bool checked);
75  void on_usesLines_clicked(bool checked);
76  void on_usesQuadraticBeziers_clicked(bool checked);
77  void on_usesPolylines_clicked(bool checked);
78 
79  void on_shapeOpacitySlider_valueChanged(int value);
82  void on_randomSeedSpinBox_valueChanged(int value);
83  void on_maxThreadsSpinBox_valueChanged(int value);
84 
85 private:
87  std::unique_ptr<ImageTaskRunnerWidgetImpl> d;
88 };
89 
90 }
91 
92 }
void on_maxThreadsSpinBox_valueChanged(int value)
Definition: imagetaskrunnerwidget.cpp:275
void on_usesRotatedEllipses_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:230
void on_runStopButton_clicked()
Definition: imagetaskrunnerwidget.cpp:195
void on_usesEllipses_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:225
void setImageTask(task::ImageTask *task)
setImageTask Sets the current image task used by the runner.
Definition: imagetaskrunnerwidget.cpp:180
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void on_usesPolylines_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:250
void on_usesCircles_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:235
void changeEvent(QEvent *) override
Definition: imagetaskrunnerwidget.cpp:280
void on_clearButton_clicked()
Definition: imagetaskrunnerwidget.cpp:205
void on_usesQuadraticBeziers_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:245
void on_usesRectangles_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:210
ImageTaskRunnerWidget(QWidget *parent=nullptr)
Definition: imagetaskrunnerwidget.cpp:170
void on_usesRotatedRectangles_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:215
void setRunStopButtonText(const QString &text)
setRunStopButtonText Sets the text on the run/stop button in the UI.
Definition: imagetaskrunnerwidget.cpp:185
virtual ~ImageTaskRunnerWidget()
Definition: imagetaskrunnerwidget.cpp:176
void on_mutationsPerCandidateShapeSlider_valueChanged(int value)
Definition: imagetaskrunnerwidget.cpp:265
The ImageTask class transforms a source image into a collection of shapes approximating the source im...
Definition: imagetask.h:50
void on_usesLines_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:240
void on_usesTriangles_clicked(bool checked)
Definition: imagetaskrunnerwidget.cpp:220
void on_candidateShapesPerStepSlider_valueChanged(int value)
Definition: imagetaskrunnerwidget.cpp:260
void on_shapeOpacitySlider_valueChanged(int value)
Definition: imagetaskrunnerwidget.cpp:255
void syncUserInterface()
syncUserInterface Syncs the user interface with the current image task. This should be called after s...
Definition: imagetaskrunnerwidget.cpp:190
The ImageTaskRunnerWidget implements a widget for manipulating and changing the settings of an image ...
Definition: imagetaskrunnerwidget.h:29
void on_stepButton_clicked()
Definition: imagetaskrunnerwidget.cpp:200
void on_randomSeedSpinBox_valueChanged(int value)
Definition: imagetaskrunnerwidget.cpp:270