Adapts a tree to a Qt item model.
More...
#include <vtkQtTreeModelAdapter.h>
|
| vtkQtTreeModelAdapter (QObject *parent=0, vtkTree *tree=0) |
|
| ~vtkQtTreeModelAdapter () |
|
virtual void | SetVTKDataObject (vtkDataObject *data) |
| Set/Get the VTK data object as input to this adapter. More...
|
|
virtual vtkDataObject * | GetVTKDataObject () const |
|
vtkMTimeType | GetVTKDataObjectMTime () const |
| Get the stored VTK data object modification time of when the adaption to a Qt model was done. More...
|
|
virtual vtkSelection * | QModelIndexListToVTKIndexSelection (const QModelIndexList qmil) const |
| Selection conversion from VTK land to Qt land. More...
|
|
virtual QItemSelection | VTKIndexSelectionToQItemSelection (vtkSelection *vtksel) const |
|
virtual void | SetKeyColumnName (const char *name) |
|
virtual void | SetColorColumnName (const char *name) |
|
void | setTree (vtkTree *t) |
| Set up the model based on the current tree. More...
|
|
vtkTree * | tree () const |
|
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 (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 |
|
Qt::DropActions | supportedDragActions () const |
| If drag/drop is enabled in the view, the model will package up the current pedigreeid vtkSelection into a QMimeData when items are dragged. More...
|
|
virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
|
virtual QStringList | mimeTypes () const |
|
| 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 | SetColorColumn (int col) |
| Set/Get the column storing the rgba color values for each row. More...
|
|
virtual int | GetColorColumn () |
|
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 () |
|
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 51 of file vtkQtTreeModelAdapter.h.
◆ vtkQtTreeModelAdapter()
vtkQtTreeModelAdapter::vtkQtTreeModelAdapter |
( |
QObject * |
parent = 0 , |
|
|
vtkTree * |
tree = 0 |
|
) |
| |
◆ ~vtkQtTreeModelAdapter()
vtkQtTreeModelAdapter::~vtkQtTreeModelAdapter |
( |
| ) |
|
◆ SetVTKDataObject()
virtual void vtkQtTreeModelAdapter::SetVTKDataObject |
( |
vtkDataObject * |
data | ) |
|
|
virtual |
◆ GetVTKDataObject()
virtual vtkDataObject* vtkQtTreeModelAdapter::GetVTKDataObject |
( |
| ) |
const |
|
virtual |
◆ GetVTKDataObjectMTime()
vtkMTimeType vtkQtTreeModelAdapter::GetVTKDataObjectMTime |
( |
| ) |
const |
Get the stored VTK data object modification time of when the adaption to a Qt model was done.
This is in general not the same this as the data objects modification time. It is the mod time of the object when it was placed into the Qt model adapter. You can use this mtime as part of the checking to see whether you need to update the the adapter by call SetVTKDataObject again. :)
◆ QModelIndexListToVTKIndexSelection()
virtual vtkSelection* vtkQtTreeModelAdapter::QModelIndexListToVTKIndexSelection |
( |
const QModelIndexList |
qmil | ) |
const |
|
virtual |
◆ VTKIndexSelectionToQItemSelection()
virtual QItemSelection vtkQtTreeModelAdapter::VTKIndexSelectionToQItemSelection |
( |
vtkSelection * |
vtksel | ) |
const |
|
virtual |
◆ SetKeyColumnName()
virtual void vtkQtTreeModelAdapter::SetKeyColumnName |
( |
const char * |
name | ) |
|
|
virtual |
◆ SetColorColumnName()
virtual void vtkQtTreeModelAdapter::SetColorColumnName |
( |
const char * |
name | ) |
|
|
virtual |
◆ setTree()
void vtkQtTreeModelAdapter::setTree |
( |
vtkTree * |
t | ) |
|
Set up the model based on the current tree.
◆ tree()
vtkTree* vtkQtTreeModelAdapter::tree |
( |
| ) |
const |
|
inline |
◆ data()
QVariant vtkQtTreeModelAdapter::data |
( |
const QModelIndex & |
index, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
◆ setData()
bool vtkQtTreeModelAdapter::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
◆ flags()
Qt::ItemFlags vtkQtTreeModelAdapter::flags |
( |
const QModelIndex & |
index | ) |
const |
◆ headerData()
QVariant vtkQtTreeModelAdapter::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
◆ index()
QModelIndex vtkQtTreeModelAdapter::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
◆ parent()
QModelIndex vtkQtTreeModelAdapter::parent |
( |
const QModelIndex & |
index | ) |
const |
◆ rowCount()
int vtkQtTreeModelAdapter::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
◆ columnCount()
int vtkQtTreeModelAdapter::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
◆ supportedDragActions()
Qt::DropActions vtkQtTreeModelAdapter::supportedDragActions |
( |
| ) |
const |
If drag/drop is enabled in the view, the model will package up the current pedigreeid vtkSelection into a QMimeData when items are dragged.
Currently only leaves of the tree can be dragged.
◆ mimeData()
virtual QMimeData* vtkQtTreeModelAdapter::mimeData |
( |
const QModelIndexList & |
indexes | ) |
const |
|
virtual |
◆ mimeTypes()
virtual QStringList vtkQtTreeModelAdapter::mimeTypes |
( |
| ) |
const |
|
virtual |
◆ treeModified()
void vtkQtTreeModelAdapter::treeModified |
( |
| ) |
|
|
protected |
◆ GenerateVTKIndexToQtModelIndex()
void vtkQtTreeModelAdapter::GenerateVTKIndexToQtModelIndex |
( |
vtkIdType |
vtk_index, |
|
|
QModelIndex |
qmodel_index |
|
) |
| |
|
protected |
◆ Tree
vtkTree* vtkQtTreeModelAdapter::Tree |
|
protected |
◆ ChildIterator
◆ TreeMTime
◆ VTKIndexToQtModelIndex
QVector<QModelIndex> vtkQtTreeModelAdapter::VTKIndexToQtModelIndex |
|
protected |
◆ IndexToDecoration
QHash<QModelIndex, QVariant> vtkQtTreeModelAdapter::IndexToDecoration |
|
protected |
The documentation for this class was generated from the following file: