23 #ifndef __qMRMLTableModel_h 24 #define __qMRMLTableModel_h 27 #include <QStandardItemModel> 31 #include <ctkVTKObject.h> 34 #include "qMRMLWidgetsExport.h" 40 class qMRMLTableModelPrivate;
48 Q_PROPERTY(
bool transposed READ transposed WRITE setTransposed)
56 SortRole = Qt::UserRole + 1
64 void setTransposed(
bool transposed);
65 bool transposed()
const;
68 void updateMRMLFromModel(QStandardItem* item);
71 void updateModelFromMRML();
74 int mrmlTableRowIndex(QModelIndex modelIndex)
const;
77 int mrmlTableColumnIndex(QModelIndex modelIndex)
const;
83 int removeSelectionFromMRML(QModelIndexList selection,
bool removeModelRow);
86 void onMRMLTableNodeModified(vtkObject* node);
87 void onItemChanged(QStandardItem * item);
91 qMRMLTableModel(qMRMLTableModelPrivate* pimpl, QObject *parent=
nullptr);
93 static void onMRMLNodeEvent(vtkObject* vtk_obj,
unsigned long event,
94 void* client_data,
void* call_data);
96 QScopedPointer<qMRMLTableModelPrivate>
d_ptr;
QAbstractItemModel Superclass
QScopedPointer< qMRMLTableModelPrivate > d_ptr
MRML node to represent a table object.
Abstract Superclass for all specific types of MRML nodes.