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

Method translateSelection

common/networkselectionmodel.cpp:150–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150bool GammaRay::NetworkSelectionModel::translateSelection(const Protocol::ItemSelection &selection,
151 QItemSelection &qselection) const
152{
153 qselection.clear();
154 for (const auto &range : selection) {
155 const QModelIndex qmiTopLeft = Protocol::toQModelIndex(model(), range.topLeft);
156 const QModelIndex qmiBottomRight = Protocol::toQModelIndex(model(), range.bottomRight);
157 if (!qmiTopLeft.isValid() && !qmiBottomRight.isValid())
158 return false;
159 qselection.push_back(QItemSelectionRange(qmiTopLeft, qmiBottomRight));
160 }
161 return true;
162}
163
164void NetworkSelectionModel::newMessage(const Message &msg)
165{

Callers

nothing calls this directly

Calls 3

toQModelIndexFunction · 0.85
clearMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected