pqOutputPort.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqOutputPort.h
5 
6  Copyright (c) 2005-2008 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 pqOutputPort_h
33 #define pqOutputPort_h
34 
35 #include "pqCoreModule.h"
36 #include "pqProxy.h"
37 
39 class pqPipelineSource;
40 class pqServer;
41 class pqView;
44 class vtkSMOutputPort;
45 class vtkSMSourceProxy;
46 
58 {
59  Q_OBJECT
60  typedef pqProxy Superclass;
61 
62 public:
63  pqOutputPort(pqPipelineSource* source, int portno);
64  ~pqOutputPort() override;
65 
69  vtkSMOutputPort* getOutputPortProxy() const;
70 
74  pqPipelineSource* getSource() const { return this->Source; }
75 
79  vtkSMSourceProxy* getSourceProxy() const;
80 
84  pqServer* getServer() const;
85 
89  int getPortNumber() const { return this->PortNumber; }
90 
94  QString getPortName() const;
95 
99  int getNumberOfConsumers() const;
100 
104  pqPipelineSource* getConsumer(int index) const;
105 
109  QList<pqPipelineSource*> getConsumers() const;
110 
115  QList<pqDataRepresentation*> getRepresentations(pqView* view) const;
116 
121  pqDataRepresentation* getRepresentation(pqView* view) const;
122 
127  QList<pqView*> getViews() const;
128 
134  vtkPVDataInformation* getDataInformation() const;
135 
139  vtkPVDataInformation* getRankDataInformation(int rank) const;
140 
145  vtkPVTemporalDataInformation* getTemporalDataInformation();
146 
155  vtkPVDataInformation* getSelectedDataInformation(int es_port = 0) const;
156 
160  const char* getDataClassName() const;
161 
166  vtkSMSourceProxy* getSelectionInput();
167 
172  unsigned int getSelectionInputPort();
173 
177  void setSelectionInput(vtkSMSourceProxy* src, int port);
178 
182  QString prettyName() const;
183 
184 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
190  void renderAllViews(bool force = false);
191 
192 Q_SIGNALS:
196  void connectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
197  void preConnectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
198 
202  void connectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
203  void preConnectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
204 
208  void representationAdded(pqOutputPort* source, pqDataRepresentation* repr);
209 
213  void representationRemoved(pqOutputPort* source, pqDataRepresentation* repr);
214 
220  void visibilityChanged(pqOutputPort* source, pqDataRepresentation* repr);
221 
222 protected Q_SLOTS:
223  void onRepresentationVisibilityChanged();
224 
225 protected: // NOLINT(readability-redundant-access-specifiers)
226  friend class pqPipelineFilter;
227  friend class pqDataRepresentation;
228 
232  void removeConsumer(pqPipelineSource*);
233  void addConsumer(pqPipelineSource*);
234 
238  void addRepresentation(pqDataRepresentation*);
239  void removeRepresentation(pqDataRepresentation*);
240 
243 
244 private:
245  Q_DISABLE_COPY(pqOutputPort)
246 
247  class pqInternal;
248  pqInternal* Internal;
249 };
250 
251 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:57
provides meta data about a vtkDataObject subclass.
int getPortNumber() const
Returns the port number of the output port which this item represents.
Definition: pqOutputPort.h:89
pqPipelineSource * getSource() const
Returns the pqPipelineSource whose output port this is.
Definition: pqOutputPort.h:74
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
pqPipelineSource * Source
Definition: pqOutputPort.h:241
proxy for a VTK source on a server
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
source
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:56
pqServer * getServer() const
Get the server on which this proxy exists.
reference for an output port of a vtkAlgorithm.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
port
extends vtkPVDataInformation to gather information across timesteps.
index
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:63