pqRescaleScalarRangeReaction.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 pqRescaleScalarRangeReaction_h
5 #define pqRescaleScalarRangeReaction_h
6 
7 #include "pqReaction.h"
8 
9 #include <QPointer>
10 
11 #include <vector>
12 
17 class pqServer;
18 class vtkSMProxy;
19 
28 {
29  Q_OBJECT
30  typedef pqReaction Superclass;
31 
32 public:
33  enum Modes
34  {
38  VISIBLE
39  };
40 
46  QAction* parent, bool track_active_objects = true, Modes mode = DATA);
47  ~pqRescaleScalarRangeReaction() override;
48 
59  static bool rescaleScalarRangeToData(
60  pqPipelineRepresentation* repr = nullptr, int selectedPropertiesType = 0 /*Representation*/);
61 
72  static pqRescaleScalarRangeToCustomDialog* rescaleScalarRangeToCustom(
73  pqPipelineRepresentation* repr = nullptr, int selectedPropertiesType = 0 /*Representation*/);
74 
85  static pqRescaleScalarRangeToCustomDialog* rescaleScalarRangeToCustom(
86  std::vector<vtkSMProxy*> tfProxies, bool separateOpacity = false,
87  int selectedPropertiesType = 0 /*Representation*/);
88 
100  bool separateOpacity = false, int selectedPropertiesType = 0 /*Representation*/)
101  {
102  return rescaleScalarRangeToCustom(
103  std::vector<vtkSMProxy*>(1, tfProxy), separateOpacity, selectedPropertiesType);
104  }
105 
116  static pqRescaleScalarRangeToDataOverTimeDialog* rescaleScalarRangeToDataOverTime(
117  pqPipelineRepresentation* repr = nullptr, int selectedPropertiesType = 0 /*Representation*/);
118 
128  static bool rescaleScalarRangeToVisible(pqPipelineRepresentation* repr = nullptr);
129 
130 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
134  void updateEnableState() override;
135 
137 
140  void setRepresentation(pqDataRepresentation* repr, int selectedPropertiesType);
142  {
143  this->setRepresentation(repr, 0 /*Representation*/);
144  }
145  void setActiveRepresentation();
147 
148 protected:
152  void onTriggered() override;
153 
154 protected Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
155  virtual void onServerAdded(pqServer* server);
156  virtual void onAboutToRemoveServer(pqServer* server);
157 
158 private:
159  Q_DISABLE_COPY(pqRescaleScalarRangeReaction)
160  QPointer<pqPipelineRepresentation> Representation;
161  Modes Mode;
162  unsigned long ServerAddedObserverId;
163  int SelectedPropertiesType;
164 };
165 
166 #endif
pqDataRepresentation is the superclass for a display for a pqPipelineSource i.e.
pqRescaleScalarRangeToCustomDialog provides a dialog to be able to rescale the active lookup table&#39;s ...
virtual void updateEnableState()
Definition: pqReaction.h:48
This is PQ representation for a single display.
#define PQAPPLICATIONCOMPONENTS_EXPORT
static pqRescaleScalarRangeToCustomDialog * rescaleScalarRangeToCustom(vtkSMProxy *tfProxy, bool separateOpacity=false, int selectedPropertiesType=0)
Rescale range to a custom range.
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.
pqRescaleScalarRangeToDataOverTimeDialog provides a dialog to be able to rescale the active lookup ta...
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
void setRepresentation(pqDataRepresentation *repr)
Set the data representation explicitly when track_active_objects is false.
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