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;
42 class vtkPVDataInformation;
43 class vtkPVTemporalDataInformation;
44 class vtkSMOutputPort;
45 class vtkSMSourceProxy;
46 
55 class PQCORE_EXPORT pqOutputPort : public pqServerManagerModelItem
56 {
57  Q_OBJECT
59 public:
60  pqOutputPort(pqPipelineSource* source, int portno);
61  virtual ~pqOutputPort();
62 
64  vtkSMOutputPort* getOutputPortProxy() const;
65 
68  { return this->Source; }
69 
71  vtkSMSourceProxy* getSourceProxy() const;
72 
73 
75  pqServer* getServer() const;
76 
78  int getPortNumber() const
79  { return this->PortNumber; }
80 
82  QString getPortName() const;
83 
85  int getNumberOfConsumers() const;
86 
88  pqPipelineSource* getConsumer(int index) const;
89 
91  QList<pqPipelineSource*> getConsumers() const;
92 
95  QList<pqDataRepresentation*> getRepresentations(pqView* view) const;
96 
99  pqDataRepresentation* getRepresentation(pqView* view) const;
100 
103  QList<pqView*> getViews() const;
104 
108  vtkPVDataInformation* getDataInformation() const;
109 
112  vtkPVTemporalDataInformation* getTemporalDataInformation();
113 
115  const char* getDataClassName() const;
116 
119  vtkSMSourceProxy* getSelectionInput();
120 
123  unsigned int getSelectionInputPort();
124 
126  void setSelectionInput(vtkSMSourceProxy* src, int port);
127 
128 public slots:
132  void renderAllViews(bool force=false);
133 
134 signals:
136  void connectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
137  void preConnectionAdded(pqOutputPort* port, pqPipelineSource* consumer);
138 
140  void connectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
141  void preConnectionRemoved(pqOutputPort* port, pqPipelineSource* consumer);
142 
144  void representationAdded(pqOutputPort* source, pqDataRepresentation* repr);
145 
147  void representationRemoved(pqOutputPort* source, pqDataRepresentation* repr);
148 
152  void visibilityChanged(pqOutputPort* source, pqDataRepresentation* repr);
153 
154 protected slots:
155  void onRepresentationVisibilityChanged();
156 
157 protected:
158  friend class pqPipelineFilter;
159  friend class pqDataRepresentation;
160 
162  void removeConsumer(pqPipelineSource *);
163  void addConsumer(pqPipelineSource*);
164 
166  void addRepresentation(pqDataRepresentation*);
167  void removeRepresentation(pqDataRepresentation*);
168 
171 
172 private:
173  Q_DISABLE_COPY(pqOutputPort)
174 
175  class pqInternal;
176  pqInternal* Internal;
177 };
178 
179 #endif
180 
181 
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:55
int getPortNumber() const
Returns the port number of the output port which this item represents.
Definition: pqOutputPort.h:78
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
pqPipelineSource * getSource() const
Returns the pqPipelineSource whose output port this is.
Definition: pqOutputPort.h:67
This is a PQ abstraction of a generic view module.
Definition: pqView.h:55
pqPipelineSource * Source
Definition: pqOutputPort.h:169
PQ representation for a vtkSMProxy that can be involved in a pipeline.
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:62