![]() |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
The ImageTaskScriptingWidget implements a widget for manipulating scripts that are run when an image is being geometrized e.g. before/after a shape is added. More...
#include <imagetaskscriptingwidget.h>
Classes | |
class | ImageTaskScriptingWidgetImpl |
Signals | |
void | signal_scriptChanged (const std::string &functionName, const std::string &code) |
Public Member Functions | |
ImageTaskScriptingWidget (QWidget *parent=nullptr) | |
virtual | ~ImageTaskScriptingWidget () |
void | setImageTask (task::ImageTask *task) |
setImageTask Sets the current image task used by the scripts. 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. More... | |
std::map< std::string, std::string > | getScripts () const |
getScripts Gets all the scripts (shape setup/mutation scripts, and additional scripts). More... | |
void | evaluateBeforeStepScripts () const |
evaluateBeforeStepScripts Evaluates the scripts set to run directly before the image task is stepped (i.e. immediately before the image task starts a step). More... | |
void | evaluateAfterStepScripts () const |
evaluateAfterStepScripts Evaluates the scripts set to run directly after the image task is stepped (i.e. immediately after the image task starts a step). More... | |
bool | evaluateStopConditionScripts () const |
evaluateStopConditionScripts Returns true if the condition(s) for stopping geometrizing the image were met. This is run each time the image task completes a step. More... | |
void | evaluateOnStopConditionMetScripts () const |
evaluateOnStopConditionMetScripts Evaluates the scripts set to run when the stop condition for stopping geometrizing the image is met. More... | |
bool | evaluateAddShapePreconditionScripts () const |
evaluateAddShapePreconditionScripts Evaluates the scripts set to decide whether to add a shape to the image or not. More... | |
void | evaluateBeforeAddShapeScripts () const |
evaluateBeforeAddShapeScripts Evaluates the scripts set to run directly before a shape is added to the image. More... | |
void | evaluateAfterAddShapeScripts () const |
evaluateAfterAddShapeScripts Evaluates the scripts set to run directly after a shape is added to the image. More... | |
void | evaluateOnPenInputEventScripts () const |
evaluateOnPenInputEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus interacts with the scenes. More... | |
void | evaluateOnPenProximityEnterEventScripts () const |
evaluateOnPenProximityEnterEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus enters proximity of the screen (application global, not just the scenes). More... | |
void | evaluateOnPenProximityExitEventScripts () const |
evaluateOnPenProximityExitEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus leaves the proximity of the screen (application global, not just the scenes). More... | |
void | evaluateOnKeyDownEventScripts () const |
evaluateOnKeyDownEventScripts Evaluates the scripts set to run directly after a keyboard key is pressed in the context of a scene. More... | |
void | evaluateOnKeyUpEventScripts () const |
evaluateOnKeyUpEventScripts Evaluates the scripts set to run directly after a keyboard key is released in the context of a scene. More... | |
void | evaluateOnMouseDownEventScripts () const |
evaluateOnMouseDownEventScripts Evaluates the scripts set to run directly after a mouse key is pressed in the context of a scene. More... | |
void | evaluateOnMouseUpEventScripts () const |
evaluateOnMouseUpEventScripts Evaluates the scripts set to run directly after a mouse key is released in the context of a scene. More... | |
void | evaluateOnMouseMoveEventScripts () const |
evaluateOnMouseMoveEventScripts Evaluates the scripts set to run when the mouse is moved in the context of a scene. More... | |
void | evaluateOnMouseWheelEventScripts () const |
evaluateOnMouseWheelEventScripts Evaluates the scripts set to run when the mouse wheel is moved in the context of a scene. More... | |
void | evaluateOnTimedUpdateEventScripts () const |
evaluateOnTimedUpdateEventScripts Evaluates the scripts that are set to run periodically (i.e. on an update function triggered by a timer). More... | |
Protected Member Functions | |
void | changeEvent (QEvent *) override |
Private Attributes | |
std::unique_ptr< ImageTaskScriptingWidgetImpl > | d |
The ImageTaskScriptingWidget implements a widget for manipulating scripts that are run when an image is being geometrized e.g. before/after a shape is added.
geometrize::dialog::ImageTaskScriptingWidget::ImageTaskScriptingWidget | ( | QWidget * | parent = nullptr | ) |
|
overrideprotected |
bool geometrize::dialog::ImageTaskScriptingWidget::evaluateAddShapePreconditionScripts | ( | ) | const |
evaluateAddShapePreconditionScripts Evaluates the scripts set to decide whether to add a shape to the image or not.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateAfterAddShapeScripts | ( | ) | const |
evaluateAfterAddShapeScripts Evaluates the scripts set to run directly after a shape is added to the image.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateAfterStepScripts | ( | ) | const |
evaluateAfterStepScripts Evaluates the scripts set to run directly after the image task is stepped (i.e. immediately after the image task starts a step).
void geometrize::dialog::ImageTaskScriptingWidget::evaluateBeforeAddShapeScripts | ( | ) | const |
evaluateBeforeAddShapeScripts Evaluates the scripts set to run directly before a shape is added to the image.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateBeforeStepScripts | ( | ) | const |
evaluateBeforeStepScripts Evaluates the scripts set to run directly before the image task is stepped (i.e. immediately before the image task starts a step).
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnKeyDownEventScripts | ( | ) | const |
evaluateOnKeyDownEventScripts Evaluates the scripts set to run directly after a keyboard key is pressed in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnKeyUpEventScripts | ( | ) | const |
evaluateOnKeyUpEventScripts Evaluates the scripts set to run directly after a keyboard key is released in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnMouseDownEventScripts | ( | ) | const |
evaluateOnMouseDownEventScripts Evaluates the scripts set to run directly after a mouse key is pressed in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnMouseMoveEventScripts | ( | ) | const |
evaluateOnMouseMoveEventScripts Evaluates the scripts set to run when the mouse is moved in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnMouseUpEventScripts | ( | ) | const |
evaluateOnMouseUpEventScripts Evaluates the scripts set to run directly after a mouse key is released in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnMouseWheelEventScripts | ( | ) | const |
evaluateOnMouseWheelEventScripts Evaluates the scripts set to run when the mouse wheel is moved in the context of a scene.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnPenInputEventScripts | ( | ) | const |
evaluateOnPenInputEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus interacts with the scenes.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnPenProximityEnterEventScripts | ( | ) | const |
evaluateOnPenProximityEnterEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus enters proximity of the screen (application global, not just the scenes).
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnPenProximityExitEventScripts | ( | ) | const |
evaluateOnPenProximityExitEventScripts Evaluates the scripts set to run directly after a pen e.g. Wacom stylus leaves the proximity of the screen (application global, not just the scenes).
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnStopConditionMetScripts | ( | ) | const |
evaluateOnStopConditionMetScripts Evaluates the scripts set to run when the stop condition for stopping geometrizing the image is met.
void geometrize::dialog::ImageTaskScriptingWidget::evaluateOnTimedUpdateEventScripts | ( | ) | const |
evaluateOnTimedUpdateEventScripts Evaluates the scripts that are set to run periodically (i.e. on an update function triggered by a timer).
bool geometrize::dialog::ImageTaskScriptingWidget::evaluateStopConditionScripts | ( | ) | const |
evaluateStopConditionScripts Returns true if the condition(s) for stopping geometrizing the image were met. This is run each time the image task completes a step.
std::map< std::string, std::string > geometrize::dialog::ImageTaskScriptingWidget::getScripts | ( | ) | const |
getScripts Gets all the scripts (shape setup/mutation scripts, and additional scripts).
void geometrize::dialog::ImageTaskScriptingWidget::setImageTask | ( | task::ImageTask * | task | ) |
setImageTask Sets the current image task used by the scripts.
task | Non-owning pointer to the image task that the scripts on this widget will use. |
|
signal |
void geometrize::dialog::ImageTaskScriptingWidget::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.
|
private |