14 : m_property(property)
16 PropertyPathId subtypeIndex = 0;
17 if (flag == Flag::IncludeSubtype) {
18 if (group->pathFlags() & QQSK::PropertyPathFlag::DelegateSubtype1)
20 else if (group->pathFlags() & QQSK::PropertyPathFlag::DelegateSubtype2)
24 const PropertyPathId subtypeStart = subtypeIndex * subtypeStorageSpaceSize;
26 m_groupStart = subtypeStart + groupStart;
31 if (s_cachedPathStrings.contains(pathId))
32 return s_cachedPathStrings.value(pathId);
34 constexpr PropertyPathId rootGroupsSize = nestedGroupsStartSize / nestedGroupCount;
35 const auto groupMetaEnum = QMetaEnum::fromType<QQSK::PropertyGroup>();
36 const auto propertyMetaEnum = QMetaEnum::fromType<QQSK::Property>();
38 const QQSK::PropertyGroup subType = extractSubtype(pathId);
39 PropertyPathId nestedGroupStart = pathId % subtypeStorageSpaceSize;
40 PropertyPathId nestedGroupSize = rootGroupsSize;
41 PropertyPathId nestedGroupIndex = nestedGroupStart / nestedGroupSize;
42 auto groupType = QQSK::PropertyGroup(nestedGroupIndex);
46 if (groupType != QQSK::PropertyGroup::Control) {
47 QString groupName = QString::fromLatin1(groupMetaEnum.valueToKey(
static_cast<
int>(groupType)));
48 groupName[0] = groupName[0].toLower();
49 pathString = groupName;
52 case QQSK::PropertyGroup::DelegateSubtype1:
53 pathString +=
".first"_L1;
55 case QQSK::PropertyGroup::DelegateSubtype2:
56 pathString +=
".second"_L1;
63 nestedGroupStart -= nestedGroupIndex * nestedGroupSize;
64 nestedGroupSize /= nestedGroupCount;
65 nestedGroupIndex = nestedGroupStart / nestedGroupSize;
66 groupType = QQSK::PropertyGroup(nestedGroupIndex);
67 if (groupType == QQSK::PropertyGroup::Control)
70 QString nestedName = QString::fromLatin1(groupMetaEnum.valueToKey(
static_cast<
int>(groupType)));
71 nestedName[0] = nestedName[0].toLower();
72 pathString +=
'.'_L1 + nestedName;
76 QQSK::Property property = QQSK::Property(nestedGroupStart);
77 if (property != QQSK::Property::NoProperty) {
78 QString propertyName = QString::fromLatin1(propertyMetaEnum.valueToKey(
static_cast<
int>(property)));
79 propertyName[0] = propertyName[0].toLower();
80 if (!pathString.isEmpty())
82 pathString += propertyName;
85 s_cachedPathStrings.insert(pathId, pathString);