pqPipelineBrowserWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqPipelineBrowserWidget.h
5 
6  Copyright (c) 2005,2006 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 ========================================================================*/
32 #ifndef pqPipelineBrowserWidget_h
33 #define pqPipelineBrowserWidget_h
34 
35 #include "pqComponentsModule.h"
36 #include "pqFlatTreeView.h"
37 
38 #include <QPointer>
39 
40 class pqPipelineModel;
42 class pqPipelineSource;
43 class pqOutputPort;
44 class pqView;
45 class QMenu;
46 class vtkSession;
47 
53 {
54  Q_OBJECT
55  typedef pqFlatTreeView Superclass;
56 
57 public:
58  pqPipelineBrowserWidget(QWidget* parent = nullptr);
59  ~pqPipelineBrowserWidget() override;
60 
65  bool eventFilter(QObject* object, QEvent* e) override;
66 
70  void setSelectionVisibility(bool visible);
71 
75  void enableAnnotationFilter(const QString& annotationKey);
76 
80  void disableAnnotationFilter();
81 
86  void setAnnotationFilterMatching(bool matching);
87 
91  void enableSessionFilter(vtkSession* session);
92 
96  void disableSessionFilter();
97 
101  void setModel(pqPipelineModel* model);
102 
107  QModelIndex pipelineModelIndex(const QModelIndex& index) const;
108  const pqPipelineModel* getPipelineModel(const QModelIndex& index) const;
109 
113  static void setVisibility(bool visible, pqOutputPort* port);
114 
118  QMenu* contextMenu() const;
119 
120 Q_SIGNALS:
125  void deleteKey();
126 
127 public Q_SLOTS:
132  void setActiveView(pqView*);
133 
134 protected Q_SLOTS:
135  void handleIndexClicked(const QModelIndex& index);
136  void expandWithModelIndexTranslation(const QModelIndex&);
137 
138 protected: // NOLINT(readability-redundant-access-specifiers)
142  void setVisibility(bool visible, const QModelIndexList& indices);
143 
144  void contextMenuEvent(QContextMenuEvent* e) override;
145 
149  bool viewportEvent(QEvent* e) override;
150 
153  QPointer<QMenu> ContextMenu;
154 
155 private:
159  void configureModel();
160 
161  Q_DISABLE_COPY(pqPipelineBrowserWidget)
162 };
163 
164 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:57
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:54
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:29
port
index
pqPipelineAnnotationFilterModel * FilteredPipelineModel
pqPipelineBrowserWidget is the widget for the pipeline browser.