Computer Assisted Medical Intervention Tool Kit  version 5.2
camitk::MeshDataModel Class Reference

Qt model for mesh data. More...

#include <MeshDataModel.h>

+ Inheritance diagram for camitk::MeshDataModel:
+ Collaboration diagram for camitk::MeshDataModel:

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 override
 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...
 

Detailed Description

Qt model for mesh data.

This class use the Qt model/view design.

CamiTK intern class to represent mesh data.

Constructor & Destructor Documentation

◆ MeshDataModel()

camitk::MeshDataModel::MeshDataModel ( MeshComponent meshComp)

Constructor.

Member Function Documentation

◆ columnCount()

int camitk::MeshDataModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Number of data arrays columns.

◆ data()

QVariant camitk::MeshDataModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
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(), camitk::MeshComponent::MESH, camitk::MeshComponent::POINTS, camitk::MeshComponent::SCALARS, and camitk::MeshComponent::VECTORS.

+ Here is the call graph for this function:

◆ flags()

Qt::ItemFlags camitk::MeshDataModel::flags ( const QModelIndex &  index) const
override

Returns if a given model index is editable, checkable....

See also
QAbstractTableModel

◆ headerData()

QVariant camitk::MeshDataModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

Header data.

◆ refresh()

void camitk::MeshDataModel::refresh ( )

Refresh the model.

Referenced by camitk::MeshComponent::displayTypePolicyChanged(), camitk::MeshComponent::initData(), camitk::MeshComponent::setDataRepresentationOff(), camitk::MeshComponent::setDataRepresentationVisibility(), and camitk::MeshComponent::vectorRepresentationPolicyChanged().

+ Here is the caller graph for this function:

◆ rowCount()

int camitk::MeshDataModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Number of data arrays.

References camitk::MeshComponent::getNumberOfDataArray().

+ Here is the call graph for this function:

◆ setData()

bool camitk::MeshDataModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
)
override

Edit data, called when the data are modified by the user (view)

References camitk::MeshComponent::MESH, and camitk::MeshComponent::setDataRepresentationVisibility().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: