MCPcopy Create free account
hub / github.com/KDE/labplot / index

Method index

src/backend/core/AspectTreeModel.cpp:112–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112QModelIndex AspectTreeModel::index(int row, int column, const QModelIndex& parent) const {
113 if (!m_root || !hasIndex(row, column, parent))
114 return QModelIndex{};
115
116 if (!parent.isValid()) {
117 if (row != 0)
118 return QModelIndex{};
119 return createIndex(row, column, m_root);
120 }
121
122 auto* parent_aspect = static_cast<AbstractAspect*>(parent.internalPointer());
123 auto* child_aspect = parent_aspect->child<AbstractAspect>(row);
124 if (!child_aspect)
125 return QModelIndex{};
126 return createIndex(row, column, child_aspect);
127}
128
129QModelIndex AspectTreeModel::parent(const QModelIndex& index) const {
130 if (!index.isValid())

Callers 3

flagsMethod · 0.95
setFilterStringMethod · 0.95
restorePointersMethod · 0.45

Calls 1

isValidMethod · 0.45

Tested by

no test coverage detected