pqUseSeparateColorMapReaction.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 pqUseSeparateColorMapReaction_h
5 #define pqUseSeparateColorMapReaction_h
6 
7 #include "pqPropertyLinks.h" // For Links
8 #include "pqReaction.h"
9 #include <QPointer>
10 
11 #include "vtkNew.h" // For vtkNew
12 
16 
22 {
23  Q_OBJECT
24  typedef pqReaction Superclass;
25 
26 public:
33  QAction* parent, pqDisplayColorWidget* colorWidget, bool track_active_objects = true);
35 
39  pqDataRepresentation* representation() const;
40 
41 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
43 
46  void setRepresentation(pqDataRepresentation*, int selectedPropertiesType);
48  {
49  this->setRepresentation(repr, 0 /*Representation*/);
50  }
51  void setActiveRepresentation();
53 
57  void querySelectedUseSeparateColorMap();
58 
59 protected Q_SLOTS:
63  void updateEnableState() override;
64 
68  void onTriggered() override;
69 
70 private:
71  Q_DISABLE_COPY(pqUseSeparateColorMapReaction)
72 
73  class PropertyLinksConnection;
74 
75  pqPropertyLinks Links;
76  QPointer<pqDataRepresentation> Representation;
77  pqDisplayColorWidget* ColorWidget;
78  vtkNew<vtkSMColorMapEditorHelper> ColorMapEditorHelper;
79 };
80 
81 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
virtual void updateEnableState()
Definition: pqReaction.h:48
#define PQAPPLICATIONCOMPONENTS_EXPORT
void setRepresentation(pqDataRepresentation *repr)
Set the active representation.
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
pqDisplayColorWidget is a widget that can be used to select the array to with for representations (al...
Reaction to toggle the use of separated color map for an array in a representation.
virtual void onTriggered()
Called when the action is triggered.
Definition: pqReaction.h:46
helper for color map editor handling