pqSelectionManager.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 pqSelectionManager_h
5 #define pqSelectionManager_h
6 
7 #include "pqComponentsModule.h"
8 
9 #include "vtkBoundingBox.h"
10 #include "vtkType.h"
11 #include <QObject>
12 #include <QPair>
13 
14 class pqOutputPort;
15 class pqPipelineSource;
16 class pqRenderView;
17 class pqSelectionManagerImplementation;
19 class pqView;
20 class vtkDataObject;
21 class vtkSelection;
22 class vtkSMProxy;
23 class vtkSMSession;
24 class vtkSMSourceProxy;
25 
40 {
41  Q_OBJECT
42 
43 public:
44  pqSelectionManager(QObject* parent = nullptr);
45  ~pqSelectionManager() override;
46 
50  pqOutputPort* getSelectedPort() const;
51 
56  const QSet<pqOutputPort*>& getSelectedPorts() const;
57 
62  bool hasActiveSelection() const;
63 
67  vtkBoundingBox selectedDataBounds() const;
68 
69 Q_SIGNALS:
74  void selectionChanged(pqOutputPort*);
75 
76 public Q_SLOTS:
82  void clearSelection(pqOutputPort* outputPort = nullptr);
83 
87  void setActiveView(pqView*);
88 
92  void select(pqOutputPort*);
93 
97  void onSourceAdded(pqPipelineSource*);
98 
102  void onSourceRemoved(pqPipelineSource*);
103 
111  void expandSelection(int layers, bool removeSeed = false, bool removeIntermediateLayers = false);
112 
113 private Q_SLOTS:
117  void onLinkAdded(int linkType);
118 
122  void onLinkRemoved();
123 
127  void onItemRemoved(pqServerManagerModelItem* item);
128 
129 protected:
130  void onSelect(pqOutputPort*, bool forceGlobalIds);
131 
132 private:
133  pqSelectionManagerImplementation* Implementation;
134 
135  // helpers
136  void selectOnSurface(int screenRectange[4]);
137 };
138 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
#define PQCOMPONENTS_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:22
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
This is a PQ abstraction of a generic view module.
Definition: pqView.h:26
pqSelectionManager is the nexus for introspective surface selection in paraview.
proxy for a VTK source on a server
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
PQ representation for a vtkSMProxy that can be involved in a pipeline.