VTK: GUISupport/Qt/vtkQtAnnotationLayersModelAdapter.h Source File

| VTK 9.3.1

vtkQtAnnotationLayersModelAdapter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
16 #ifndef vtkQtAnnotationLayersModelAdapter_h
17 #define vtkQtAnnotationLayersModelAdapter_h
18
19 #include "vtkGUISupportQtModule.h" // For export macro
20 #include "vtkQtAbstractModelAdapter.h"
21
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkAnnotationLayers;
24 class vtkSelection;
25
26 class VTKGUISUPPORTQT_EXPORT vtkQtAnnotationLayersModelAdapter : public vtkQtAbstractModelAdapter
27 {
28 Q_OBJECT
29
30 public:
31 vtkQtAnnotationLayersModelAdapter(QObject* parent = nullptr);
32 vtkQtAnnotationLayersModelAdapter(vtkAnnotationLayers* ann, QObject* parent = nullptr);
33 ~vtkQtAnnotationLayersModelAdapter() override;
34
36
39 void SetVTKDataObject(vtkDataObject* data) override;
40 vtkDataObject* GetVTKDataObject() const override;
42
44
47 virtual vtkAnnotationLayers* QModelIndexListToVTKAnnotationLayers(QModelIndexList qmil) const;
48 virtual QItemSelection VTKAnnotationLayersToQItemSelection(vtkAnnotationLayers* vtkann) const;
49 vtkSelection* QModelIndexListToVTKIndexSelection(QModelIndexList qmil) const override;
50 QItemSelection VTKIndexSelectionToQItemSelection(vtkSelection* vtksel) const override;
52
53 void SetKeyColumnName(const char* name) override;
54 void SetColorColumnName(const char* name) override;
55
57
60 void setAnnotationLayers(vtkAnnotationLayers* annotations);
61 vtkAnnotationLayers* annotationLayers() const { return this->Annotations; }
62 QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
63 bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
64 Qt::ItemFlags flags(const QModelIndex& index) const override;
65 QVariant headerData(
66 int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
67 QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
68 QModelIndex parent(const QModelIndex& index) const override;
69 int rowCount(const QModelIndex& parent = QModelIndex()) const override;
70 int columnCount(const QModelIndex& parent = QModelIndex()) const override;
71 /*
72 Qt::DropActions supportedDropActions() const;
73 Qt::DropActions supportedDragActions() const;
74 bool removeRows(int row, int count, const QModelIndex & parent = QModelIndex());
75 bool insertRows(int row, int count, const QModelIndex & parent = QModelIndex());
76 virtual bool dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column,
77 const QModelIndex & parent) ; virtual QMimeData * mimeData ( const QModelIndexList & indexes )
78 const; virtual QStringList mimeTypes () const ;
79 */
80 private:
82
83 bool noAnnotationsCheck() const;
84
85 vtkAnnotationLayers* Annotations;
86
87 vtkQtAnnotationLayersModelAdapter(const vtkQtAnnotationLayersModelAdapter&) = delete;
88 void operator=(const vtkQtAnnotationLayersModelAdapter&) = delete;
89 };
90
91 VTK_ABI_NAMESPACE_END
92 #endif
93 // VTK-HeaderTest-Exclude: vtkQtAnnotationLayersModelAdapter.h
vtkAnnotationLayers
Stores a ordered collection of annotation sets.
Definition: vtkAnnotationLayers.h:27
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:64
vtkQtAbstractModelAdapter
Superclass for Qt model adapters.
Definition: vtkQtAbstractModelAdapter.h:31
vtkQtAnnotationLayersModelAdapter
Adapts annotations to a Qt item model.
Definition: vtkQtAnnotationLayersModelAdapter.h:27
vtkQtAnnotationLayersModelAdapter::data
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::SetKeyColumnName
void SetKeyColumnName(const char *name) override
vtkQtAnnotationLayersModelAdapter::rowCount
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::VTKAnnotationLayersToQItemSelection
virtual QItemSelection VTKAnnotationLayersToQItemSelection(vtkAnnotationLayers *vtkann) const
Selection conversion from VTK land to Qt land.
vtkQtAnnotationLayersModelAdapter::vtkQtAnnotationLayersModelAdapter
vtkQtAnnotationLayersModelAdapter(vtkAnnotationLayers *ann, QObject *parent=nullptr)
vtkQtAnnotationLayersModelAdapter::index
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::SetColorColumnName
void SetColorColumnName(const char *name) override
vtkQtAnnotationLayersModelAdapter::flags
Qt::ItemFlags flags(const QModelIndex &index) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::~vtkQtAnnotationLayersModelAdapter
~vtkQtAnnotationLayersModelAdapter() override
vtkQtAnnotationLayersModelAdapter::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::annotationLayers
vtkAnnotationLayers * annotationLayers() const
Set up the model based on the current table.
Definition: vtkQtAnnotationLayersModelAdapter.h:61
vtkQtAnnotationLayersModelAdapter::columnCount
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::setAnnotationLayers
void setAnnotationLayers(vtkAnnotationLayers *annotations)
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::QModelIndexListToVTKIndexSelection
vtkSelection * QModelIndexListToVTKIndexSelection(QModelIndexList qmil) const override
Selection conversion from VTK land to Qt land.
vtkQtAnnotationLayersModelAdapter::QModelIndexListToVTKAnnotationLayers
virtual vtkAnnotationLayers * QModelIndexListToVTKAnnotationLayers(QModelIndexList qmil) const
Selection conversion from VTK land to Qt land.
vtkQtAnnotationLayersModelAdapter::SetVTKDataObject
void SetVTKDataObject(vtkDataObject *data) override
Set/Get the VTK data object as input to this adapter.
vtkQtAnnotationLayersModelAdapter::setData
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::GetVTKDataObject
vtkDataObject * GetVTKDataObject() const override
Set/Get the VTK data object as input to this adapter.
vtkQtAnnotationLayersModelAdapter::vtkQtAnnotationLayersModelAdapter
vtkQtAnnotationLayersModelAdapter(QObject *parent=nullptr)
vtkQtAnnotationLayersModelAdapter::parent
QModelIndex parent(const QModelIndex &index) const override
Set up the model based on the current table.
vtkQtAnnotationLayersModelAdapter::VTKIndexSelectionToQItemSelection
QItemSelection VTKIndexSelectionToQItemSelection(vtkSelection *vtksel) const override
Selection conversion from VTK land to Qt land.
vtkSelection
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:59
vtkX3D::orientation
@ orientation
Definition: vtkX3D.h:262
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkX3D::name
@ name
Definition: vtkX3D.h:219
vtkX3D::index
@ index
Definition: vtkX3D.h:246
vtkX3D::data
@ data
Definition: vtkX3D.h:315
vtkQtAbstractModelAdapter.h