pqResetScalarRangeReaction.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 pqResetScalarRangeReaction_h
5 #define pqResetScalarRangeReaction_h
6 
7 #include "pqReaction.h"
8 #include "vtkSmartPointer.h"
9 
10 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_12_0
11 
12 #include <QPointer>
13 
16 class pqServer;
18 class vtkSMProxy;
19 
29 {
30  Q_OBJECT
31  typedef pqReaction Superclass;
32 
33 public:
34  enum Modes
35  {
39  VISIBLE
40  };
41 
46  pqResetScalarRangeReaction(QAction* parent, bool track_active_objects = true, Modes mode = DATA);
47  ~pqResetScalarRangeReaction() override;
48 
52  PARAVIEW_DEPRECATED_IN_5_12_0("Use resetScalarRangeToData() instead")
53  static void resetScalarRange(pqPipelineRepresentation* repr = nullptr)
54  {
56  }
57 
66  static bool resetScalarRangeToData(pqPipelineRepresentation* repr = nullptr);
67 
76  static bool resetScalarRangeToCustom(pqPipelineRepresentation* repr = nullptr);
77 
87  static bool resetScalarRangeToCustom(vtkSMProxy* tfProxy, bool separateOpacity = false);
88 
97  static bool resetScalarRangeToDataOverTime(pqPipelineRepresentation* repr = nullptr);
98 
107  static bool resetScalarRangeToVisible(pqPipelineRepresentation* repr = nullptr);
108 
109 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
113  void updateEnableState() override;
114 
118  void setRepresentation(pqDataRepresentation* repr);
119 
120 protected:
124  void onTriggered() override;
125 
126 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
127  virtual void onServerAdded(pqServer* server);
128  virtual void onAboutToRemoveServer(pqServer* server);
129 
130 private:
131  Q_DISABLE_COPY(pqResetScalarRangeReaction)
132  QPointer<pqPipelineRepresentation> Representation;
133  Modes Mode;
135 };
136 
137 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
virtual void updateEnableState()
Definition: pqReaction.h:48
This is PQ representation for a single display.
#define PQAPPLICATIONCOMPONENTS_EXPORT
This is a superclass just to make it easier to collect all such reactions.
Definition: pqReaction.h:25
Reaction to rescale the active lookup table&#39;s range to match the active representation.
Reaction to reset the active lookup table&#39;s range to match the active representation.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
static bool resetScalarRangeToData(pqPipelineRepresentation *repr=nullptr)
Reset to current data range.
virtual void onTriggered()
Called when the action is triggered.
Definition: pqReaction.h:46
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35