#ifndef __PIPELINEEDITOR__NODE__H__ #define __PIPELINEEDITOR__NODE__H__ #include #include // Some forward declarations class QGraphicsSceneMouseEvent; class QGraphicsSceneHoverEvent; // Some forward declarations namespace cpPlugins { namespace Interface { class Object; } } namespace PipelineEditor { // Some other forward declarations class Edge; class GraphCanvas; /** */ class Node : public QGraphicsItem { public: Node( GraphCanvas* canvas, cpPlugins::Interface::Object* object ); virtual ~Node( ); void addEdge( Edge* edge ); QList< Edge* > edges( ) const; QRectF boundingRect( ) const; QPainterPath shape( ) const; void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget ); protected: QVariant itemChange( GraphicsItemChange change, const QVariant& value ); void mousePressEvent( QGraphicsSceneMouseEvent* event ); void mouseReleaseEvent( QGraphicsSceneMouseEvent* event ); void mouseDoubleClickEvent( QGraphicsSceneMouseEvent* event ); void hoverMoveEvent( QGraphicsSceneHoverEvent* event ); private: GraphCanvas* m_Canvas; QList< Edge* > m_Edges; cpPlugins::Interface::Object* m_Object; mutable QString m_Label; mutable QRectF m_Bounds; mutable bool m_UpdatedBounds; }; } // ecapseman #endif // __PIPELINEEDITOR__NODE__H__ // eof - $RCSfile$