26 #ifndef MESH_SELECTION_MODEL_H
27 #define MESH_SELECTION_MODEL_H
29 #include <QAbstractTableModel>
31 #include<vtkSmartPointer.h>
33 class vtkSelectionNode;
34 class vtkAbstractArray;
65 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
70 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
75 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
80 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
92 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
94 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
100 QMap< int, QString > fieldName;
101 QMap< int, QString > contentName;
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
Qt model for mesh selection This class use the Qt model/view design.
Definition: MeshSelectionModel.h:44
MeshSelectionModel(MeshComponent *const meshComp)
Constructor.
Definition: MeshSelectionModel.cpp:45
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Number of selection.
Definition: MeshSelectionModel.cpp:54
int insertSelection(const QString &name, int fieldType, int contentType, vtkSmartPointer< vtkAbstractArray > array, InsertionPolicy policy=REPLACE)
Insert a selection.
Definition: MeshSelectionModel.cpp:160
bool setData(const QModelIndex &index, const QVariant &value, int role) override
Edit selection data.
Definition: MeshSelectionModel.cpp:284
Qt::ItemFlags flags(const QModelIndex &index) const override
Definition: MeshSelectionModel.cpp:307
int removeSelection(const QString &name)
Definition: MeshSelectionModel.cpp:271
InsertionPolicy
Definition: MeshSelectionModel.h:50
@ MERGE
Definition: MeshSelectionModel.h:52
@ REPLACE
Definition: MeshSelectionModel.h:51
@ SUBTRACT
Definition: MeshSelectionModel.h:53
@ DISCARD
Definition: MeshSelectionModel.h:54
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Data header.
Definition: MeshSelectionModel.cpp:134
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Number of selection columns.
Definition: MeshSelectionModel.cpp:62
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Model data.
Definition: MeshSelectionModel.cpp:67
Definition: Action.cpp:36
QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding)