![]() |
Computer Assited Medical Intervention Tool Kit
version 3.4
|
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 |
Qt model for mesh selection This class use the Qt model/view design.
| camitk::MeshSelectionModel::MeshSelectionModel | ( | MeshComponent *const | meshComp | ) |
Constructor.
References contentName, and fieldName.
| 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 |
Model data.
References contentName, fieldName, camitk::MeshComponent::getSelectionAt(), camitk::MeshComponent::getSelectionList(), and meshComponent.
Referenced by camitk::MeshComponent::changeSelectedSelection().
| 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 | ( | ) |
Refresh the model.
Referenced by camitk::MeshComponent::addSelection(), camitk::MeshComponent::init(), and camitk::MeshComponent::removeSelection().
| 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 | ) |
Update the selection.
References camitk::MeshComponent::getSelectionList(), and meshComponent.
Referenced by camitk::MeshComponent::addToSelection().
|
private |
Referenced by data(), and MeshSelectionModel().
|
private |
The component where the selection are stored.
Referenced by data(), and MeshSelectionModel().
|
private |
Referenced by data(), rowCount(), and updateSelection().
1.8.8