Computer Assited Medical Intervention Tool Kit
version 4.1
|
Qt model for mesh data. More...
#include <MeshDataModel.h>
Inherits QAbstractTableModel.
Public Member Functions | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
Number of data arrays columns. More... | |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
Model data, called when the view is refreshing visualization. More... | |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
Returns if a given model index is editable, checkable.... More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
Header data. More... | |
MeshDataModel (MeshComponent *meshComp) | |
Constructor. More... | |
void | refresh () |
Refresh the model. More... | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
Number of data arrays. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
Edit data, called when the data are modified by the user (view) More... | |
Private Member Functions | |
void | getRowInfo (const int, int *dataIndex, MeshComponent::FieldType *, MeshComponent::DataType *, QString &) const |
determine the current field type of the item depending on the row index, compute the index of the data in its field category and retrieve the type of data and the name of the array. More... | |
Private Attributes | |
MeshComponent * | meshComponent |
The component where the data are stored. More... | |
Qt model for mesh data.
This class use the Qt model/view design.
CamiTK intern class to represent mesh data.
camitk::MeshDataModel::MeshDataModel | ( | MeshComponent * | meshComp | ) |
Constructor.
|
override |
Number of data arrays columns.
|
override |
Model data, called when the view is refreshing visualization.
References camitk::MeshComponent::CELLS, camitk::MeshComponent::getDataRepresentationVisibility(), camitk::MeshComponent::getDataTypeName(), camitk::MeshComponent::getFieldName(), camitk::InterfaceGeometry::getPointSet(), getRowInfo(), camitk::MeshComponent::MESH, meshComponent, camitk::MeshComponent::POINTS, camitk::MeshComponent::SCALARS, and camitk::MeshComponent::VECTORS.
|
override |
Returns if a given model index is editable, checkable....
|
private |
determine the current field type of the item depending on the row index, compute the index of the data in its field category and retrieve the type of data and the name of the array.
References camitk::MeshComponent::CELLS, camitk::MeshComponent::getDataArray(), camitk::MeshComponent::getDataType(), camitk::MeshComponent::getNumberOfDataArray(), camitk::MeshComponent::MESH, meshComponent, camitk::MeshComponent::OTHERS, and camitk::MeshComponent::POINTS.
|
override |
Header data.
void camitk::MeshDataModel::refresh | ( | ) |
int camitk::MeshDataModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() | ) | const |
Number of data arrays.
References camitk::MeshComponent::getNumberOfDataArray(), and meshComponent.
|
override |
Edit data, called when the data are modified by the user (view)
References getRowInfo(), camitk::MeshComponent::MESH, meshComponent, and camitk::MeshComponent::setDataRepresentationVisibility().
|
private |
The component where the data are stored.
Referenced by data(), getRowInfo(), rowCount(), and setData().