pqCustomFilterDefinitionModel.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
10 #ifndef pqCustomFilterDefinitionModel_h
11 #define pqCustomFilterDefinitionModel_h
12 
13 #include "pqComponentsModule.h"
14 #include <QAbstractItemModel>
15 
16 #include "pqProxySelection.h" // for pqProxySelection.
17 
18 class pqCustomFilterDefinitionModelItem;
19 class pqPipelineSource;
20 class QPixmap;
21 class vtkCollection;
22 
34 class PQCOMPONENTS_EXPORT pqCustomFilterDefinitionModel : public QAbstractItemModel
35 {
36 public:
37  enum ItemType
38  {
39  Invalid = -1,
40  Source = 0,
44  LastType = Link
45  };
46 
47  pqCustomFilterDefinitionModel(QObject* parent = nullptr);
49 
53 
61  int rowCount(const QModelIndex& parent = QModelIndex()) const override;
62 
70  int columnCount(const QModelIndex& parent = QModelIndex()) const override;
71 
79  bool hasChildren(const QModelIndex& parent = QModelIndex()) const override;
80 
90  QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
91 
99  QModelIndex parent(const QModelIndex& index) const override;
100 
109  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
110 
121  Qt::ItemFlags flags(const QModelIndex& index) const override;
123 
134  void setContents(const pqProxySelection& items);
135 
143  QModelIndex getNextIndex(const QModelIndex& index) const;
144 
152  pqPipelineSource* getSourceFor(const QModelIndex& index) const;
153 
154 private:
162  pqCustomFilterDefinitionModelItem* getModelItemFor(const QModelIndex& index) const;
163 
171  pqCustomFilterDefinitionModelItem* getNextItem(pqCustomFilterDefinitionModelItem* item) const;
172 
173  pqCustomFilterDefinitionModelItem* Root;
174  QPixmap* PixmapList;
175 };
176 
177 #endif
data
The pqCustomFilterDefinitionModel class stores the sources that define a compound proxy in a hierarch...
#define PQCOMPONENTS_EXPORT
QList< pqServerManagerModelItem * > pqProxySelection
pqProxySelection is used to specify a selection comprising proxies.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
index