27 setAlternatingRowColors(
true);
28 setColumnWidth(0, 150);
29 std::size_t nColumns =
30 (this->model() !=
nullptr) ? this->model()->columnCount() : 0;
31 for (std::size_t i = 1; i < nColumns; i++)
33 resizeColumnToContents(i);
39 const QItemSelection& deselected)
42 if (!selected.isEmpty())
45 const QModelIndex idx = *(selected.indexes().begin());
47 if (idx.parent().isValid())
49 if (idx.parent().parent().isValid())
52 static_cast<TreeModel*
>(this->model())->getItem(idx);
53 const unsigned node_index =
54 tree_item->
data(0).toString().mid(5).toUInt();
Definition of the ElementTreeModel class.
Definition of the ElementTreeView class.
Definition of the TreeItem class.
A model for the display of information concerning element information implemented as a TreeModel.
void nodeSelected(vtkUnstructuredGridAlgorithm const *const, unsigned, bool)
void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected) override
Is called when the selection of this view changes.
ElementTreeView(QWidget *parent=nullptr)
Constructor.
void removeSelectedMeshComponent()
Objects nodes for the TreeModel.
virtual QVariant data(int column) const
A hierarchical model for a tree implemented as a double-linked list.