Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Classes | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
geometrize::dialog::ImageTaskRunnerWidget Class Reference

The ImageTaskRunnerWidget implements a widget for manipulating and changing the settings of an image task e.g. the number of times to mutate each shape the task generates. More...

#include <imagetaskrunnerwidget.h>

Inheritance diagram for geometrize::dialog::ImageTaskRunnerWidget:
Inheritance graph
[legend]
Collaboration diagram for geometrize::dialog::ImageTaskRunnerWidget:
Collaboration graph
[legend]

Classes

class  ImageTaskRunnerWidgetImpl
 

Signals

void runStopButtonClicked ()
 
void stepButtonClicked ()
 
void clearButtonClicked ()
 

Public Member Functions

 ImageTaskRunnerWidget (QWidget *parent=nullptr)
 
virtual ~ImageTaskRunnerWidget ()
 
void setImageTask (task::ImageTask *task)
 setImageTask Sets the current image task used by the runner. More...
 
void setRunStopButtonText (const QString &text)
 setRunStopButtonText Sets the text on the run/stop button in the UI. More...
 
void syncUserInterface ()
 syncUserInterface Syncs the user interface with the current image task. This should be called after setting a new image task, or new task settings. Note this does not change the run/stop button text. More...
 

Protected Member Functions

void changeEvent (QEvent *) override
 

Private Slots

void on_runStopButton_clicked ()
 
void on_stepButton_clicked ()
 
void on_clearButton_clicked ()
 
void on_usesRectangles_clicked (bool checked)
 
void on_usesRotatedRectangles_clicked (bool checked)
 
void on_usesTriangles_clicked (bool checked)
 
void on_usesEllipses_clicked (bool checked)
 
void on_usesRotatedEllipses_clicked (bool checked)
 
void on_usesCircles_clicked (bool checked)
 
void on_usesLines_clicked (bool checked)
 
void on_usesQuadraticBeziers_clicked (bool checked)
 
void on_usesPolylines_clicked (bool checked)
 
void on_shapeOpacitySlider_valueChanged (int value)
 
void on_candidateShapesPerStepSlider_valueChanged (int value)
 
void on_mutationsPerCandidateShapeSlider_valueChanged (int value)
 
void on_randomSeedSpinBox_valueChanged (int value)
 
void on_maxThreadsSpinBox_valueChanged (int value)
 

Private Attributes

std::unique_ptr
< ImageTaskRunnerWidgetImpl
d
 

Detailed Description

The ImageTaskRunnerWidget implements a widget for manipulating and changing the settings of an image task e.g. the number of times to mutate each shape the task generates.

Constructor & Destructor Documentation

geometrize::dialog::ImageTaskRunnerWidget::ImageTaskRunnerWidget ( QWidget *  parent = nullptr)
170  :
171  QWidget{parent},
172  d{std::make_unique<ImageTaskRunnerWidget::ImageTaskRunnerWidgetImpl>(this)}
173 {
174 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
geometrize::dialog::ImageTaskRunnerWidget::~ImageTaskRunnerWidget ( )
virtual
177 {
178 }

Member Function Documentation

void geometrize::dialog::ImageTaskRunnerWidget::changeEvent ( QEvent *  event)
overrideprotected
281 {
282  if (event->type() == QEvent::LanguageChange) {
283  d->onLanguageChange();
284  }
285  QWidget::changeEvent(event);
286 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::clearButtonClicked ( )
signal

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskRunnerWidget::on_candidateShapesPerStepSlider_valueChanged ( int  value)
privateslot
261 {
262  d->setCandidateShapesPerStep(value);
263 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_clearButton_clicked ( )
privateslot
206 {
207  d->clearModel();
208 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_maxThreadsSpinBox_valueChanged ( int  value)
privateslot
276 {
277  d->setMaxThreads(value);
278 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_mutationsPerCandidateShapeSlider_valueChanged ( int  value)
privateslot
266 {
267  d->setMutationsPerCandidateShape(value);
268 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_randomSeedSpinBox_valueChanged ( int  value)
privateslot
271 {
272  d->setRandomSeed(value);
273 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_runStopButton_clicked ( )
privateslot
196 {
197  d->toggleRunning();
198 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_shapeOpacitySlider_valueChanged ( int  value)
privateslot
256 {
257  d->setShapeOpacity(value);
258 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_stepButton_clicked ( )
privateslot
201 {
202  d->stepModel();
203 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesCircles_clicked ( bool  checked)
privateslot
236 {
237  d->setShapes(geometrize::CIRCLE, checked);
238 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesEllipses_clicked ( bool  checked)
privateslot
226 {
227  d->setShapes(geometrize::ELLIPSE, checked);
228 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesLines_clicked ( bool  checked)
privateslot
241 {
242  d->setShapes(geometrize::LINE, checked);
243 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesPolylines_clicked ( bool  checked)
privateslot
251 {
252  d->setShapes(geometrize::POLYLINE, checked);
253 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesQuadraticBeziers_clicked ( bool  checked)
privateslot
246 {
247  d->setShapes(geometrize::QUADRATIC_BEZIER, checked);
248 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesRectangles_clicked ( bool  checked)
privateslot
211 {
212  d->setShapes(geometrize::RECTANGLE, checked);
213 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesRotatedEllipses_clicked ( bool  checked)
privateslot
231 {
232  d->setShapes(geometrize::ROTATED_ELLIPSE, checked);
233 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesRotatedRectangles_clicked ( bool  checked)
privateslot
216 {
217  d->setShapes(geometrize::ROTATED_RECTANGLE, checked);
218 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::on_usesTriangles_clicked ( bool  checked)
privateslot
221 {
222  d->setShapes(geometrize::TRIANGLE, checked);
223 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::runStopButtonClicked ( )
signal

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskRunnerWidget::setImageTask ( task::ImageTask task)

setImageTask Sets the current image task used by the runner.

Parameters
taskNon-owning pointer to the image task that the runner settings on this widget will use.
181 {
182  d->setImageTask(task);
183 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::setRunStopButtonText ( const QString &  text)

setRunStopButtonText Sets the text on the run/stop button in the UI.

Parameters
textThe text to set on the run/stop button.
186 {
187  d->setRunStopButtonText(text);
188 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86
void geometrize::dialog::ImageTaskRunnerWidget::stepButtonClicked ( )
signal

Here is the caller graph for this function:

void geometrize::dialog::ImageTaskRunnerWidget::syncUserInterface ( )

syncUserInterface Syncs the user interface with the current image task. This should be called after setting a new image task, or new task settings. Note this does not change the run/stop button text.

191 {
192  d->syncUserInterface();
193 }
std::unique_ptr< ImageTaskRunnerWidgetImpl > d
Definition: imagetaskrunnerwidget.h:86

Member Data Documentation

std::unique_ptr<ImageTaskRunnerWidgetImpl> geometrize::dialog::ImageTaskRunnerWidget::d
private

The documentation for this class was generated from the following files: