 |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
Go to the documentation of this file.
96 std::unique_ptr<ImageTaskWindowImpl>
d;
void didSwitchImageTask(task::ImageTask *lastTask, task::ImageTask *currentTask)
didSwitchImageTask Signal dispatched immediately after an image task is set on the image task window.
void signal_modelWillStep()
signal_modelWillStep Signal that is emitted immediately before the underlying image task model is ste...
void clear()
Definition: shapecollection.cpp:23
QString openLoadImageTaskSettingsDialog(QWidget *parent)
Definition: uiactions.cpp:212
void setImageTask(task::ImageTask *task)
setImageTask Sets the current image task shown by the window.
Definition: imagetaskwindow.cpp:906
const Bitmap & getTarget() const
getTarget Gets the target bitmap, const-edition.
Definition: imagetask.cpp:332
std::unique_ptr< ImageTaskWindowImpl > d
Definition: imagetaskwindow.h:95
void signal_onTargetImageMouseMoveEvent(double lastX, double lastY, double x, double y, bool ctrlModifier)
void updateStartStopButtonText()
Definition: imagetaskwindow.cpp:758
The TabletEventData class represents data produced from a Wacom pen/tablet event (in the context of a...
Definition: customtabletevent.h:56
void openLaunchWindow()
Definition: uiactions.cpp:42
ImageTaskWindowImpl & operator=(const ImageTaskWindowImpl &)=delete
bool isLaunchWindowOpen()
Definition: uiactions.cpp:51
void setImageTask(task::ImageTask *task)
Definition: imagetaskwindow.cpp:571
void on_actionSave_Settings_Template_triggered()
Definition: imagetaskwindow.cpp:921
bool shouldKeepStepping() const
Definition: imagetaskwindow.cpp:747
task::ImageTask * getImageTask()
Definition: imagetaskwindow.cpp:566
TabletProximityEventFilter & getSharedTabletProximityEventFilterInstance()
getSharedTabletProximityEventFilterInstance Gets a reference to the shared instance of the tablet pro...
Definition: tabletproximityeventfilter.cpp:32
void saveSettingsTemplate(task::ImageTask *task, const std::string &path) const
Definition: imagetaskwindow.cpp:651
static std::vector< ImageTaskWindow * > getExistingImageTaskWindows()
getExistingImageTaskWindows Gets all of the existing image task windows.
Definition: imagetaskwindow.cpp:881
void setVectorViewVisibility(const bool visible)
Definition: imagetaskwindow.cpp:609
QString openSaveImageTaskSettingsDialog(QWidget *parent)
Definition: uiactions.cpp:220
QTimer m_timeRunningTimer
Whether to continually step i.e. whether to start another step after stepping once
Definition: imagetaskwindow.cpp:863
void revealLaunchWindow()
Definition: imagetaskwindow.cpp:580
void switchTargetImage(Bitmap &bitmap)
Definition: imagetaskwindow.cpp:779
virtual void setCommandHandlerName(const std::string &name) override
Definition: imagetaskwindow.cpp:896
The Command class provides a convenient way for a script to tell an object about something For exampl...
Definition: command.h:17
std::uint32_t getHeight() const
getHeight Gets the height of the images used by the image task.
Definition: imagetask.cpp:347
void on_actionReveal_Launch_Window_triggered()
Definition: imagetaskwindow.cpp:926
QImage createImage(const Bitmap &data)
createImage Creates an image from the bitmap data object. Assumes RGBA8888 format.
Definition: imageloader.cpp:48
std::string getImageTaskPreferencesAutoSavePath(const std::string &hashOfFirstTargetImage)
getImageTaskPreferencesAutoSavePath Gets the absolute path to where the image task preferences config...
Definition: imagetaskpreferences.cpp:24
std::vector< std::function< void()> > m_onPostStepCbs
Connection for the window to do work just after the image task finishes a step
Definition: imagetaskwindow.cpp:854
void disconnectTask()
Definition: imagetaskwindow.cpp:811
void setPixmapViewVisibility(const bool visible)
Definition: imagetaskwindow.cpp:597
The CommandHandler class provides an interface that all objects that can handle/process script comman...
Definition: commandhandler.h:19
void signal_onTargetImageMousePressEvent(double x, double y, bool ctrlModifier)
void populateUi()
Definition: imagetaskwindow.cpp:733
~ImageTaskWindowImpl()
Definition: imagetaskwindow.cpp:538
geometrize::task::ShapeCollection m_shapes
One-shot callbacks triggered when the image task finishes a step
Definition: imagetaskwindow.cpp:856
void processPostStepCbs()
Definition: imagetaskwindow.cpp:839
QString getApplicationVersionString()
getApplicationVersionString Gets the application version as a string in VERSION.MAJOR....
Definition: versioninfo.cpp:13
void signal_onTargetImageMouseReleaseEvent(double x, double y, bool ctrlModifier)
void setTargetPixmapOpacity(float opacity)
setTargetPixmapOpacity Sets the opacity of the target pixmap.
Definition: imagetaskscenemanager.cpp:163
void signal_onTargetImageKeyPressEvent(int key, bool ctrlModifier)
The CustomTabletEvent class represents a tablet event (specifically from a Wacom Pro pen) that can be...
Definition: customtabletevent.h:88
ImageTaskWindow()
Definition: imagetaskwindow.cpp:871
std::array< std::int32_t, 4 > getCustomImageTaskBackgroundOverrideColor() const
getCustomImageTaskBackgroundOverrideColor Gets the preference for the custom image task background ov...
Definition: globalpreferences.cpp:498
void fitScenesInViews(ImageTaskGraphicsView &pixmapView, ImageTaskGraphicsView &svgView)
fitScenesInViews Fits the scenes into their respective views.
Definition: imagetaskscenemanager.cpp:188
const std::vector< geometrize::ShapeResult > & getShapeVector() const
Definition: shapecollection.cpp:29
The ImageTaskGraphicsView class models a graphics view for viewing the images and shapes used and/or ...
Definition: imagetaskgraphicsview.h:22
static QString getApplicationName()
getApplicationName Gets the name of the application.
Definition: strings.cpp:9
void handleCommand(const geometrize::script::Command &command)
Definition: imagetaskwindow.cpp:669
void switchCurrentImage(Bitmap &bitmap)
Definition: imagetaskwindow.cpp:785
QPixmap createPixmap(const Bitmap &data)
createPixmap Creates a pixmap from the bitmap data object. Assumes RGBA8888 format.
Definition: imageloader.cpp:59
The GlobalPreferences class models the preferences associated with the application as a whole....
Definition: globalpreferences.h:44
void didLoadSettingsTemplate()
didLoadSettingsTemplate Signal dispatched immediately after a settings template is applied to the ima...
bool save(const std::string &filePath)
save Saves the image task preferences to a file.
Definition: imagetaskpreferences.cpp:230
Definition: commandlineparser.cpp:73
The ShapeCollection class is a wrapper for the vector of shapes that have been added to the image tas...
Definition: shapecollection.h:19
bool load(const std::string &filePath)
load Loads the image task preferences from a file.
Definition: imagetaskpreferences.cpp:225
virtual void handleCommand(const geometrize::script::Command &command) override
Definition: imagetaskwindow.cpp:886
std::string getCommand() const
Definition: command.cpp:15
void signal_onTargetImageTabletEvent(const geometrize::scene::CustomTabletEvent &event)
virtual std::string getCommandHandlerName() const override
Definition: imagetaskwindow.cpp:891
ImageTaskWindowImpl(const ImageTaskWindowImpl &)=delete
void clearModel()
Definition: imagetaskwindow.cpp:772
QMetaObject::Connection m_taskDidStepConnection
Connection for the window to do work just prior the image task starts a step
Definition: imagetaskwindow.cpp:853
void loadSettingsTemplate()
Definition: imagetaskwindow.cpp:621
void signal_onTargetImageWheelEvent(double x, double y, int amount, bool ctrlModifier)
std::string getCommandHandlerName() const
Definition: imagetaskwindow.cpp:727
void willSwitchImageTask(task::ImageTask *lastTask, task::ImageTask *nextTask)
willSwitchImageTask Signal dispatched immediately before an image task is set on the image task windo...
void setCommandHandlerName(const std::string &name)
Definition: imagetaskwindow.cpp:722
bool isRunning() const
Definition: imagetaskwindow.cpp:739
void close()
Definition: imagetaskwindow.cpp:561
void signal_onTargetImageKeyReleaseEvent(int key, bool ctrlModifier)
ImageTaskWindow * q
Definition: imagetaskwindow.cpp:848
geometrize::script::GeometrizerEngine & getGeometrizer()
getGeometrizer Gets a reference to the script-based engine used to turn images into shapes.
Definition: imagetask.cpp:402
void didSaveSettingsTemplate()
didSaveSettingsTemplate Signal dispatched immediately after a settings template based on the current ...
QTimer m_scriptEngineUpdateTimer
Resolution of the time running timer in milliseconds
Definition: imagetaskwindow.cpp:867
void signal_afterAppendShapes(const std::vector< geometrize::ShapeResult > &)
void signal_onTabletEnterProximity()
signal_onTabletEnterProximity Signal dispatched when a Wacom tablet enter proximity event is received
std::unique_ptr< Ui::ImageTaskWindow > ui
Definition: imagetaskwindow.cpp:847
Definition: imagetaskwindow.cpp:82
void stepModel()
Definition: imagetaskwindow.cpp:767
std::uint32_t getWidth() const
getWidth Gets the width of the images used by the image task.
Definition: imagetask.cpp:342
geometrize::scene::ImageTaskGraphicsView * m_svgView
The view that holds the raster/pixel-based scene
Definition: imagetaskwindow.cpp:860
void clearPostStepCbs()
Definition: imagetaskwindow.cpp:834
void signal_onTabletLeaveProximity()
signal_onTabletLeaveProximity Signal dispatched when a Wacom tablet leave proximity event is received
void setPreferences(preferences::ImageTaskPreferences preferences)
setPreferences Sets the preferences for this task.
Definition: imagetask.cpp:397
static std::vector< ImageTaskWindow * > getExistingImageTaskWindows()
Definition: imagetaskwindow.cpp:549
void on_actionLoad_Settings_Template_triggered()
Definition: imagetaskwindow.cpp:916
bool empty() const
Definition: shapecollection.cpp:13
QMetaObject::Connection m_taskPreferencesSetConnection
The image task currently set and manipulated via this window
Definition: imagetaskwindow.cpp:851
QMetaObject::Connection m_taskWillStepConnection
Connection for telling the dialog when the image task preferences are set
Definition: imagetaskwindow.cpp:852
void signal_onTargetImageHoverMoveEvent(double lastX, double lastY, double x, double y, bool ctrlModifier)
ImageTaskWindowImpl(ImageTaskWindow *pQ)
Definition: imagetaskwindow.cpp:84
void onLanguageChange()
Definition: imagetaskwindow.cpp:663
void changeEvent(QEvent *) override
Definition: imagetaskwindow.cpp:931
void signal_beforeAppendShapes(const std::vector< geometrize::ShapeResult > &)
virtual ~ImageTaskWindow()
Definition: imagetaskwindow.cpp:877
geometrize::scene::ImageTaskGraphicsView * m_pixmapView
Manager for scenes containing the pixmap/vector-based representations of the shapes etc
Definition: imagetaskwindow.cpp:859
void saveSettingsTemplate() const
Definition: imagetaskwindow.cpp:642
task::ImageTask * m_task
Definition: imagetaskwindow.cpp:850
void setConsoleVisibility(const bool visible)
Definition: imagetaskwindow.cpp:589
void setShouldKeepStepping(const bool stepping)
Definition: imagetaskwindow.cpp:752
The ImageTask class transforms a source image into a collection of shapes approximating the source im...
Definition: imagetask.h:53
void loadSettingsTemplate(task::ImageTask *task, const std::string &path)
Definition: imagetaskwindow.cpp:630
void on_actionExit_triggered()
Definition: imagetaskwindow.cpp:911
task::ImageTask * getImageTask()
getImageTask Gets a pointer to the current image task shown by the window.
Definition: imagetaskwindow.cpp:901
void addPostStepCb(const std::function< void()> &f)
Definition: imagetaskwindow.cpp:829
float m_timeRunning
Timer used to keep track of how long the image task has been in the "running" state
Definition: imagetaskwindow.cpp:864
void signal_sizeChanged(std::size_t to)
void setViews(ImageTaskGraphicsView &pixmapView, ImageTaskGraphicsView &svgView)
setViews Associates the given views with the scenes managed by this class.
Definition: imagetaskscenemanager.cpp:153
void appendShapes(const std::vector< geometrize::ShapeResult > &shapes)
Definition: shapecollection.cpp:34
bool isStepping() const
isStepping Returns true if the internal model is currently stepping.
Definition: imagetask.cpp:362
geometrize::preferences::GlobalPreferences & getGlobalPreferences()
getGlobalPreferences Shorthand function that gets a reference to the shared global preferences object...
Definition: globalpreferences.cpp:32
void signal_modelDidStep(std::vector< geometrize::ShapeResult > shapes)
signal_modelDidStep Signal that is emitted immediately after the underlying image task model is stepp...
The ImageTaskSceneManager manages the scenes representing the graphical state of the shapes It mostly...
Definition: imagetaskscenemanager.h:37
geometrize::preferences::ImageTaskPreferences & getPreferences()
getPreferences Gets a reference to the current preferences of this task.
Definition: imagetask.cpp:392
void signal_preferencesSet()
signal_preferencesSet Signal that is emitted immediately after the image task preferences are set.
void updateStats()
Definition: imagetaskwindow.cpp:791
void bringLaunchWindowToFront()
Definition: uiactions.cpp:56
void setTargetPixmap(const QPixmap &pixmap)
setTargetPixmap Sets the pixmap that provides the target/goal image visualization.
Definition: imagetaskscenemanager.cpp:158
The ImageTaskWindow class encapsulates the UI for manipiulating, running and viewing an image task th...
Definition: imagetaskwindow.h:31
geometrize::scene::ImageTaskSceneManager m_sceneManager
Collection of shapes added so far
Definition: imagetaskwindow.cpp:858
void setTargetImage(const QImage &image)
Definition: imagetaskwindow.cpp:824