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 | Private Attributes | List of all members
geometrize::scene::ImageTaskSceneManager Class Reference

The ImageTaskSceneManager manages the scenes representing the graphical state of the shapes It mostly works to synchronize their state and provide a single interface for handling scene events. More...

#include <imagetaskscenemanager.h>

Inheritance diagram for geometrize::scene::ImageTaskSceneManager:
Inheritance graph
[legend]
Collaboration diagram for geometrize::scene::ImageTaskSceneManager:
Collaboration graph
[legend]

Classes

class  ImageTaskSceneManagerImpl
 

Signals

void signal_onTargetImageTabletEvent (const geometrize::scene::CustomTabletEvent &event)
 
void signal_onTargetImageHoverMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onTargetImageMousePressEvent (double x, double y, bool ctrlModifier)
 
void signal_onTargetImageMouseMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onTargetImageMouseReleaseEvent (double x, double y, bool ctrlModifier)
 
void signal_onTargetImageWheelEvent (double x, double y, int amount, bool ctrlModifier)
 
void signal_onTargetImageKeyPressEvent (int key, bool ctrlModifier)
 
void signal_onTargetImageKeyReleaseEvent (int key, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeHoverMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeMousePressEvent (double x, double y, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeMouseMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeMouseReleaseEvent (double x, double y, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeMouseWheelEvent (double x, double y, int amount, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeKeyPressEvent (int key, bool ctrlModifier)
 
void signal_onAreaOfInfluenceShapeKeyReleaseEvent (int key, bool ctrlModifier)
 

Public Member Functions

 ImageTaskSceneManager ()
 
virtual ~ImageTaskSceneManager ()
 
void setViews (ImageTaskGraphicsView &pixmapView, ImageTaskGraphicsView &svgView)
 setViews Associates the given views with the scenes managed by this class. More...
 
void setTargetPixmap (const QPixmap &pixmap)
 setTargetPixmap Sets the pixmap that provides the target/goal image visualization. More...
 
void setTargetPixmapOpacity (float opacity)
 setTargetPixmapOpacity Sets the opacity of the target pixmap. More...
 
void updateScenes (const QPixmap &pixmap, const std::vector< geometrize::ShapeResult > &shapes)
 updateScenes Updates the scenes to show the latest image/shapes. More...
 
void reset ()
 reset Resets the state of the scenes, removing shapes etc. More...
 
void fitPixmapSceneInView (ImageTaskGraphicsView &pixmapView)
 fitPixmapSceneInView Fits the pixmap scene into the given view. More...
 
void fitVectorSceneInView (ImageTaskGraphicsView &svgView)
 fitVectorSceneInView Fits the SVG/vector scene into the given view. More...
 
void fitScenesInViews (ImageTaskGraphicsView &pixmapView, ImageTaskGraphicsView &svgView)
 fitScenesInViews Fits the scenes into their respective views. More...
 
void setAreaOfInfluenceShape (const geometrize::Shape &shape)
 setAreaOfInfluenceShape Sets up a area of influence visual for the given shape. More...
 

Private Attributes

std::unique_ptr
< ImageTaskSceneManagerImpl
d
 

Detailed Description

The ImageTaskSceneManager manages the scenes representing the graphical state of the shapes It mostly works to synchronize their state and provide a single interface for handling scene events.

Constructor & Destructor Documentation

geometrize::scene::ImageTaskSceneManager::ImageTaskSceneManager ( )
145  : d{std::make_unique<ImageTaskSceneManager::ImageTaskSceneManagerImpl>(this)}
146 {
147 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
geometrize::scene::ImageTaskSceneManager::~ImageTaskSceneManager ( )
virtual
150 {
151 }

Member Function Documentation

void geometrize::scene::ImageTaskSceneManager::fitPixmapSceneInView ( ImageTaskGraphicsView pixmapView)

fitPixmapSceneInView Fits the pixmap scene into the given view.

Parameters
pixmapViewThe view to fit the scene into.
179 {
180  d->fitPixmapSceneInView(pixmapView);
181 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::fitScenesInViews ( ImageTaskGraphicsView pixmapView,
ImageTaskGraphicsView svgView 
)

fitScenesInViews Fits the scenes into their respective views.

Parameters
pixmapViewThe pixmap-based view.
svgViewThe vector/SVG-based view.
189 {
190  d->fitScenesInViews(pixmapView, svgView);
191 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::fitVectorSceneInView ( ImageTaskGraphicsView svgView)

fitVectorSceneInView Fits the SVG/vector scene into the given view.

Parameters
svgViewThe view to fit the scene into.
184 {
185  d->fitVectorSceneInView(svgView);
186 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::reset ( )

reset Resets the state of the scenes, removing shapes etc.

174 {
175  d->reset();
176 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::setAreaOfInfluenceShape ( const geometrize::Shape &  shape)

setAreaOfInfluenceShape Sets up a area of influence visual for the given shape.

Parameters
shapeThe area of influence shape.
194 {
195  d->setAreaOfInfluenceShape(shape);
196 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::setTargetPixmap ( const QPixmap &  pixmap)

setTargetPixmap Sets the pixmap that provides the target/goal image visualization.

Parameters
pixmapThe pixmap to set as the target/goal image visualization.
159 {
160  d->setTargetPixmap(pixmap);
161 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::setTargetPixmapOpacity ( float  opacity)

setTargetPixmapOpacity Sets the opacity of the target pixmap.

Parameters
opacityThe opacity value.
164 {
165  d->setTargetPixmapOpacity(opacity);
166 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119
void geometrize::scene::ImageTaskSceneManager::setViews ( ImageTaskGraphicsView pixmapView,
ImageTaskGraphicsView svgView 
)

setViews Associates the given views with the scenes managed by this class.

Parameters
pixmapViewThe pixmap view that will display the pixmap-based view.
svgViewThe svg-based view that will display the vector graphics-based SVG view.
154 {
155  d->setViews(pixmapView, svgView);
156 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeHoverMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeKeyPressEvent ( int  key,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeKeyReleaseEvent ( int  key,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeMouseMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeMousePressEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeMouseReleaseEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onAreaOfInfluenceShapeMouseWheelEvent ( double  x,
double  y,
int  amount,
bool  ctrlModifier 
)
signal
void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageHoverMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageKeyPressEvent ( int  key,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageKeyReleaseEvent ( int  key,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageMouseMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageMousePressEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageMouseReleaseEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageTabletEvent ( const geometrize::scene::CustomTabletEvent event)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::signal_onTargetImageWheelEvent ( double  x,
double  y,
int  amount,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSceneManager::updateScenes ( const QPixmap &  pixmap,
const std::vector< geometrize::ShapeResult > &  shapes 
)

updateScenes Updates the scenes to show the latest image/shapes.

Parameters
pixmapThe target pixmap.
shapesThe shapes added to the scene.
169 {
170  d->updateScenes(pixmap, shapes);
171 }
std::unique_ptr< ImageTaskSceneManagerImpl > d
Definition: imagetaskscenemanager.h:119

Member Data Documentation

std::unique_ptr<ImageTaskSceneManagerImpl> geometrize::scene::ImageTaskSceneManager::d
private

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