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 
8 #include "vtkParaViewDeprecation.h" // For PARAVIEW_DEPRECATED
9 
10 #include <QScopedPointer>
11 #include <QWidget>
12 
13 class vtkSMProxy;
15 
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  PARAVIEW_DEPRECATED_IN_5_13_0("Use setRepresentation instead.")
84  void setDataRepresentation(pqDataRepresentation* repr, bool forceUpdate = false)
85  {
86  this->setRepresentation(repr, forceUpdate);
87  }
88  void setColorTransferFunctions(std::vector<vtkSMProxy*> ctfs);
90  {
91  this->setColorTransferFunctions(std::vector<vtkSMProxy*>(1, ctf));
92  }
93 
94 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
98  void updateScalarBarButtons();
99  void updateColorArraySelectorWidgets();
100  void updateOpacityArraySelectorWidgets();
101  void updateColor2ArraySelectorWidgets();
102 
103 private:
104  Q_DISABLE_COPY(pqColorMapEditor)
105 
106  class pqInternals;
107  QScopedPointer<pqInternals> Internals;
108 };
109 
110 #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.
#define PQAPPLICATIONCOMPONENTS_EXPORT
#define PARAVIEW_DEPRECATED_IN_5_13_0(reason)
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.