A TreeView to display mesh element properties.
Definition at line 23 of file ElementTreeView.h.
#include <ElementTreeView.h>
|
void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) override |
| Is called when the selection of this view changes. More...
|
|
◆ ElementTreeView()
ElementTreeView::ElementTreeView |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ nodeSelected
void ElementTreeView::nodeSelected |
( |
vtkUnstructuredGridAlgorithm const * const |
, |
|
|
unsigned |
, |
|
|
bool |
|
|
) |
| |
|
signal |
◆ removeSelectedMeshComponent
void ElementTreeView::removeSelectedMeshComponent |
( |
| ) |
|
|
signal |
◆ selectionChanged
void ElementTreeView::selectionChanged |
( |
const QItemSelection & |
selected, |
|
|
const QItemSelection & |
deselected |
|
) |
| |
|
overrideprotectedslot |
Is called when the selection of this view changes.
Definition at line 38 of file ElementTreeView.cpp.
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();
A model for the display of information concerning element information implemented as a TreeModel.
void nodeSelected(vtkUnstructuredGridAlgorithm const *const, unsigned, bool)
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.
References TreeItem::data(), nodeSelected(), and removeSelectedMeshComponent().
◆ updateView
void ElementTreeView::updateView |
( |
| ) |
|
|
slot |
Definition at line 25 of file ElementTreeView.cpp.
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);
The documentation for this class was generated from the following files: