MCPcopy Create free account
hub / github.com/aldelaro5/dolphin-memory-engine / parent

Method parent

Source/GUI/StructEditor/StructSelectModel.cpp:97–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97QModelIndex StructSelectModel::parent(const QModelIndex& index) const
98{
99 if (!index.isValid())
100 return {};
101
102 StructTreeNode* childNode = static_cast<StructTreeNode*>(index.internalPointer());
103 StructTreeNode* parentNode = childNode->getParent();
104
105 if (parentNode == m_rootNode || parentNode == nullptr)
106 return {};
107
108 return createIndex(parentNode->getRow(), 0, parentNode);
109}
110
111QVariant StructSelectModel::headerData(int section, Qt::Orientation orientation, int role) const
112{

Callers 4

dropMimeDataMethod · 0.45
addNodesMethod · 0.45
deleteNodeMethod · 0.45
isAnyAncestorSelectedMethod · 0.45

Calls 2

getParentMethod · 0.45
getRowMethod · 0.45

Tested by

no test coverage detected