VTK  9.1.0
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkQtAbstractModelAdapter Class Referenceabstract

Superclass for Qt model adapters. More...

#include <vtkQtAbstractModelAdapter.h>

Inheritance diagram for vtkQtAbstractModelAdapter:
[legend]

Public Types

enum  { FULL_VIEW , DATA_VIEW }
 

Signals

void modelChanged ()
 

Public Member Functions

 vtkQtAbstractModelAdapter (QObject *p)
 
virtual void SetViewType (int type)
 Set/Get the view type. More...
 
virtual int GetViewType ()
 
virtual void SetKeyColumn (int col)
 Set/Get the key column. More...
 
virtual int GetKeyColumn ()
 
virtual void SetKeyColumnName (const char *name)=0
 
virtual void SetColorColumn (int col)
 Set/Get the column storing the rgba color values for each row. More...
 
virtual int GetColorColumn ()
 
virtual void SetColorColumnName (const char *name)=0
 
virtual void SetDataColumnRange (int c1, int c2)
 Set the range of columns that specify the main data matrix. More...
 
void reset ()
 
void beginResetModel ()
 
void endResetModel ()
 
virtual void SetVTKDataObject (vtkDataObject *data)=0
 Set/Get the VTK data object as input to this adapter. More...
 
virtual vtkDataObjectGetVTKDataObject () const =0
 Set/Get the VTK data object as input to this adapter. More...
 
virtual vtkSelectionQModelIndexListToVTKIndexSelection (const QModelIndexList qmil) const =0
 Selection conversion from VTK land to Qt land. More...
 
virtual QItemSelection VTKIndexSelectionToQItemSelection (vtkSelection *vtksel) const =0
 Selection conversion from VTK land to Qt land. More...
 

Protected Member Functions

virtual int ModelColumnToFieldDataColumn (int col) const
 Map a column index in the QAbstractItemModel to a vtkTable column. More...
 

Protected Attributes

int ViewType
 
int KeyColumn
 
int ColorColumn
 
int DataStartColumn
 
int DataEndColumn
 

Detailed Description

Superclass for Qt model adapters.

vtkQtAbstractModelAdapter is the superclass for classes that adapt VTK objects to QAbstractItemModel. This class contains API for converting between QModelIndex and VTK ids, as well as some additional specialized functionality such as setting a column of data to use as the Qt header information.

See also
vtkQtTableModelAdapter vtkQtTreeModelAdapter

Definition at line 45 of file vtkQtAbstractModelAdapter.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
FULL_VIEW 
DATA_VIEW 

Definition at line 51 of file vtkQtAbstractModelAdapter.h.

Constructor & Destructor Documentation

◆ vtkQtAbstractModelAdapter()

vtkQtAbstractModelAdapter::vtkQtAbstractModelAdapter ( QObject *  p)
inline

Definition at line 57 of file vtkQtAbstractModelAdapter.h.

Member Function Documentation

◆ SetVTKDataObject()

virtual void vtkQtAbstractModelAdapter::SetVTKDataObject ( vtkDataObject data)
pure virtual

Set/Get the VTK data object as input to this adapter.

Implemented in vtkQtAnnotationLayersModelAdapter, vtkQtTableModelAdapter, and vtkQtTreeModelAdapter.

◆ GetVTKDataObject()

virtual vtkDataObject * vtkQtAbstractModelAdapter::GetVTKDataObject ( ) const
pure virtual

Set/Get the VTK data object as input to this adapter.

Implemented in vtkQtAnnotationLayersModelAdapter, vtkQtTableModelAdapter, and vtkQtTreeModelAdapter.

◆ QModelIndexListToVTKIndexSelection()

virtual vtkSelection * vtkQtAbstractModelAdapter::QModelIndexListToVTKIndexSelection ( const QModelIndexList  qmil) const
pure virtual

Selection conversion from VTK land to Qt land.

Implemented in vtkQtAnnotationLayersModelAdapter, vtkQtTableModelAdapter, and vtkQtTreeModelAdapter.

◆ VTKIndexSelectionToQItemSelection()

virtual QItemSelection vtkQtAbstractModelAdapter::VTKIndexSelectionToQItemSelection ( vtkSelection vtksel) const
pure virtual

