pqPipelineFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
10 #ifndef pqPipelineFilter_h
11 #define pqPipelineFilter_h
12 
13 #include "pqCoreModule.h"
14 #include "pqPipelineSource.h"
15 #include <QMap>
16 
17 class pqOutputPort;
18 
20 {
21  Q_OBJECT
23 
24 public:
25  pqPipelineFilter(QString name, vtkSMProxy* proxy, pqServer* server, QObject* parent = nullptr);
26  ~pqPipelineFilter() override;
27 
31  static QList<const char*> getInputPorts(vtkSMProxy*);
32 
38  static QList<const char*> getRequiredInputPorts(vtkSMProxy*);
39 
43  int getNumberOfInputPorts() const;
44 
48  QString getInputPortName(int index) const;
49 
53  int getNumberOfInputs(const QString& portname) const;
54 
58  QList<pqOutputPort*> getInputs(const QString& portname) const;
59 
63  QList<pqOutputPort*> getAllInputs() const;
64 
69  QMap<QString, QList<pqOutputPort*>> getNamedInputs() const;
70 
75  pqOutputPort* getInput(const QString& portname, int index) const;
76 
80  int getInputCount() const { return this->getNumberOfInputs(this->getInputPortName(0)); }
81 
85  QList<pqOutputPort*> getInputs() const { return this->getInputs(this->getInputPortName(0)); }
86 
90  pqPipelineSource* getInput(int index) const;
91 
96  pqOutputPort* getAnyInput() const;
97 
106  int replaceInput() const;
107 
108 Q_SIGNALS:
112  void producerChanged(const QString& inputportname);
113 
114 protected Q_SLOTS:
118  void inputChanged(vtkObject*, unsigned long, void* client_data);
119 
120 protected: // NOLINT(readability-redundant-access-specifiers)
126  void initialize() override;
127 
132  void inputChanged(const QString& portname);
133 
134 private:
135  class pqInternal;
136  pqInternal* Internal;
137 };
138 
139 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
name
QList< pqOutputPort * > getInputs() const
Get a list of all inputs.
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
virtual void initialize()
int getInputCount() const
Get number of inputs.
PQ representation for a vtkSMProxy that can be involved in a pipeline.
friend class pqPipelineFilter
index
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35