MCPcopy Create free account
hub / github.com/KDAB/GammaRay / selectionModelSelected

Method selectionModelSelected

plugins/modelinspector/modelinspector.cpp:160–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160void ModelInspector::selectionModelSelected(const QItemSelection &selected)
161{
162 QModelIndex idx;
163 if (!selected.isEmpty())
164 idx = selected.at(0).topLeft();
165 if (!idx.isValid()) {
166 m_modelContentProxyModel->setSelectionModel(nullptr);
167 return;
168 }
169 m_modelContentProxyModel->setSelectionModel(qobject_cast<QItemSelectionModel *>(idx.data(ObjectModel::ObjectRole).value<QObject *>()));
170}

Callers

nothing calls this directly

Calls 4

setSelectionModelMethod · 0.80
isEmptyMethod · 0.45
isValidMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected