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 deprecation
11 
12 #include <QPointer>
13 
16 class pqServer;
18 class vtkSMProxy;
19 
28  PQAPPLICATIONCOMPONENTS_EXPORT pqResetScalarRangeReaction : public pqReaction
29 {
30  Q_OBJECT
31  typedef pqReaction Superclass;
32 
33 public:
34  enum Modes
35  {
36  DATA,
37  CUSTOM,
38  TEMPORAL,
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  {
55  pqResetScalarRangeReaction::resetScalarRangeToData(repr);
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
pqPipelineRepresentation
This is PQ representation for a single display.
Definition: pqPipelineRepresentation.h:30
pqReaction.h
vtkEventQtSlotConnect
vtkSmartPointer< vtkEventQtSlotConnect >
pqReaction::onTriggered
virtual void onTriggered()
Called when the action is triggered.
Definition: pqReaction.h:46
pqDataRepresentation
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
Definition: pqDataRepresentation.h:24
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
pqServer
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35
vtkSmartPointer.h
pqRescaleScalarRangeReaction
Definition: pqRescaleScalarRangeReaction.h:27
vtkParaViewDeprecation.h
pqReaction::updateEnableState
virtual void updateEnableState()
Definition: pqReaction.h:48
PARAVIEW_DEPRECATED_IN_5_12_0
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
Definition: vtkParaViewDeprecation.h:100
pqReaction
Definition: pqReaction.h:25