23 #ifndef KDGANTTGRAPHICSITEM_H
24 #define KDGANTTGRAPHICSITEM_H
29 #include <QGraphicsItem>
31 #include <QPersistentModelIndex>
34 class QGraphicsLineItem;
39 class ConstraintGraphicsItem;
44 enum {
Type = UserType + 42 };
53 void updateItem(
const Span& rowgeometry,
const QPersistentModelIndex& idx );
60 QRectF
rect()
const {
return m_rect; }
61 void setRect(
const QRectF& r );
66 const QPersistentModelIndex&
index()
const {
return m_index; }
67 void setIndex(
const QPersistentModelIndex& idx );
80 void paint( QPainter* painter,
const QStyleOptionGraphicsItem* option,
83 QVariant
itemChange( GraphicsItemChange,
const QVariant& value );
96 QPointF startConnector(
int relationType )
const;
97 QPointF endConnector(
int relationType )
const;
98 void updateConstraintItems();
101 void updateItemFromMouse(
const QPointF& scenepos );
102 void constraintsChanged();
105 QRectF m_boundingrect;
106 QPersistentModelIndex m_index;
110 QPointF m_pressscenepos;
111 QGraphicsLineItem* m_dragline;