32 #ifndef pqCompositeDataInformationTreeModel_h 33 #define pqCompositeDataInformationTreeModel_h 36 #include <QAbstractItemModel> 38 #include <QScopedPointer> 153 Q_PROPERTY(
bool userCheckable READ userCheckable WRITE setUserCheckable);
154 Q_PROPERTY(
bool expandMultiPiece READ expandMultiPiece WRITE setExpandMultiPiece);
155 Q_PROPERTY(
bool exclusivity READ exclusivity WRITE setExclusivity);
156 Q_PROPERTY(
bool defaultCheckState READ defaultCheckState WRITE setDefaultCheckState);
158 typedef QAbstractItemModel Superclass;
168 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
169 int rowCount(
const QModelIndex& parent = QModelIndex())
const override;
170 QModelIndex
index(
int row,
int column,
const QModelIndex& parent = QModelIndex())
const override;
171 QModelIndex parent(
const QModelIndex& index = QModelIndex())
const override;
172 QVariant
data(
const QModelIndex& index,
int role)
const override;
173 Qt::ItemFlags flags(
const QModelIndex& index)
const override;
174 bool setData(
const QModelIndex& index,
const QVariant& value,
int role)
override;
176 int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
177 bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant& value,
178 int role = Qt::DisplayRole)
override;
232 QList<unsigned int> checkedNodes()
const;
238 QList<unsigned int> checkedLeaves()
const;
245 void setChecked(
const QList<unsigned int>& indices);
250 QList<QPair<unsigned int, bool> > checkStates()
const;
255 void setCheckStates(
const QList<QPair<unsigned int, bool> >& states);
263 QList<unsigned int> checkedLevels()
const;
264 void setCheckedLevels(
const QList<unsigned int>& indices);
272 QList<QPair<unsigned int, unsigned int> > checkedLevelDatasets()
const;
273 void setCheckedLevelDatasets(
const QList<QPair<unsigned int, unsigned int> >& indices);
280 unsigned int compositeIndex(
const QModelIndex& idx)
const;
286 QModelIndex find(
unsigned int compositeIndex)
const;
291 const QModelIndex rootIndex()
const;
297 int addColumn(
const QString& propertyName);
303 int columnIndex(
const QString& propertyName);
322 void setColumnStates(
323 const QString& propertyName,
const QList<QPair<unsigned int, QVariant> >& values);
324 QList<QPair<unsigned int, QVariant> > columnStates(
const QString& propertyName)
const;
337 ValueInheritedRole = Qt::UserRole,
368 QScopedPointer<pqInternals> Internals;
371 bool OnlyLeavesAreUserCheckable;
372 bool ExpandMultiPiece;
374 bool DefaultCheckState;
376 friend class pqCompositeDataInformationTreeModelNS::CNode;
#define PQCOMPONENTS_EXPORT