25 #include "../widgets/EditMatrixWidget.h"
26 #include "../widgets/IntEnumWidget.h"
27 #include "../widgets/QuaternionWidget.h"
35 #include "../AronTreeWidgetItem.h"
37 #include "../ListDictHelper.h"
44 parentOfCreatedObj(parentInstance)
51 toplevelWidget = aronParent->treeWidget();
56 AronTreeWidgetCreatorVisitor::generateUniqueKeyFromSet(std::set<std::string>&& usedKeys)
61 std::string proposedName = this->defaultMapKeyName +
std::to_string(num);
62 auto it = usedKeys.find(proposedName);
63 if (it == usedKeys.end())
77 auto key = i->getPath().getLastElement();
78 bool isDictChild =
false;
84 std::set<std::string> usedKeys;
85 for (
int i = 0; i < parentOfCreatedObj->childCount(); ++i)
90 usedKeys.insert(sibling->text(0).toStdString());
93 key = generateUniqueKeyFromSet(std::move(usedKeys));
96 else if (aronParent &&
113 QString::fromStdString(
114 aron_tree_widget::constantes::
117 if (editableValue || isDictChild)
129 auto key = i->getObjectName();
130 if (i->getPath().hasElement())
132 key = i->getPath().getLastElement();
145 for (
const auto& [key,
value] : i->getMemberTypes())
150 assert(
v.createdQWidgetItem);
171 for (
size_t i = 0; i < 2; ++i)
175 if (
v.createdQWidgetItem)
178 v.createdQWidgetItem->setText(0, descr.c_str());
190 for (
size_t i = 0; i < tuple->getChildren().size(); ++i)
194 if (
v.createdQWidgetItem)
197 v.createdQWidgetItem->setText(0, descr.c_str());
219 editableValue =
false;
223 switch (i->getElementType())
225 case armarx::aron::type::matrix::UINT8:
228 case armarx::aron::type::matrix::UINT16:
231 case armarx::aron::type::matrix::UINT32:
234 case armarx::aron::type::matrix::INT8:
237 case armarx::aron::type::matrix::INT16:
240 case armarx::aron::type::matrix::INT32:
243 case armarx::aron::type::matrix::INT64:
246 case armarx::aron::type::matrix::FLOAT32:
249 case armarx::aron::type::matrix::FLOAT64:
267 editableValue =
false;
271 switch (i->getElementType())
273 case armarx::aron::type::quaternion::FLOAT32:
276 case armarx::aron::type::quaternion::FLOAT64:
304 editableValue =
false;
316 editableValue =
true;
323 editableValue =
true;
330 editableValue =
true;
337 editableValue =
true;
344 editableValue =
true;
357 ARMARX_WARNING_S <<
"Received an unknown type when trying to create a tree view widget for "
358 "a skill argument type.";
364 toplevelWidget = widget;