void VtkVisPipeline::removeSourceItem(MshModel* model, const QModelIndex &idx) { MshItem* sItem = static_cast<MshItem*>(model->getItem(idx)); for (int i = 0; i < _rootItem->childCount(); i++) { VtkVisPipelineItem* item = static_cast<VtkVisPipelineItem*>(getItem(index(i, 0))); if (item->algorithm() == sItem->vtkSource()) { removePipelineItem(index(i, 0)); return; } } }
void MshView::checkMeshQuality () { QModelIndex index = this->selectionModel()->currentIndex(); MshItem* item = static_cast<MshItem*>(static_cast<MshModel*>(this->model())->getItem(index)); emit qualityCheckRequested(item->vtkSource()); }