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

Method updateItemFromArray

Libs/Visualization/VTK/Widgets/ctkVTKDataSetModel.cpp:400–416  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

398
399//------------------------------------------------------------------------------
400void ctkVTKDataSetModel::updateItemFromArray(QStandardItem* item,
401 vtkAbstractArray* array,
402 int location,
403 int column)
404{
405 item->setData(QVariant::fromValue(reinterpret_cast<long long>(array)), ctkVTK::PointerRole);
406 item->setData(location, ctkVTK::LocationRole);
407 switch (column)
408 {
409 case 0:
410 item->setText(QString(array->GetName()));
411 break;
412 default:
413 Q_ASSERT(column == 0);
414 break;
415 }
416}
417
418//------------------------------------------------------------------------------
419/*

Callers 2

insertArrayMethod · 0.80
foreachFunction · 0.80

Calls 3

QStringClass · 0.50
setDataMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected