4 #ifndef pqDataAssemblyTreeModel_h 5 #define pqDataAssemblyTreeModel_h 8 #include <QAbstractItemModel> 10 #include <QScopedPointer> 12 class vtkDataAssembly;
31 typedef QAbstractItemModel Superclass;
40 void setDataAssembly(vtkDataAssembly* assembly);
41 vtkDataAssembly* dataAssembly()
const;
47 void setUserCheckable(
bool);
56 int nodeId(
const QModelIndex& idx)
const;
57 QList<int> nodeId(
const QModelIndexList& idxes)
const;
64 QModelIndex
index(
int nodeId)
const;
65 QModelIndexList index(
const QList<int>& nodeIds)
const;
85 void setCheckedNodes(
const QStringList& paths);
86 QStringList checkedNodes()
const;
139 bool setData(
const QList<QPair<QString, QVariant>>& values,
int role);
140 QList<QPair<QString, QVariant>>
data(
int role)
const;
147 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
148 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
149 QModelIndex index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
150 QModelIndex parent(
const QModelIndex& index = QModelIndex())
const override;
151 QVariant
data(
const QModelIndex& index,
int role)
const override;
152 Qt::ItemFlags flags(
const QModelIndex& index)
const override;
153 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
162 void modelDataChanged(
int role);
165 void fireDataChanged(
const QModelIndex& root,
const QVector<int>& roles);
170 QScopedPointer<pqInternals> Internals;
#define PQCOMPONENTS_EXPORT
static int GetIsDerivedRole(int role)
For custom roles, use this function to convert that role into a role that can be used in data() to ge...
bool userCheckable() const
Get whether the model is user-checkable.
RoleProperties
Supported role properties.
QAbstractItemModel implementation for vtkDataAssembly.