pqPipelineBrowserWidget.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 pqPipelineBrowserWidget_h
5 #define pqPipelineBrowserWidget_h
6 
7 #include "pqComponentsModule.h"
8 #include "pqFlatTreeView.h"
9 
10 #include <QPointer>
11 
12 class pqPipelineModel;
14 class pqPipelineSource;
15 class pqOutputPort;
16 class pqView;
17 class QMenu;
18 class vtkSession;
19 
25 {
26  Q_OBJECT
27  typedef pqFlatTreeView Superclass;
28 
29 public:
30  pqPipelineBrowserWidget(QWidget* parent = nullptr);
31  ~pqPipelineBrowserWidget() override;
32 
37  bool eventFilter(QObject* object, QEvent* e) override;
38 
42  void setSelectionVisibility(bool visible);
43 
47  void enableAnnotationFilter(const QString& annotationKey);
48 
52  void disableAnnotationFilter();
53 
58  void setAnnotationFilterMatching(bool matching);
59 
63  void enableSessionFilter(vtkSession* session);
64 
68  void disableSessionFilter();
69 
73  void setModel(pqPipelineModel* model);
74 
79  QModelIndex pipelineModelIndex(const QModelIndex& index) const;
80  const pqPipelineModel* getPipelineModel(const QModelIndex& index) const;
81 
85  static void setVisibility(bool visible, pqOutputPort* port);
86 
90  QMenu* contextMenu() const;
91 
92 Q_SIGNALS:
97  void deleteKey();
98 
99 public Q_SLOTS:
104  void setActiveView(pqView*);
105 
106 protected Q_SLOTS:
107  void handleIndexClicked(const QModelIndex& index);
108  void expandWithModelIndexTranslation(const QModelIndex&);
109 
110 protected: // NOLINT(readability-redundant-access-specifiers)
114  void setVisibility(bool visible, const QModelIndexList& indices);
115 
116  void contextMenuEvent(QContextMenuEvent* e) override;
117 
121  bool viewportEvent(QEvent* e) override;
122 
125  QPointer<QMenu> ContextMenu;
126 
127 private:
131  void configureModel();
132 
133  Q_DISABLE_COPY(pqPipelineBrowserWidget)
134 };
135 
136 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
bool viewportEvent(QEvent *e) override
#define PQCOMPONENTS_EXPORT
void setModel(QAbstractItemModel *model)
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
bool eventFilter(QObject *object, QEvent *e) override
Used to monitor the header view.
The pqPipelineAnnotationFilterModel class is used to filter a tree representation of the pipeline gra...
The pqFlatTreeView class is used to display a flattened tree view of a hierarchical model...
This class is the model for the PipelineLine browser tree view.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
vtkSession defines a session i.e.
Definition: vtkSession.h:17
port
index
pqPipelineAnnotationFilterModel * FilteredPipelineModel
pqPipelineBrowserWidget is the widget for the pipeline browser.