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;
42 class vtkDataAssembly;
45 class vtkSMOutputPort;
46 class vtkSMSourceProxy;
47 
59 {
60  Q_OBJECT
61  typedef pqProxy Superclass;
62 
63 public:
64  pqOutputPort(pqPipelineSource* source, int portno);
65  ~pqOutputPort() override;
66 
70  vtkSMOutputPort* getOutputPortProxy() const;
71 
75  pqPipelineSource* getSource() const { return this->Source; }
76 
80  vtkSMSourceProxy* getSourceProxy() const;
81 
85  pqServer* getServer() const;
86 
90  int getPortNumber() const { return this->PortNumber; }
91 
95  QString getPortName() const;
96 
100  int getNumberOfConsumers() const;
101 
105  pqPipelineSource* getConsumer(int index) const;
106 
110  QList<pqPipelineSource*> getConsumers() const;
111 
116  QList<pqDataRepresentation*> getRepresentations(pqView* view) const;
117 
122  pqDataRepresentation* getRepresentation(pqView* view) const;
123 
128  QList<pqView*> getViews() const;
129 
135  vtkPVDataInformation* getDataInformation() const;
136 
141  vtkPVTemporalDataInformation* getTemporalDataInformation();
142 
151  vtkPVDataInformation* getSelectedDataInformation(int es_port = 0) const;
152 
156  const char* getDataClassName() const;
157 
162  vtkSMSourceProxy* getSelectionInput();
163 
168  unsigned int getSelectionInputPort();
169 
173  void setSelectionInput(vtkSMSourceProxy* src, int port);
174 
179  vtkDataAssembly* dataAssembly() const;
180 
181 public Q_SLOTS:
187  void renderAllViews(bool force = false);
188 
189 Q_SIGNALS:
193  void connectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
194  void preConnectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
195 
199  void connectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
200  void preConnectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
201 
205  void representationAdded(pqOutputPort* source, pqDataRepresentation* repr);
206 
210  void representationRemoved(pqOutputPort* source, pqDataRepresentation* repr);
211 
217  void visibilityChanged(pqOutputPort* source, pqDataRepresentation* repr);
218 
219 protected Q_SLOTS:
220  void onRepresentationVisibilityChanged();
221 
222 protected:
223  friend class pqPipelineFilter;
224  friend class pqDataRepresentation;
225 
229  void removeConsumer(pqPipelineSource*);
230  void addConsumer(pqPipelineSource*);
231 
235  void addRepresentation(pqDataRepresentation*);
236  void removeRepresentation(pqDataRepresentation*);
237 
240 
241 private:
242  Q_DISABLE_COPY(pqOutputPort)
243 
244  class pqInternal;
245  pqInternal* Internal;
246 };
247 
248 #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:58
Light object for holding data information.
int getPortNumber() const
Returns the port number of the output port which this item represents.
Definition: pqOutputPort.h:90
pqPipelineSource * getSource() const
Returns the pqPipelineSource whose output port this is.
Definition: pqOutputPort.h:75
This is a PQ abstraction of a generic view module.
Definition: pqView.h:54
pqPipelineSource * Source
Definition: pqOutputPort.h:238
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
vtkPVTemporalDataInformation is used to gather data information over time.
index
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:64