| 275 | } |
| 276 | |
| 277 | int |
| 278 | LayerTreeModel::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 | |
| 299 | QModelIndex |
| 300 | LayerTreeModel::index (int row, int column, const QModelIndex &parent) const |
nothing calls this directly
no test coverage detected