vtkQtTreeModelAdapter Class Reference

#include <vtkQtTreeModelAdapter.h>

Inheritance diagram for vtkQtTreeModelAdapter:

Inheritance graph
[legend]
Collaboration diagram for vtkQtTreeModelAdapter:

Collaboration graph
[legend]

List of all members.


Detailed Description

Adapts a tree to a Qt item model.

vtkQtTreeModelAdapter is a QAbstractItemModel with a vtkTree as its underlying data model.

See also:
vtkQtAbstractModelAdapter vtkQtTableModelAdapter
Tests:
vtkQtTreeModelAdapter (Tests)

Definition at line 47 of file vtkQtTreeModelAdapter.h.


Public Member Functions

 vtkQtTreeModelAdapter (QObject *parent=0, vtkTree *tree=0)
 ~vtkQtTreeModelAdapter ()
vtkIdType IdToPedigree (vtkIdType id) const
vtkIdType PedigreeToId (vtkIdType pedigree) const
QModelIndex PedigreeToQModelIndex (vtkIdType id) const
vtkIdType QModelIndexToPedigree (QModelIndex index) const
virtual void SetKeyColumnName (const char *name)
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Qt::ItemFlags flags (const QModelIndex &index) const
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QModelIndex index (vtkIdType index) const
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex parent (const QModelIndex &index) const
int rowCount (const QModelIndex &parent=QModelIndex()) const
int columnCount (const QModelIndex &parent=QModelIndex()) const
virtual void SetVTKDataObject (vtkDataObject *data)
virtual vtkDataObjectGetVTKDataObject () const
void setTree (vtkTree *t)
vtkTreetree () const

Protected Member Functions

void treeModified ()
void GenerateHashMap (vtkIdType &row, vtkIdType id, QModelIndex index)

Protected Attributes

vtkTreeTree
vtkAdjacentVertexIteratorChildIterator
unsigned long TreeMTime
QHash< vtkIdType, vtkIdTypeIdToPedigreeHash
QHash< vtkIdType, QModelIndex > PedigreeToIndexHash
QHash< QModelIndex, vtkIdTypeIndexToIdHash
QHash< vtkIdType, vtkIdTypeRowToPedigreeHash
QHash< QModelIndex, QVariant > IndexToDecoration

Constructor & Destructor Documentation

vtkQtTreeModelAdapter::vtkQtTreeModelAdapter ( QObject *  parent = 0,
vtkTree tree = 0 
)

vtkQtTreeModelAdapter::~vtkQtTreeModelAdapter (  ) 


Member Function Documentation

virtual void vtkQtTreeModelAdapter::SetVTKDataObject ( vtkDataObject data  )  [virtual]

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

Implements vtkQtAbstractModelAdapter.

virtual vtkDataObject* vtkQtTreeModelAdapter::GetVTKDataObject (  )  const [virtual]

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

Implements vtkQtAbstractModelAdapter.

vtkIdType vtkQtTreeModelAdapter::IdToPedigree ( vtkIdType  id  )  const [virtual]

Mapping methods for converting from VTK land to Qt land

Implements vtkQtAbstractModelAdapter.

vtkIdType vtkQtTreeModelAdapter::PedigreeToId ( vtkIdType  pedigree  )  const [virtual]

Mapping methods for converting from VTK land to Qt land

Implements vtkQtAbstractModelAdapter.

QModelIndex vtkQtTreeModelAdapter::PedigreeToQModelIndex ( vtkIdType  id  )  const [virtual]

Mapping methods for converting from VTK land to Qt land

Implements vtkQtAbstractModelAdapter.

vtkIdType vtkQtTreeModelAdapter::QModelIndexToPedigree ( QModelIndex  index  )  const [virtual]

Mapping methods for converting from VTK land to Qt land

Implements vtkQtAbstractModelAdapter.

virtual void vtkQtTreeModelAdapter::SetKeyColumnName ( const char *  name  )  [virtual]

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.

Implements vtkQtAbstractModelAdapter.

void vtkQtTreeModelAdapter::setTree ( vtkTree t  ) 

Set up the model based on the current tree.

vtkTree* vtkQtTreeModelAdapter::tree (  )  const [inline]

Set up the model based on the current tree.

Definition at line 71 of file vtkQtTreeModelAdapter.h.

QVariant vtkQtTreeModelAdapter::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

bool vtkQtTreeModelAdapter::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Qt::ItemFlags vtkQtTreeModelAdapter::flags ( const QModelIndex &  index  )  const

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

QModelIndex vtkQtTreeModelAdapter::index ( vtkIdType  index  )  const

QModelIndex vtkQtTreeModelAdapter::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const

QModelIndex vtkQtTreeModelAdapter::parent ( const QModelIndex &  index  )  const

int vtkQtTreeModelAdapter::rowCount ( const QModelIndex &  parent = QModelIndex()  )  const

int vtkQtTreeModelAdapter::columnCount ( const QModelIndex &  parent = QModelIndex()  )  const

void vtkQtTreeModelAdapter::treeModified (  )  [protected]

void vtkQtTreeModelAdapter::GenerateHashMap ( vtkIdType row,
vtkIdType  id,
QModelIndex  index 
) [protected]


Member Data Documentation

Definition at line 90 of file vtkQtTreeModelAdapter.h.

Definition at line 91 of file vtkQtTreeModelAdapter.h.

unsigned long vtkQtTreeModelAdapter::TreeMTime [protected]

Definition at line 92 of file vtkQtTreeModelAdapter.h.

Definition at line 93 of file vtkQtTreeModelAdapter.h.

QHash<vtkIdType, QModelIndex> vtkQtTreeModelAdapter::PedigreeToIndexHash [protected]

Definition at line 94 of file vtkQtTreeModelAdapter.h.

QHash<QModelIndex, vtkIdType> vtkQtTreeModelAdapter::IndexToIdHash [protected]

Definition at line 95 of file vtkQtTreeModelAdapter.h.

Definition at line 96 of file vtkQtTreeModelAdapter.h.

QHash<QModelIndex, QVariant> vtkQtTreeModelAdapter::IndexToDecoration [protected]

Definition at line 98 of file vtkQtTreeModelAdapter.h.


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

Generated on Wed Jun 3 19:29:20 2009 for VTK by  doxygen 1.5.6