| 72 | std::function<AbstractWidget *()> createDWidgetFunc; |
| 73 | |
| 74 | DWidget *getDWidget() |
| 75 | { |
| 76 | if (!widget) { |
| 77 | if (createDWidgetFunc) { |
| 78 | auto abstractWidget = createDWidgetFunc(); |
| 79 | icon = abstractWidget->getDisplayIcon(); |
| 80 | widget = static_cast<DWidget *>(abstractWidget->qWidget()); |
| 81 | Q_ASSERT(widget); |
| 82 | if (!widget->parent()) |
| 83 | widget->setParent(Controller::instance()->mainWindow()); |
| 84 | } |
| 85 | } |
| 86 | return widget; |
| 87 | } |
| 88 | |
| 89 | void setWidget(DWidget *widget) |
| 90 | { |
nothing calls this directly
no test coverage detected