|
|
| PortItem (const Process::Port &p, const Process::Context &ctx, QGraphicsItem *parent) |
| |
|
const Process::Port & | port () const |
| |
|
virtual void | setupMenu (QMenu &, const score::DocumentContext &ctx) |
| |
|
void | setPortVisible (bool b) |
| |
|
void | resetPortVisible () |
| |
|
void | resetDrop () |
| |
|
void | setHighlight (bool b) |
| |
| QRectF | drawnRect () const noexcept |
| |
|
int | type () const final override |
| |
|
QPointF | sceneCenter () const noexcept |
| | portCenter() in scene coordinates, taking the item's transform into account.
|
| |
|
QRectF | boundingRect () const override |
| |
|
QPainterPath | shape () const override |
| |
|
bool | contains (const QPointF &point) const override |
| |
|
void | createCable (PortItem *src, PortItem *snk) |
| |
|
void | contextMenuRequested (QPointF scenepos, QPoint pos) |
| |
|
| static constexpr QPointF | portCenter () noexcept |
| |
|
static const QPixmap & | portImage (Process::PortType t, bool inlet, bool smol, bool light, bool addr) noexcept |
| |
|
|
AddressPropagationItem * | m_address {} |
| |
|
double | m_diam = 8. |
| |
|
bool | m_visible {true} |
| |
|
bool | m_inlet {true} |
| |
|
bool | m_highlight {true} |
| |
|
|
static PortItem * | clickedPort |
| |
|
static const constexpr int | Type = QGraphicsItem::UserType + 700 |
| |
|
static constexpr double | hitRadius = 5.5 |
| | Radius of the clickable zone around portCenter().
|
| |
|
|
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override |
| |
|
void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| |
|
void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| |
|
void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| |
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) final override |
| |
|
void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) final override |
| |
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) final override |
| |
|
void | dragEnterEvent (QGraphicsSceneDragDropEvent *event) final override |
| |
|
void | dragMoveEvent (QGraphicsSceneDragDropEvent *event) final override |
| |
|
void | dragLeaveEvent (QGraphicsSceneDragDropEvent *event) final override |
| |
|
void | keyPressEvent (QKeyEvent *event) override |
| |
|
void | keyReleaseEvent (QKeyEvent *event) override |
| |
|
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| |
|
|
class | Dataflow::CableItem |
| |
◆ drawnRect()
| QRectF Dataflow::PortItem::drawnRect |
( |
| ) |
const |
|
inlinenoexcept |
What paint() actually draws, as opposed to boundingRect(), which is deliberately larger. The ellipse is inset by one pixel at the small size and by three at the large one; see PortStyle in the .cpp.
◆ portCenter()
| static constexpr QPointF Dataflow::PortItem::portCenter |
( |
| ) |
|
|
inlinestaticconstexprnoexcept |
Center of the drawn port circle, in item coordinates. Cables, the drag line and magnetic snapping all anchor on this point.
The documentation for this class was generated from the following files: