35 connect(_ui.pushButtonElementAdd, &QPushButton::clicked,
this,
36 &ArVizDrawerGuiWidgetController::on_pushButtonElementAdd_clicked);
40 _factory[
"Pose" ] = [] {
return new PoseWidget ; };
42 for (
const auto& [key, _] : _factory)
44 _ui.comboBoxElement->addItem(QString::fromStdString(key));
59 void ArVizDrawerGuiWidgetController::on_pushButtonElementAdd_clicked()
61 const auto name = _ui.comboBoxElement->currentText().toStdString();
62 auto* ptr = _factory.at(name)();
63 _ui.verticalLayoutElements->addWidget(ptr);
64 _elements.emplace(ptr);
74 for (
auto* elem : _elements)
78 _ui.verticalLayoutElements->removeWidget(elem);
80 _elements.erase(elem);