pqDataInformationModel.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 #ifndef pqDataInformationModel_h
5 #define pqDataInformationModel_h
6 
7 #include "pqComponentsModule.h"
8 #include <QAbstractTableModel>
9 
10 class pqDataInformationModelInternal;
11 class pqOutputPort;
12 class pqPipelineSource;
13 class pqView;
14 
15 class PQCOMPONENTS_EXPORT pqDataInformationModel : public QAbstractTableModel
16 {
17  Q_OBJECT
18 
19 public:
20  pqDataInformationModel(QObject* _parent = nullptr);
21  ~pqDataInformationModel() override;
22 
27  int rowCount(const QModelIndex& parent = QModelIndex()) const override;
28 
33  int columnCount(const QModelIndex& parent = QModelIndex()) const override;
34 
40  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
41 
47  QVariant headerData(
48  int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
49 
54  QModelIndex getIndexFor(pqOutputPort* item) const;
55 
59  pqOutputPort* getItemFor(const QModelIndex& index) const;
60 
64  Qt::ItemFlags flags(const QModelIndex& index) const override;
65  bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole) override;
66 
67 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
71  void addSource(pqPipelineSource* source);
72 
76  void removeSource(pqPipelineSource* source);
77 
82  void setActiveView(pqView* view);
83 
84 private Q_SLOTS:
88  void dataUpdated(pqPipelineSource* changedSource);
89 
93  void refreshGeometrySizes();
94 
95 private: // NOLINT(readability-redundant-access-specifiers)
96  pqDataInformationModelInternal* Internal;
97 
98  enum ColumnType
99  {
100  Name = 0,
101  DataType,
102  CellCount,
103  PointCount,
104  MemorySize,
105  GeometrySize,
106  Bounds,
107  TimeRange,
108  Max_Columns
109  };
110 };
111 
112 #endif
data
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
#define PQCOMPONENTS_EXPORT
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
source
value
orientation
PQ representation for a vtkSMProxy that can be involved in a pipeline.
index