| 14 | } |
| 15 | |
| 16 | void ConfigPanelHost::setConfigWidget(QWidget* widget) { |
| 17 | if (current_widget_ == widget) { |
| 18 | return; |
| 19 | } |
| 20 | clear(); |
| 21 | if (widget == nullptr) { |
| 22 | return; |
| 23 | } |
| 24 | widget->setParent(this); |
| 25 | layout_->addWidget(widget); |
| 26 | current_widget_ = widget; |
| 27 | } |
| 28 | |
| 29 | void ConfigPanelHost::clear() { |
| 30 | if (current_widget_ == nullptr) { |
no outgoing calls