You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 line
492 B

  1. #ifndef CONNECTION_H
  2. #define CONNECTION_H
  3. #include <QGraphicsLineItem>
  4. #include "item.h"
  5. class Connection : public QGraphicsLineItem
  6. {
  7. public:
  8. Connection(Item* from, Item::AnchorType fromType,
  9. Item* to, Item::AnchorType toType, QGraphicsItem* parent = nullptr);
  10. void updatePosition();
  11. void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *) override;
  12. Item *from_, *to_;
  13. Item::AnchorType fromType_, toType_;
  14. };
  15. #endif // CONNECTION_H