Loading...
Searching...
No Matches
Public Types |
Public Member Functions |
Static Public Member Functions |
Static Public Attributes |
List of all members
Dataflow::CableItem Class Referencefinal
Inheritance diagram for Dataflow::CableItem:
Public Types | |
| enum class | GrabbedEnd : uint8_t { None , Source , Sink } |
Public Member Functions | |
| CableItem (const Process::Cable &c, const Process::Context &ctx, QGraphicsItem *parent=nullptr) | |
| const Id< Process::Cable > & | id () const |
| const Process::Cable & | model () const |
| int | type () const final override |
| void | resize () |
| void | check () |
| PortItem * | source () const noexcept |
| PortItem * | target () const noexcept |
| void | setSource (PortItem *p) |
| void | setTarget (PortItem *p) |
| void | resetDrop () |
| void | setDropTarget (bool b) |
| Highlight this cable as the one a node being dragged would land in. | |
| void | dropReceived (const QPointF &pos, const QMimeData &arg_2) |
Static Public Member Functions | |
| static GrabbedEnd | endNear (QPointF scenePos, QPointF p1, QPointF p2) noexcept |
| static double | grabZoneRadius (QPointF p1, QPointF p2) noexcept |
Static Public Attributes | |
| static bool | g_cables_enabled = true |
| static const constexpr int | Type = QGraphicsItem::UserType + 9999 |
Member Function Documentation
◆ endNear()
|
staticnoexcept |
Which end a press at scenePos would unplug and re-route. Both ends match on a cable too short to tell them apart; the sink wins there, as that is the end one usually means to move.
◆ grabZoneRadius()
|
staticnoexcept |
How far from an end a press still grabs it. The innermost pixels belong to the port, which starts a new cable instead, so the zone has to clear PortItem::hitRadius by enough to be aimed at without magnifying the view.
The documentation for this class was generated from the following files:
- CableItem.hpp
- CableItem.cpp