Selection conversion from VTK land to Qt land.

Implemented in vtkQtAnnotationLayersModelAdapter, vtkQtTableModelAdapter, and vtkQtTreeModelAdapter.

◆ SetViewType()

virtual void vtkQtAbstractModelAdapter::SetViewType ( int  type)
inlinevirtual

Set/Get the view type.

FULL_VIEW gives access to all the data. DATA_VIEW gives access only to the data columns specified with SetDataColumnRange() The default is FULL_VIEW.

Definition at line 89 of file vtkQtAbstractModelAdapter.h.

◆ GetViewType()

virtual int vtkQtAbstractModelAdapter::GetViewType ( )
inlinevirtual

Definition at line 90 of file vtkQtAbstractModelAdapter.h.

◆ SetKeyColumn()

virtual void vtkQtAbstractModelAdapter::SetKeyColumn ( int  col)
inlinevirtual

Set/Get the key column.

The key column is used as the row headers in a table view, and as the first column in a tree view. Set to -1 for no key column. The default is no key column.

Definition at line 99 of file vtkQtAbstractModelAdapter.h.

◆ GetKeyColumn()

virtual int vtkQtAbstractModelAdapter::GetKeyColumn ( )
inlinevirtual

Definition at line 100 of file vtkQtAbstractModelAdapter.h.

◆ SetKeyColumnName()

virtual void vtkQtAbstractModelAdapter::SetKeyColumnName ( const char *  name)
pure virtual

◆ SetColorColumn()

virtual void vtkQtAbstractModelAdapter::SetColorColumn ( int  col)
inlinevirtual

Set/Get the column storing the rgba color values for each row.

The color column is used as the row headers in a table view, and as the first column in a tree view. Set to -1 for no key column. The default is no key column.

Definition at line 110 of file vtkQtAbstractModelAdapter.h.

◆ GetColorColumn()

virtual int vtkQtAbstractModelAdapter::GetColorColumn ( )
inlinevirtual

Definition at line 111 of file vtkQtAbstractModelAdapter.h.

◆ SetColorColumnName()

virtual void vtkQtAbstractModelAdapter::SetColorColumnName ( const char *  name)
pure virtual

◆ SetDataColumnRange()

virtual void vtkQtAbstractModelAdapter::SetDataColumnRange ( int  c1,
int  c2 
)
inlinevirtual

Set the range of columns that specify the main data matrix.

The data column range should not include the key column. The default is no data columns.

Definition at line 119 of file vtkQtAbstractModelAdapter.h.

◆ reset()

void vtkQtAbstractModelAdapter::reset ( )
inline

◆ beginResetModel()

void vtkQtAbstractModelAdapter::beginResetModel ( )
inline

Definition at line 139 of file vtkQtAbstractModelAdapter.h.

◆ endResetModel()

void vtkQtAbstractModelAdapter::endResetModel ( )
inline

Definition at line 140 of file vtkQtAbstractModelAdapter.h.

◆ modelChanged

void vtkQtAbstractModelAdapter::modelChanged ( )
signal

◆ ModelColumnToFieldDataColumn()

virtual int vtkQtAbstractModelAdapter::ModelColumnToFieldDataColumn ( int  col) const
protectedvirtual

Map a column index in the QAbstractItemModel to a vtkTable column.

If the argument is out of range or cannot be mapped then this method may return -1.

Member Data Documentation

◆ ViewType

int vtkQtAbstractModelAdapter::ViewType
protected

Definition at line 153 of file vtkQtAbstractModelAdapter.h.

◆ KeyColumn

int vtkQtAbstractModelAdapter::KeyColumn
protected

Definition at line 154 of file vtkQtAbstractModelAdapter.h.

◆ ColorColumn

int vtkQtAbstractModelAdapter::ColorColumn
protected

Definition at line 155 of file vtkQtAbstractModelAdapter.h.

◆ DataStartColumn

int vtkQtAbstractModelAdapter::DataStartColumn
protected

Definition at line 156 of file vtkQtAbstractModelAdapter.h.

◆ DataEndColumn

int vtkQtAbstractModelAdapter::DataEndColumn
protected

Definition at line 157 of file vtkQtAbstractModelAdapter.h.


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