MCPcopy Create free account
hub / github.com/baldurk/renderdoc / data

Method data

qrenderdoc/Windows/ResourceInspector.cpp:82–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80 }
81
82 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override
83 {
84 if(index.isValid())
85 {
86 const rdcarray<ResourceDescription> &resources = m_Ctx.GetResources();
87
88 if(index.row() < resources.count())
89 {
90 const ResourceDescription &desc = resources[index.row()];
91
92 if(role == Qt::DisplayRole)
93 return m_Ctx.GetResourceName(desc.resourceId);
94
95 if(role == ResourceIdRole)
96 return QVariant::fromValue(desc.resourceId);
97
98 if(role == FilterRole)
99 return ToQStr(desc.type) + lit(" ") + m_Ctx.GetResourceName(desc.resourceId);
100
101 if(role == LastAccessSortRole)
102 return m_LastUse[desc.resourceId];
103 }
104 }
105
106 return QVariant();
107 }
108
109private:
110 ICaptureContext &m_Ctx;

Callers 3

lessThanMethod · 0.45

Calls 8

fromValueFunction · 0.85
ToQStrFunction · 0.50
QVariantClass · 0.50
isValidMethod · 0.45
GetResourcesMethod · 0.45
rowMethod · 0.45
countMethod · 0.45
GetResourceNameMethod · 0.45

Tested by

no test coverage detected