VTK
vtkQtAnnotationLayersModelAdapter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkQtAnnotationLayersModelAdapter.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
32#ifndef vtkQtAnnotationLayersModelAdapter_h
33#define vtkQtAnnotationLayersModelAdapter_h
34
35#include "vtkConfigure.h"
36#include "vtkGUISupportQtModule.h" // For export macro
38
40class vtkSelection;
41
43{
44 Q_OBJECT
45
46public:
50
52
58
60
64 const QModelIndexList qmil) const;
66 vtkAnnotationLayers *vtkann) const;
68 const QModelIndexList qmil) const;
69 virtual QItemSelection VTKIndexSelectionToQItemSelection(
70 vtkSelection *vtksel) const;
72
73 virtual void SetKeyColumnName(const char* name);
74 virtual void SetColorColumnName(const char* name);
75
77
81 vtkAnnotationLayers* annotationLayers() const { return this->Annotations; }
82 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
83 bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
84 Qt::ItemFlags flags(const QModelIndex &index) const;
85 QVariant headerData(int section, Qt::Orientation orientation,
86 int role = Qt::DisplayRole) const;
87 QModelIndex index(int row, int column,
88 const QModelIndex &parent = QModelIndex()) const;
89 QModelIndex parent(const QModelIndex &index) const;
90 int rowCount(const QModelIndex &parent = QModelIndex()) const;
91 int columnCount(const QModelIndex &parent = QModelIndex()) const;
92/*
93 Qt::DropActions supportedDropActions() const;
94 Qt::DropActions supportedDragActions() const;
95 bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
96 bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex());
97 virtual bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) ;
98 virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const;
99 virtual QStringList mimeTypes () const ;
100*/
101private:
103
104 bool noAnnotationsCheck() const;
105
106 vtkAnnotationLayers* Annotations;
107
109 void operator=(const vtkQtAnnotationLayersModelAdapter&) VTK_DELETE_FUNCTION;
110};
111
112#endif
Stores a ordered collection of annotation sets.
general representation of visualization data
Definition: vtkDataObject.h:65
Superclass for Qt model adapters.
Adapts annotations to a Qt item model.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
vtkQtAnnotationLayersModelAdapter(QObject *parent=0)
int rowCount(const QModelIndex &parent=QModelIndex()) const
virtual void SetKeyColumnName(const char *name)
virtual QItemSelection VTKAnnotationLayersToQItemSelection(vtkAnnotationLayers *vtkann) const
virtual QItemSelection VTKIndexSelectionToQItemSelection(vtkSelection *vtksel) const
virtual void SetVTKDataObject(vtkDataObject *data)
Set/Get the VTK data object as input to this adapter.
vtkQtAnnotationLayersModelAdapter(vtkAnnotationLayers *ann, QObject *parent=0)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
void setAnnotationLayers(vtkAnnotationLayers *annotations)
Set up the model based on the current table.
virtual void SetColorColumnName(const char *name)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
int columnCount(const QModelIndex &parent=QModelIndex()) const
virtual vtkDataObject * GetVTKDataObject() const
virtual vtkAnnotationLayers * QModelIndexListToVTKAnnotationLayers(const QModelIndexList qmil) const
Selection conversion from VTK land to Qt land.
QModelIndex parent(const QModelIndex &index) const
virtual vtkSelection * QModelIndexListToVTKIndexSelection(const QModelIndexList qmil) const
Selection conversion from VTK land to Qt land.
Qt::ItemFlags flags(const QModelIndex &index) const
A node in a selection tree.
Definition: vtkSelection.h:44
@ orientation
Definition: vtkX3D.h:262
@ value
Definition: vtkX3D.h:220
@ name
Definition: vtkX3D.h:219
@ index
Definition: vtkX3D.h:246
@ data
Definition: vtkX3D.h:315