14 #include <QStandardItemModel>
33 {
"region", &RegionWrapper::staticMetaObject, { } },
34 {
"map", &CREMapInformation::staticMetaObject, { } },
35 {
"archetype", &ArchetypeWrapper::staticMetaObject, { {
"clone", &ObjectWrapper::staticMetaObject, { } } } },
36 {
"artifact", &ArtifactWrapper::staticMetaObject, { } },
37 {
"treasurelist", &TreasureListWrapper::staticMetaObject, { } },
38 {
"face", &FaceWrapper::staticMetaObject, { } },
39 {
"quest", &QuestWrapper::staticMetaObject, { } },
48 std::map<QString, QStandardItem *> fields;
50 auto property =
data.meta->property(
index);
51 if (fields.cend() == fields.find(property.name())) {
52 fields[
property.name()] =
new QStandardItem(property.name());
53 root->appendRow(fields[property.name()]);
55 for (
const auto &sub :
data.subfields) {
62 QStandardItemModel *model =
new QStandardItemModel();
63 auto root = model->invisibleRootItem();
64 auto item =
new QStandardItem(
"item");
74 return path.split(
'.');
79 for (QModelIndex i =
index; i.isValid(); i = i.parent()) {
80 dataList.prepend(model()->
data(i, completionRole()).toString());
83 return dataList.join(
'.');