-----------------------------------------------------------------------------
| 537 | |
| 538 | //----------------------------------------------------------------------------- |
| 539 | void ctkCheckableModelHelper::onDataChanged(const QModelIndex & topLeft, |
| 540 | const QModelIndex & bottomRight) |
| 541 | { |
| 542 | Q_UNUSED(bottomRight); |
| 543 | Q_D(ctkCheckableModelHelper); |
| 544 | if(d->ItemsAreUpdating || d->PropagateDepth == 0) |
| 545 | { |
| 546 | return; |
| 547 | } |
| 548 | bool checkable = false; |
| 549 | d->checkState(topLeft, &checkable); |
| 550 | if (!checkable) |
| 551 | { |
| 552 | return; |
| 553 | } |
| 554 | d->ItemsAreUpdating = true; |
| 555 | // TODO: handle topLeft "TO bottomRight" |
| 556 | d->propagateCheckStateToChildren(topLeft); |
| 557 | d->updateCheckState(topLeft.parent()); |
| 558 | |
| 559 | d->ItemsAreUpdating = false; |
| 560 | } |
| 561 | |
| 562 | //----------------------------------------------------------------------------- |
| 563 | void ctkCheckableModelHelper::onColumnsInserted(const QModelIndex &parentIndex, |
no test coverage detected