ParaView
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"
37 
39 class pqPipelineSource;
40 class pqServer;
41 class pqView;
44 class vtkSMOutputPort;
45 class vtkSMSourceProxy;
46 
57 class PQCORE_EXPORT pqOutputPort : public pqServerManagerModelItem
58 {
59  Q_OBJECT
61 
62 public:
63  pqOutputPort(pqPipelineSource* source, int portno);
64  virtual ~pqOutputPort();
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 
140  vtkPVTemporalDataInformation* getTemporalDataInformation();
141 
145  const char* getDataClassName() const;
146 
151  vtkSMSourceProxy* getSelectionInput();
152 
157  unsigned int getSelectionInputPort();
158 
162  void setSelectionInput(vtkSMSourceProxy* src, int port);
163 
164 public slots:
170  void renderAllViews(bool force = false);
171 
172 signals:
176  void connectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
177  void preConnectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
178 
182  void connectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
183  void preConnectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
184 
188  void representationAdded(pqOutputPort* source, pqDataRepresentation* repr);
189 
193  void representationRemoved(pqOutputPort* source, pqDataRepresentation* repr);
194 
200  void visibilityChanged(pqOutputPort* source, pqDataRepresentation* repr);
201 
202 protected slots:
203  void onRepresentationVisibilityChanged();
204 
205 protected:
206  friend class pqPipelineFilter;
207  friend class pqDataRepresentation;
208 
212  void removeConsumer(pqPipelineSource*);
213  void addConsumer(pqPipelineSource*);
214 
218  void addRepresentation(pqDataRepresentation*);
219  void removeRepresentation(pqDataRepresentation*);
220 
223 
224 private:
225  Q_DISABLE_COPY(pqOutputPort)
226 
227  class pqInternal;
228  pqInternal* Internal;
229 };
230 
231 #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
Light object for holding data information.
int getPortNumber() const
Returns the port number of the output port which this item represents.
Definition: pqOutputPort.h:89
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
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:56
pqPipelineSource * Source
Definition: pqOutputPort.h:221
proxy for a VTK source on a server
reference for an output port of a vtkAlgorithm.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
vtkPVTemporalDataInformation is used to gather data information over time.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:64