| 1577 | } |
| 1578 | |
| 1579 | std::vector<CableWidget*> RackWidget::getCablesOnPort(PortWidget* port) { |
| 1580 | assert(port); |
| 1581 | std::vector<CableWidget*> cws; |
| 1582 | for (widget::Widget* w : internal->plugContainer->children) { |
| 1583 | PlugWidget* plug = dynamic_cast<PlugWidget*>(w); |
| 1584 | assert(plug); |
| 1585 | CableWidget* cw = plug->getCable(); |
| 1586 | PortWidget* port2 = cw->getPort(plug->getType()); |
| 1587 | if (port2 == port) |
| 1588 | cws.push_back(cw); |
| 1589 | } |
| 1590 | return cws; |
| 1591 | } |
| 1592 | |
| 1593 | std::vector<CableWidget*> RackWidget::getCompleteCablesOnPort(PortWidget* port) { |
| 1594 | assert(port); |