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  ~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 
140  vtkPVTemporalDataInformation* getTemporalDataInformation();
141 
150  vtkPVDataInformation* getSelectedDataInformation(int es_port = 0) const;
151 
155  const char* getDataClassName() const;
156 
161  vtkSMSourceProxy* getSelectionInput();
162 
167  unsigned int getSelectionInputPort();
168 
172  void setSelectionInput(vtkSMSourceProxy* src, int port);
173 
174 public slots:
180  void renderAllViews(bool force = false);
181 
182 signals:
186  void connectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
187  void preConnectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
188 
192  void connectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
193  void preConnectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
194 
198  void representationAdded(pqOutputPort* source, pqDataRepresentation* repr);
199 
203  void representationRemoved(pqOutputPort* source, pqDataRepresentation* repr);
204 
210  void visibilityChanged(pqOutputPort* source, pqDataRepresentation* repr);
211 
212 protected slots:
213  void onRepresentationVisibilityChanged();
214 
215 protected:
216  friend class pqPipelineFilter;
217  friend class pqDataRepresentation;
218 
222  void removeConsumer(pqPipelineSource*);
223  void addConsumer(pqPipelineSource*);
224 
228  void addRepresentation(pqDataRepresentation*);
229  void removeRepresentation(pqDataRepresentation*);
230 
233 
234 private:
235  Q_DISABLE_COPY(pqOutputPort)
236 
237  class pqInternal;
238  pqInternal* Internal;
239 };
240 
241 #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:54
pqPipelineSource * Source
Definition: pqOutputPort.h:231
proxy for a VTK source on a server
source
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