MCPcopy Create free account
hub / github.com/commontk/CTK / onDataChanged

Method onDataChanged

Libs/Widgets/ctkCheckableModelHelper.cpp:539–560  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

537
538//-----------------------------------------------------------------------------
539void 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//-----------------------------------------------------------------------------
563void ctkCheckableModelHelper::onColumnsInserted(const QModelIndex &parentIndex,

Callers 2

onColumnsInsertedMethod · 0.95
onRowsInsertedMethod · 0.95

Calls 5

updateCheckStateMethod · 0.80
Q_UNUSEDFunction · 0.50
checkStateMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected