Geometrize  1.0
An application for geometrizing images into geometric primitives
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< ImageTaskSvgSceneImpld
 

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

◆ ImageTaskSvgScene()

geometrize::scene::ImageTaskSvgScene::ImageTaskSvgScene ( )
61  : ImageTaskScene(), d{std::make_unique<ImageTaskSvgScene::ImageTaskSvgSceneImpl>(this)}
62 {
63 }

◆ ~ImageTaskSvgScene()

geometrize::scene::ImageTaskSvgScene::~ImageTaskSvgScene ( )
virtual
66 {
67 }

Member Function Documentation

◆ addShapes()

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.
70 {
71  d->addShapes(shapes, width, height);
72 }
Here is the caller graph for this function:

◆ removeShapes()

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

removeShapes Removes all shapes from the scene.

75 {
76  d->removeShapes();
77 }
Here is the caller graph for this function:

Member Data Documentation

◆ d

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

The documentation for this class was generated from the following files:
geometrize::scene::ImageTaskScene::ImageTaskScene
ImageTaskScene(QObject *parent=nullptr)
Definition: imagetaskscene.cpp:84
geometrize::scene::ImageTaskSvgScene::d
std::unique_ptr< ImageTaskSvgSceneImpl > d
Definition: imagetasksvgscene.h:46