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

The ImageTaskPixmapGraphicsItem class models a pixmap graphic item that goes into the scene for an image task. This usually represents a pixmap of the working image that is being transformed into shapes. More...

#include <imagetaskpixmapgraphicsitem.h>

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

Signals

void signal_onCustomTabletEvent (const geometrize::scene::CustomTabletEvent &event)
 
void signal_onHoverMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onMousePressEvent (double x, double y, bool ctrlModifier)
 
void signal_onMouseMoveEvent (double lastX, double lastY, double x, double y, bool ctrlModifier)
 
void signal_onMouseReleaseEvent (double x, double y, bool ctrlModifier)
 
void signal_onWheelEvent (double x, double y, int amount, bool ctrlModifier)
 
void signal_onKeyPressEvent (int key, bool ctrlModifier)
 
void signal_onKeyReleaseEvent (int key, bool ctrlModifier)
 
void signal_onFocusInEvent ()
 
void signal_onFocusOutEvent ()
 

Public Member Functions

 ImageTaskPixmapGraphicsItem ()
 
 ImageTaskPixmapGraphicsItem (const QPixmap &pixmap)
 
virtual ~ImageTaskPixmapGraphicsItem ()
 

Protected Member Functions

bool sceneEvent (QEvent *event) override
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *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 ImageTaskPixmapGraphicsItem class models a pixmap graphic item that goes into the scene for an image task. This usually represents a pixmap of the working image that is being transformed into shapes.

Constructor & Destructor Documentation

geometrize::scene::ImageTaskPixmapGraphicsItem::ImageTaskPixmapGraphicsItem ( )
19  : QGraphicsPixmapItem()
20 {
21  setAcceptHoverEvents(true);
22  setAcceptTouchEvents(true);
23  setFlag(ItemIsMovable, false);
24  setFlag(ItemIsSelectable, true); // To receive mouse events
25  setFlag(ItemIsFocusable, true); // To receive key events (need focus first of course)
26  setZValue(1000);
27 
28  // Allows the pixmap to receive events even when the opacity is set to 0
29  setShapeMode(QGraphicsPixmapItem::BoundingRectShape);
30 }
geometrize::scene::ImageTaskPixmapGraphicsItem::ImageTaskPixmapGraphicsItem ( const QPixmap &  pixmap)
explicit
32  : QGraphicsPixmapItem(pixmap)
33 {
34 }
geometrize::scene::ImageTaskPixmapGraphicsItem::~ImageTaskPixmapGraphicsItem ( )
virtual
37 {
38 }

Member Function Documentation

void geometrize::scene::ImageTaskPixmapGraphicsItem::focusInEvent ( QFocusEvent *  event)
overrideprotected
93 {
94  QGraphicsPixmapItem::focusInEvent(event);
95  emit signal_onFocusInEvent();
96 }
void geometrize::scene::ImageTaskPixmapGraphicsItem::focusOutEvent ( QFocusEvent *  event)
overrideprotected
99 {
100  QGraphicsPixmapItem::focusOutEvent(event);
101  emit signal_onFocusOutEvent();
102 }
void geometrize::scene::ImageTaskPixmapGraphicsItem::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
overrideprotected
51 {
52  QGraphicsPixmapItem::hoverMoveEvent(event);
53  emit signal_onHoverMoveEvent(event->lastScenePos().x(), event->lastScenePos().y(), event->scenePos().x(), event->scenePos().y(), event->modifiers() & Qt::ControlModifier);
54 }
void signal_onHoverMoveEvent(double lastX, double lastY, double x, double y, bool ctrlModifier)
void geometrize::scene::ImageTaskPixmapGraphicsItem::keyPressEvent ( QKeyEvent *  event)
overrideprotected
81 {
82  QGraphicsPixmapItem::keyPressEvent(event);
83  emit signal_onKeyPressEvent(event->key(), event->modifiers() & Qt::ControlModifier);
84 }
void signal_onKeyPressEvent(int key, bool ctrlModifier)
void geometrize::scene::ImageTaskPixmapGraphicsItem::keyReleaseEvent ( QKeyEvent *  event)
overrideprotected
87 {
88  QGraphicsPixmapItem::keyReleaseEvent(event);
89  emit signal_onKeyReleaseEvent(event->key(), event->modifiers() & Qt::ControlModifier);
90 }
void signal_onKeyReleaseEvent(int key, bool ctrlModifier)
void geometrize::scene::ImageTaskPixmapGraphicsItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
69 {
70  QGraphicsPixmapItem::mouseMoveEvent(event);
71  emit signal_onMouseMoveEvent(event->lastScenePos().x(), event->lastScenePos().y(), event->scenePos().x(), event->scenePos().y(), event->modifiers() & Qt::ControlModifier);
72 }
void signal_onMouseMoveEvent(double lastX, double lastY, double x, double y, bool ctrlModifier)
void geometrize::scene::ImageTaskPixmapGraphicsItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
57 {
58  QGraphicsPixmapItem::mousePressEvent(event);
59  emit signal_onMousePressEvent(event->scenePos().x(), event->scenePos().y(), event->modifiers() & Qt::ControlModifier);
60 }
void signal_onMousePressEvent(double x, double y, bool ctrlModifier)
void geometrize::scene::ImageTaskPixmapGraphicsItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected
63 {
64  QGraphicsPixmapItem::mouseReleaseEvent(event);
65  emit signal_onMouseReleaseEvent(event->scenePos().x(), event->scenePos().y(), event->modifiers() & Qt::ControlModifier);
66 }
void signal_onMouseReleaseEvent(double x, double y, bool ctrlModifier)
bool geometrize::scene::ImageTaskPixmapGraphicsItem::sceneEvent ( QEvent *  event)
overrideprotected
41 {
42  // Handle custom tablet events forwarded from the ImageTaskScene
44  emit signal_onCustomTabletEvent(*static_cast<geometrize::scene::CustomTabletEvent*>(event));
45  return true;
46  }
47  return QGraphicsPixmapItem::sceneEvent(event);
48 }
void signal_onCustomTabletEvent(const geometrize::scene::CustomTabletEvent &event)
static const int customEventId
CustomTabletEventTypeId is the id for the corresponding custom tablet event type. ...
Definition: customtabletevent.h:93
void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onCustomTabletEvent ( const geometrize::scene::CustomTabletEvent event)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onFocusInEvent ( )
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onFocusOutEvent ( )
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onHoverMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onKeyPressEvent ( int  key,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onKeyReleaseEvent ( int  key,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onMouseMoveEvent ( double  lastX,
double  lastY,
double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onMousePressEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onMouseReleaseEvent ( double  x,
double  y,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::signal_onWheelEvent ( double  x,
double  y,
int  amount,
bool  ctrlModifier 
)
signal

Here is the caller graph for this function:

void geometrize::scene::ImageTaskPixmapGraphicsItem::wheelEvent ( QGraphicsSceneWheelEvent *  event)
overrideprotected
75 {
76  QGraphicsPixmapItem::wheelEvent(event);
77  emit signal_onWheelEvent(event->scenePos().x(), event->scenePos().y(), event->delta(), event->modifiers() & Qt::ControlModifier);
78 }
void signal_onWheelEvent(double x, double y, int amount, bool ctrlModifier)

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