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

The ImageTaskSvgScene class models a graphics scene for viewing the shape data of an image task as an SVG. More...

#include <imagetasksvgscene.h>

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

Classes

class  ImageTaskSvgSceneImpl
 

Public Member Functions

 ImageTaskSvgScene ()
 
virtual ~ImageTaskSvgScene ()
 
void addShapes (const std::vector< geometrize::ShapeResult > &shapes, const std::uint32_t width, const std::uint32_t height)
 addShapes Updates the SVG data based on the given shapes. More...
 
void removeShapes ()
 removeShapes Removes all shapes from the scene. More...
 
- Public Member Functions inherited from geometrize::scene::ImageTaskScene
 ImageTaskScene (QObject *parent=nullptr)
 
virtual ~ImageTaskScene ()
 
void setTargetPixmapOpacity (float opacity)
 setTargetPixmapOpacity Sets the opacity of the target pixmap. More...
 
void setTargetPixmap (const QPixmap &pixmap)
 setTargetPixmap Sets the pixmap that provides the target/goal image visualization. More...
 
ImageTaskPixmapGraphicsItemgetTargetPixmapItem ()
 getTargetPixmapItem Gets a refernece to the graphics item that houses the target pixmap. More...
 
void setOverlayShape (SvgItem *item)
 setOverlayItem Sets the given overlay shape upon the scene. More...
 
void setOverlayShapeVisibility (bool visible)
 setOverlayShapeVisibility Whether the overlay shape(s) in the scene should be visible. More...
 

Private Attributes

std::unique_ptr
< ImageTaskSvgSceneImpl
d
 

Additional Inherited Members

- Protected Member Functions inherited from geometrize::scene::ImageTaskScene
bool event (QEvent *event) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override
 
void wheelEvent (QGraphicsSceneWheelEvent *event) override
 
void keyPressEvent (QKeyEvent *event) override
 
void keyReleaseEvent (QKeyEvent *event) override
 
void focusInEvent (QFocusEvent *event) override
 
void focusOutEvent (QFocusEvent *event) override
 

Detailed Description

The ImageTaskSvgScene class models a graphics scene for viewing the shape data of an image task as an SVG.

Constructor & Destructor Documentation

geometrize::scene::ImageTaskSvgScene::ImageTaskSvgScene ( )
60  : ImageTaskScene(), d{std::make_unique<ImageTaskSvgScene::ImageTaskSvgSceneImpl>(this)}
61 {
62 }
std::unique_ptr< ImageTaskSvgSceneImpl > d
Definition: imagetasksvgscene.h:46
ImageTaskScene(QObject *parent=nullptr)
Definition: imagetaskscene.cpp:83
geometrize::scene::ImageTaskSvgScene::~ImageTaskSvgScene ( )
virtual
65 {
66 }

Member Function Documentation

void geometrize::scene::ImageTaskSvgScene::addShapes ( const std::vector< geometrize::ShapeResult > &  shapes,
const std::uint32_t  width,
const std::uint32_t  height 
)

addShapes Updates the SVG data based on the given shapes.

Parameters
shapesThe shapes to draw in the scene.
widthThe width of the SVG.
heightThe height of the SVG.
69 {
70  d->addShapes(shapes, width, height);
71 }
std::unique_ptr< ImageTaskSvgSceneImpl > d
Definition: imagetasksvgscene.h:46

Here is the caller graph for this function:

void geometrize::scene::ImageTaskSvgScene::removeShapes ( )

removeShapes Removes all shapes from the scene.

74 {
75  d->removeShapes();
76 }
std::unique_ptr< ImageTaskSvgSceneImpl > d
Definition: imagetasksvgscene.h:46

Here is the caller graph for this function:

Member Data Documentation

std::unique_ptr<ImageTaskSvgSceneImpl> geometrize::scene::ImageTaskSvgScene::d
private

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