MCPcopy Create free account
hub / github.com/KLayout/klayout / rowCount

Method rowCount

src/layui/layui/layLayerTreeModel.cc:277–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277int
278LayerTreeModel::rowCount (const QModelIndex &parent) const
279{
280 if (mp_view->layer_model_updated ()) {
281
282 if (parent.isValid ()) {
283 lay::LayerPropertiesConstIterator iter (iterator (parent));
284 if (iter.is_null () || iter.at_end ()) {
285 return 0;
286 } else {
287 return iter->end_children () - iter->begin_children ();
288 }
289 } else {
290 int n = int (mp_view->get_properties ().end_const () - mp_view->get_properties ().begin_const ());
291 return n;
292 }
293
294 } else {
295 return 0;
296 }
297}
298
299QModelIndex
300LayerTreeModel::index (int row, int column, const QModelIndex &parent) const

Callers

nothing calls this directly

Calls 10

layer_model_updatedMethod · 0.80
end_constMethod · 0.80
get_propertiesMethod · 0.80
begin_constMethod · 0.80
iteratorFunction · 0.50
isValidMethod · 0.45
is_nullMethod · 0.45
at_endMethod · 0.45
end_childrenMethod · 0.45
begin_childrenMethod · 0.45

Tested by

no test coverage detected