22 #include "PixelData.hpp"
24 #include <QGraphicsItem>
29 class FotoSHOCKOperation;
30 namespace FotoSHOCKcore {
31 class ImageOperationDescriptor;
38 enum Type {INPUT, OUTPUT};
42 virtual void paint (QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
43 virtual QRectF boundingRect()
const;
45 virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
46 virtual void dropEvent (QGraphicsSceneDragDropEvent* event);
48 virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* event);
49 virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* event);
51 Type connectorType()
const;
55 void addEdge(
Edge* edge);
71 class
Node : public QGraphicsItem {
82 QGraphicsScene* parentScene()
const;
84 virtual void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget = 0);
87 virtual QRectF boundingRect()
const;
95 QVector<Connector*> inputConnectors()
const;
96 QVector<Connector*> outputConnectors()
const;
101 virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event);
105 virtual QVariant itemChange(GraphicsItemChange change,
const QVariant& value);
132 QGraphicsScene* m_parentScene;
136 QRectF m_boundingRectangle;