| 714 | } |
| 715 | |
| 716 | std::vector<ModuleWidget*> RackWidget::getModules() { |
| 717 | std::vector<ModuleWidget*> mws; |
| 718 | mws.reserve(internal->moduleContainer->children.size()); |
| 719 | for (widget::Widget* w : internal->moduleContainer->children) { |
| 720 | ModuleWidget* mw = dynamic_cast<ModuleWidget*>(w); |
| 721 | assert(mw); |
| 722 | mws.push_back(mw); |
| 723 | } |
| 724 | return mws; |
| 725 | } |
| 726 | |
| 727 | bool RackWidget::hasModules() { |
| 728 | return internal->moduleContainer->children.empty(); |