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

Method onColumnsInserted

Libs/Widgets/ctkCheckableModelHelper.cpp:563–587  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

561
562//-----------------------------------------------------------------------------
563void ctkCheckableModelHelper::onColumnsInserted(const QModelIndex &parentIndex,
564 int start, int end)
565{
566 Q_D(ctkCheckableModelHelper);
567 if (this->orientation() == Qt::Horizontal)
568 {
569 if (start == 0)
570 {
571 this->updateHeadersFromItems();
572 }
573 }
574 else
575 {
576 if (d->ForceCheckability)
577 {
578 for (int i = start; i <= end; ++i)
579 {
580 QModelIndex index = this->model()->index(0, i, parentIndex);
581 d->forceCheckability(index);
582 }
583 }
584 this->onDataChanged(this->model()->index(0, start, parentIndex),
585 this->model()->index(0, end, parentIndex));
586 }
587}
588
589//-----------------------------------------------------------------------------
590void ctkCheckableModelHelper::onRowsInserted(const QModelIndex &parentIndex,

Callers

nothing calls this directly

Calls 6

orientationMethod · 0.95
modelMethod · 0.95
onDataChangedMethod · 0.95
forceCheckabilityMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected