pqPipelineAnnotationFilterModel.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 pqPipelineAnnotationFilterModel_h
11 #define pqPipelineAnnotationFilterModel_h
12 
13 #include "pqComponentsModule.h"
14 #include <QSortFilterProxyModel>
15 
16 class vtkSession;
17 
27 class PQCOMPONENTS_EXPORT pqPipelineAnnotationFilterModel : public QSortFilterProxyModel
28 {
29  Q_OBJECT;
30 
31 public:
32  pqPipelineAnnotationFilterModel(QObject* parent = nullptr);
33  ~pqPipelineAnnotationFilterModel() override = default;
34 
35  void enableAnnotationFilter(const QString& annotationKey);
36  void disableAnnotationFilter();
37 
41  void setAnnotationFilterMatching(bool matching);
42 
43  void enableSessionFilter(vtkSession* session);
44  void disableSessionFilter();
45 
46 protected:
47  bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override;
48  bool lessThan(const QModelIndex& left, const QModelIndex& right) const override;
49 
50 private:
51  bool FilterAnnotation;
52  bool FilterSession;
53 };
54 
55 #endif
#define PQCOMPONENTS_EXPORT
The pqPipelineAnnotationFilterModel class is used to filter a tree representation of the pipeline gra...
vtkSession defines a session i.e.
Definition: vtkSession.h:17