prepareGeometryChange bugfix; more arrows code

This commit is contained in:
Max-Wilhelm Bruker 2009-10-20 23:20:07 +02:00
parent 961b42f734
commit c57e138a78
13 changed files with 289 additions and 87 deletions

View file

@ -11,14 +11,22 @@ class ArrowItem : public QObject, public QGraphicsItem {
private:
QPainterPath path;
protected:
QColor color;
int id;
CardItem *startItem, *targetItem;
QColor color;
bool fullColor;
public:
ArrowItem(CardItem *_startItem = 0, CardItem *_targetItem = 0);
ArrowItem(int id, CardItem *_startItem = 0, CardItem *_targetItem = 0, const QColor &color = Qt::red);
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
QRectF boundingRect() const { return path.boundingRect(); }
void updatePath();
void updatePath(const QPointF &endPoint);
int getId() const { return id; }
void setStartItem(CardItem *_item) { startItem = _item; }
void setTargetItem(CardItem *_item) { targetItem = _item; }
CardItem *getStartItem() const { return startItem; }
CardItem *getTargetItem() const { return targetItem; }
};
class ArrowDragItem : public ArrowItem {