4 #ifndef pqDataAssemblyTreeModel_h 5 #define pqDataAssemblyTreeModel_h 7 #include "pqComponentsModule.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;
86 void setCheckedNodes(
const QStringList& paths);
87 QStringList checkedNodes(
bool leafNodesOnly =
false)
const;
140 bool setData(
const QList<QPair<QString, QVariant>>& values,
int role);
141 QList<QPair<QString, QVariant>>
data(
int role)
const;
148 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
149 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
150 QModelIndex index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
151 QModelIndex parent(
const QModelIndex& index = QModelIndex())
const override;
152 QVariant
data(
const QModelIndex& index,
int role)
const override;
153 Qt::ItemFlags flags(
const QModelIndex& index)
const override;
154 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
163 void modelDataChanged(
int role);
166 void fireDataChanged(
const QModelIndex& root,
const QVector<int>& roles);
171 QScopedPointer<pqInternals> Internals;
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.