35#ifndef vtkQtTableModelAdapter_h
36#define vtkQtTableModelAdapter_h
38#include "vtkGUISupportQtModule.h"
111 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
112 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole)
override;
113 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
115 int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
116 QModelIndex
index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
117 QModelIndex
parent(
const QModelIndex& index)
const override;
118 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
119 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
122 bool dropMimeData(
const QMimeData* data, Qt::DropAction action,
int row,
int column,
123 const QModelIndex& parent)
override;
124 QMimeData*
mimeData(
const QModelIndexList& indexes)
const override;
136 void getValue(
int row,
int column,
vtkVariant& retVal)
const;
137 bool noTableCheck()
const;
138 void updateModelColumnHashTables();
139 QVariant getColorIcon(
int row)
const;
140 QVariant getIcon(
int row)
const;
142 bool SplitMultiComponentColumns;
144 int DecorationLocation;
145 int DecorationStrategy;
148 int IconSheetSize[2];
152 vtkInternal* Internal;
general representation of visualization data
Superclass for Qt model adapters.
Adapts a table to a Qt item model.
void setTable(vtkTable *table)
Set up the model based on the current table.
vtkDataObject * GetVTKDataObject() const override
Set/Get the VTK data object as input to this adapter.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
void SetIconIndexColumnName(const char *name)
~vtkQtTableModelAdapter() override
void selectionDropped(vtkSelection *)
void SetSplitMultiComponentColumns(bool value)
void SetDecorationLocation(int s)
Specify how to color rows if colors are provided by SetColorColumnName().
Qt::ItemFlags flags(const QModelIndex &index) const override
Set up the model based on the current table.
bool GetSplitMultiComponentColumns() const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Set up the model based on the current table.
vtkSelection * QModelIndexListToVTKIndexSelection(const QModelIndexList qmil) const override
Selection conversion from VTK land to Qt land.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
QItemSelection VTKIndexSelectionToQItemSelection(vtkSelection *vtksel) const override
Selection conversion from VTK land to Qt land.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Set up the model based on the current table.
void SetIconSheetSize(int w, int h)
void SetDecorationStrategy(int s)
Specify how to color rows if colors are provided by SetColorColumnName().
void SetVTKDataObject(vtkDataObject *data) override
Set/Get the VTK data object as input to this adapter.
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
void SetKeyColumnName(const char *name) override
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Set up the model based on the current table.
QModelIndex parent(const QModelIndex &index) const override
Set up the model based on the current table.
Qt::DropActions supportedDropActions() const override
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Set up the model based on the current table.
vtkQtTableModelAdapter(vtkTable *table, QObject *parent=nullptr)
QStringList mimeTypes() const override
void SetIconSheet(QImage sheet)
QMimeData * mimeData(const QModelIndexList &indexes) const override
void SetIconSize(int w, int h)
vtkTable * table() const
Set up the model based on the current table.
void SetColorColumnName(const char *name) override
vtkQtTableModelAdapter(QObject *parent=nullptr)
data object that represents a "selection" in VTK.
Computes the portion of a dataset which is inside a selection.
A table, which contains similar-typed columns of data.
A atomic type representing the union of many types.