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 -------------------------------------------------------------------------*/
31 #ifndef vtkQtAnnotationLayersModelAdapter_h
32 #define vtkQtAnnotationLayersModelAdapter_h
33 
34 #include "vtkGUISupportQtModule.h" // For export macro
35 #include "QVTKWin32Header.h"
37 
39 class vtkSelection;
40 
41 class VTKGUISUPPORTQT_EXPORT vtkQtAnnotationLayersModelAdapter : public vtkQtAbstractModelAdapter
42 {
43  Q_OBJECT
44 
45 public:
46  vtkQtAnnotationLayersModelAdapter(QObject *parent = 0);
47  vtkQtAnnotationLayersModelAdapter(vtkAnnotationLayers* ann, QObject *parent = 0);
49 
51 
52  virtual void SetVTKDataObject(vtkDataObject *data);
53  virtual vtkDataObject* GetVTKDataObject() const;
55 
57 
58  virtual vtkAnnotationLayers* QModelIndexListToVTKAnnotationLayers(
59  const QModelIndexList qmil) const;
60  virtual QItemSelection VTKAnnotationLayersToQItemSelection(
61  vtkAnnotationLayers *vtkann) const;
63  const QModelIndexList qmil) const;
64  virtual QItemSelection VTKIndexSelectionToQItemSelection(
65  vtkSelection *vtksel) const;
67 
68  virtual void SetKeyColumnName(const char* name);
69  virtual void SetColorColumnName(const char* name);
70 
72 
73  void setAnnotationLayers(vtkAnnotationLayers* annotations);
74  vtkAnnotationLayers* annotationLayers() const { return this->Annotations; }
75  QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
76  bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
77  Qt::ItemFlags flags(const QModelIndex &index) const;
78  QVariant headerData(int section, Qt::Orientation orientation,
79  int role = Qt::DisplayRole) const;
80  QModelIndex index(int row, int column,
81  const QModelIndex &parent = QModelIndex()) const;
82  QModelIndex parent(const QModelIndex &index) const;
83  int rowCount(const QModelIndex &parent = QModelIndex()) const;
84  int columnCount(const QModelIndex &parent = QModelIndex()) const;
85 /*
86  Qt::DropActions supportedDropActions() const;
87  Qt::DropActions supportedDragActions() const;
88  bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
89  bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex());
90  virtual bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) ;
91  virtual QMimeData * mimeData ( const QModelIndexList & indexes ) const;
92  virtual QStringList mimeTypes () const ;
93 */
94 private:
96 
97  bool noAnnotationsCheck() const;
98 
99  vtkAnnotationLayers* Annotations;
100 
102  void operator=(const vtkQtAnnotationLayersModelAdapter&); // Not implemented.
103 };
104 
105 #endif
Adapts annotations to a Qt item model.
A node in a selection tree. Used to store selection results.
Definition: vtkSelection.h:44
virtual vtkSelection * QModelIndexListToVTKIndexSelection(const QModelIndexList qmil) const =0
virtual void SetColorColumnName(const char *name)=0
virtual vtkDataObject * GetVTKDataObject() const =0
virtual QItemSelection VTKIndexSelectionToQItemSelection(vtkSelection *vtksel) const =0
Superclass for Qt model adapters.
virtual void SetKeyColumnName(const char *name)=0
Stores a ordered collection of annotation sets.
virtual void SetVTKDataObject(vtkDataObject *data)=0
general representation of visualization data
Definition: vtkDataObject.h:64