Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
camitk::MeshSelectionModel Class Reference

Qt model for mesh selection This class use the Qt model/view design. More...

#include <MeshSelectionModel.h>

+ Inheritance diagram for camitk::MeshSelectionModel:

Public Member Functions

int columnCount (const QModelIndex &parent=QModelIndex()) const
 Number of selection columns. More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 Model data. More...
 
QMap< QString, vtkSmartPointer
< vtkSelectionNode > > & 
getSelectionList ()
 Get the selection list. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 Data header. More...
 
 MeshSelectionModel (MeshComponent *const meshComp)
 Constructor. More...
 
void refresh ()
 Refresh the model. More...
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 Number of selection. More...
 
void updateSelection (const QString &name)
 Update the selection. More...
 

Private Attributes

QMap< int, QString > contentName
 
QMap< int, QString > fieldName
 The component where the selection are stored. More...
 
MeshComponent * meshComponent
 

Detailed Description

Qt model for mesh selection This class use the Qt model/view design.

Constructor & Destructor Documentation

camitk::MeshSelectionModel::MeshSelectionModel ( MeshComponent *const  meshComp)

Constructor.

References contentName, and fieldName.

Member Function Documentation

int camitk::MeshSelectionModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Number of selection columns.

QVariant camitk::MeshSelectionModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
QMap< QString, vtkSmartPointer<vtkSelectionNode> >& camitk::MeshSelectionModel::getSelectionList ( )

Get the selection list.

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

Data header.

void camitk::MeshSelectionModel::refresh ( )
int camitk::MeshSelectionModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Number of selection.

References camitk::MeshComponent::getNumberOfSelections(), and meshComponent.

void camitk::MeshSelectionModel::updateSelection ( const QString &  name)

Member Data Documentation

QMap< int, QString > camitk::MeshSelectionModel::contentName
private

Referenced by data(), and MeshSelectionModel().

QMap< int, QString > camitk::MeshSelectionModel::fieldName
private

The component where the selection are stored.

Referenced by data(), and MeshSelectionModel().

MeshComponent* camitk::MeshSelectionModel::meshComponent
private

Referenced by data(), rowCount(), and updateSelection().


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