pqColorMapEditor.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 pqColorMapEditor_h
5 #define pqColorMapEditor_h
6 
7 #include "pqApplicationComponentsModule.h"
8 #include "vtkParaViewDeprecation.h" // For PARAVIEW_DEPRECATED
9 
10 #include <QScopedPointer>
11 #include <QWidget>
12 
13 class vtkSMProxy;
15 
24 class PQAPPLICATIONCOMPONENTS_EXPORT pqColorMapEditor : public QWidget
25 {
26  Q_OBJECT
27  typedef QWidget Superclass;
28 
29 public:
30  pqColorMapEditor(QWidget* parent = nullptr);
31  ~pqColorMapEditor() override;
32 
33 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
37  void setSelectedPropertiesType(int selectedPropertiesType);
38 
39 protected Q_SLOTS:
41 
44  void updateActive(bool forceUpdate);
45  void updateActive() { this->updateActive(false); }
47 
51  void updatePanel();
52 
56  void renderViews();
57 
61  void saveAsDefault();
62 
67  void saveAsArrayDefault();
68 
72  void restoreDefaults();
73 
77  void setAutoUpdate(bool);
78 
79  void updateIfNeeded();
80 
81 protected: // NOLINT(readability-redundant-access-specifiers)
82  void setRepresentation(pqDataRepresentation* repr, bool forceUpdate = false);
83  void setColorTransferFunctions(std::vector<vtkSMProxy*> ctfs);
85  {
86  this->setColorTransferFunctions(std::vector<vtkSMProxy*>(1, ctf));
87  }
88 
89 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
93  void updateScalarBarButtons();
94  void updateColorArraySelectorWidgets();
95  void updateOpacityArraySelectorWidgets();
96  void updateColor2ArraySelectorWidgets();
97 
98 private:
99  Q_DISABLE_COPY(pqColorMapEditor)
100 
101  class pqInternals;
102  QScopedPointer<pqInternals> Internals;
103 };
104 
105 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
pqColorMapEditor is a widget that can be used to edit the active color-map, if any.
void setColorTransferFunction(vtkSMProxy *ctf)
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
void updateActive()
slot called to update the currently showing proxies.