11#include <QGraphicsObject>
12#include <QPainterPath>
35 enum {
Type = QGraphicsItem::UserType + 4 };
47 QString
text()
const {
return m_text; }
52 QPainterPath
shape()
const override;
54 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option, QWidget *widget)
override;
QString text() const
Returns the label text (the connected port's name).
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
PortHoverLabel(const QString &text, Side side, QGraphicsItem *parent=nullptr)
Constructs a label chip showing text, anchored at the item's origin (the port).
QPainterPath shape() const override
int type() const override
QRectF boundingRect() const override
Side
Which side of the port the chip is biased towards, away from the element body.