pqOutputPortComboBox.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 #ifndef pqOutputPortComboBox_h
5 #define pqOutputPortComboBox_h
6 
7 #include "pqComponentsModule.h"
8 #include <QComboBox>
9 
10 class pqOutputPort;
11 class pqPipelineSource;
13 
18 class PQCOMPONENTS_EXPORT pqOutputPortComboBox : public QComboBox
19 {
20  Q_OBJECT
21  typedef QComboBox Superclass;
22 
23 public:
24  pqOutputPortComboBox(QWidget* parent = nullptr);
25  ~pqOutputPortComboBox() override;
26 
31  void setAutoUpdateIndex(bool val) { this->AutoUpdateIndex = val; }
32  bool autoUpdateIndex() const { return this->AutoUpdateIndex; }
33 
38  void addCustomEntry(const QString& label, pqOutputPort* port);
39 
43  pqOutputPort* currentPort() const;
44 
49  void fillExistingPorts();
50 
51 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
55  void setCurrentPort(pqOutputPort* port);
56 
57 Q_SIGNALS:
61  void currentIndexChanged(pqOutputPort*);
62 
63 private Q_SLOTS:
67  void nameChanged(pqServerManagerModelItem* item);
68 
72  void portChanged(pqOutputPort* item);
73 
78  // currentIndexChanged(vtkSMProxy*);
79  void onCurrentIndexChanged(int index);
80 
84  void addSource(pqPipelineSource* source);
85 
89  void removeSource(pqPipelineSource* source);
90 
91 protected:
93 
94 private:
95  Q_DISABLE_COPY(pqOutputPortComboBox)
96 };
97 
98 #endif
pqOutputPort is a server manager model item for an output port of any pqPipelineSource item...
Definition: pqOutputPort.h:29
#define PQCOMPONENTS_EXPORT
pqServerManagerModelItem is a element maintained by pqServerManagerModel.
void setAutoUpdateIndex(bool val)
Enable/Disable changing of the combo-box selected index based on the active source/port.
source
PQ representation for a vtkSMProxy that can be involved in a pipeline.
port
index
pqOutputPortComboBox is a combo-box that shows all outputports for all sources/filters.