Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | Protected Attributes
qMRMLTableModel Class Reference

#include <Libs/MRML/Widgets/qMRMLTableModel.h>

Inheritance diagram for qMRMLTableModel:
Inheritance graph
Collaboration diagram for qMRMLTableModel:
Collaboration graph

Public Types

enum  ItemDataRole { SortRole = Qt::UserRole + 1 }
typedef QAbstractItemModel Superclass


bool transposed

Public Member Functions

int mrmlTableColumnIndex (QModelIndex modelIndex) const
 Get MRML table index from model index. More...
vtkMRMLTableNodemrmlTableNode () const
int mrmlTableRowIndex (QModelIndex modelIndex) const
 Get MRML table index from model index. More...
 qMRMLTableModel (QObject *parent=nullptr)
int removeSelectionFromMRML (QModelIndexList selection, bool removeModelRow)
void setMRMLTableNode (vtkMRMLTableNode *node)
void setTransposed (bool transposed)
bool transposed () const
void updateModelFromMRML ()
 Update the entire table from the MRML node. More...
void updateMRMLFromModel (QStandardItem *item)
 Return the VTK table cell associated to the node index. More...
 ~qMRMLTableModel () override

Protected Slots

void onItemChanged (QStandardItem *item)
void onMRMLTableNodeModified (vtkObject *node)

Protected Member Functions

 qMRMLTableModel (qMRMLTableModelPrivate *pimpl, QObject *parent=nullptr)

Static Protected Member Functions

static void onMRMLNodeEvent (vtkObject *vtk_obj, unsigned long event, void *client_data, void *call_data)

Protected Attributes

QScopedPointer< qMRMLTableModelPrivate > d_ptr

Detailed Description

Definition at line 43 of file qMRMLTableModel.h.

Member Typedef Documentation

◆ Superclass

typedef QAbstractItemModel qMRMLTableModel::Superclass

Definition at line 51 of file qMRMLTableModel.h.

Member Enumeration Documentation

◆ ItemDataRole


Definition at line 55 of file qMRMLTableModel.h.

Property Documentation

◆ transposed

bool qMRMLTableModel::transposed

Definition at line 48 of file qMRMLTableModel.h.

Constructor & Destructor Documentation

◆ qMRMLTableModel() [1/2]

qMRMLTableModel::qMRMLTableModel ( QObject *  parent = nullptr)

◆ ~qMRMLTableModel()

qMRMLTableModel::~qMRMLTableModel ( )

◆ qMRMLTableModel() [2/2]

qMRMLTableModel::qMRMLTableModel ( qMRMLTableModelPrivate *  pimpl,
QObject *  parent = nullptr 

Member Function Documentation

◆ mrmlTableColumnIndex()

int qMRMLTableModel::mrmlTableColumnIndex ( QModelIndex  modelIndex) const

Get MRML table index from model index.

◆ mrmlTableNode()

vtkMRMLTableNode* qMRMLTableModel::mrmlTableNode ( ) const

◆ mrmlTableRowIndex()

int qMRMLTableModel::mrmlTableRowIndex ( QModelIndex  modelIndex) const

Get MRML table index from model index.

◆ onItemChanged

void qMRMLTableModel::onItemChanged ( QStandardItem *  item)

◆ onMRMLNodeEvent()

static void qMRMLTableModel::onMRMLNodeEvent ( vtkObject *  vtk_obj,
unsigned long  event,
void *  client_data,
void *  call_data 

◆ onMRMLTableNodeModified

void qMRMLTableModel::onMRMLTableNodeModified ( vtkObject *  node)

◆ removeSelectionFromMRML()

int qMRMLTableModel::removeSelectionFromMRML ( QModelIndexList  selection,
bool  removeModelRow 

Delete entire row or column from the MRML table that contains item in the selection. Returns the number of deleted rows or columns. If removeModelRow is true then entire model rows are deleted, otherwise entire model columns are deleted.

◆ setMRMLTableNode()

void qMRMLTableModel::setMRMLTableNode ( vtkMRMLTableNode node)

◆ setTransposed()

void qMRMLTableModel::setTransposed ( bool  transposed)

Set/Get transposed flag If transposed is true then columns of the MRML table are added as rows in the model.

◆ transposed()

bool qMRMLTableModel::transposed ( ) const

◆ updateModelFromMRML()

void qMRMLTableModel::updateModelFromMRML ( )

Update the entire table from the MRML node.

◆ updateMRMLFromModel()

void qMRMLTableModel::updateMRMLFromModel ( QStandardItem *  item)

Return the VTK table cell associated to the node index.

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLTableModelPrivate> qMRMLTableModel::d_ptr

Definition at line 96 of file qMRMLTableModel.h.

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