pqTextureComboBox.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 pqTextureComboBox_h
5 #define pqTextureComboBox_h
6 
7 #include "pqComponentsModule.h"
8 #include "vtkNew.h"
9 
10 #include <QComboBox>
11 
21 class vtkSMProxy;
23 class PQCOMPONENTS_EXPORT pqTextureComboBox : public QComboBox
24 {
25  Q_OBJECT
26  typedef QComboBox Superclass;
27 
28 public:
29  pqTextureComboBox(vtkSMProxyGroupDomain* domain, QWidget* parent = nullptr);
30  pqTextureComboBox(vtkSMProxyGroupDomain* domain, bool canLoadNew, QWidget* parent = nullptr);
31  ~pqTextureComboBox() override = default;
32 
37  void updateFromTexture(vtkSMProxy* texture);
38 
39 Q_SIGNALS:
40 
44  void textureChanged(vtkSMProxy* texture);
45 
46 protected:
47  void loadTexture();
48  bool loadTexture(const QString& filename);
49 
50 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
51  void onCurrentIndexChanged(int index);
52  void updateTextures();
53  void proxyRegistered(const QString& group, const QString&, vtkSMProxy* proxy);
54  void proxyUnRegistered(const QString& group, const QString&, vtkSMProxy* proxy);
55 
56 private:
57  Q_DISABLE_COPY(pqTextureComboBox)
58 
59  vtkSMProxyGroupDomain* Domain;
60  vtkNew<vtkEventQtSlotConnect> VTKConnector;
61  QString GroupName;
62  bool CanLoadNew;
63 };
64 
65 #endif
#define PQCOMPONENTS_EXPORT
union of proxy groups
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
index