pqScalarsToColors.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 pqScalarsToColors_h
5 #define pqScalarsToColors_h
6 
7 #include "pqProxy.h"
8 #include <QList>
9 #include <QPair>
10 #include <QVariant>
11 
12 class pqRenderViewBase;
14 class pqScalarsToColorsInternal;
15 
20 {
21  Q_OBJECT
22 public:
23  pqScalarsToColors(const QString& group, const QString& name, vtkSMProxy* proxy, pqServer* server,
24  QObject* parent = nullptr);
25  ~pqScalarsToColors() override;
26 
30  pqScalarBarRepresentation* getScalarBar(pqRenderViewBase* ren) const;
31 
35  bool getScalarRangeLock() const;
36 
42  void setScalarRange(double min, double max);
43 
48  QPair<double, double> getScalarRange() const;
49 
53  bool getUseLogScale() const;
54 
55  enum Mode
56  {
57  MAGNITUDE = 0,
58  COMPONENT = 1
59  };
60 
61  // Set the color mode (component/magnitude) and
62  // component to color by. When mode is magnitude, component is ignored.
63  void setVectorMode(Mode mode, int component);
64 
65  // Returns the vector mode and component used by the Lookup table.
66  // When vector mode is MAGNITUDE, value returned by
67  // getVectorComponent() is indeterminate.
68  Mode getVectorMode() const;
69  int getVectorComponent() const;
70 
75  void updateScalarBarTitles(const QString& component);
76 
78  {
79  GROW_ON_MODIFIED, /* only when a pipeline object is explicitly modified */
80  GROW_ON_UPDATED /* any time the pipeline updates */
81  };
82 
95  static void setColorRangeScalingMode(int);
96  static int colorRangeScalingMode(int default_value = GROW_ON_MODIFIED);
97 
98 Q_SIGNALS:
103  void componentOrModeChanged();
104 
105 public Q_SLOTS:
106  // This method checks if this LUT is used by any display,
107  // if not, it hides all the scalars bar showing this LUT.
108  void hideUnusedScalarBars();
109 
113  void setScalarRangeLock(bool lock);
114 
118  void build();
119 
120 protected Q_SLOTS:
125  void checkRange();
126 
127 private:
128  pqScalarsToColorsInternal* Internal;
129 };
130 
131 #endif
pqScalarsToColors is a represents a vtkScalarsToColors proxy.
name
pqScalarBarRepresentation is created for "ScalarBarWidgetRepresentation" proxies. ...
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
This class represents any registered Server Manager proxy.
Definition: pqProxy.h:28
pqRenderViewBase is an abstract base class for all render-view based views.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
#define max(a, b)
pqServer (should be renamed to pqSession) is a pqServerManagerModelItem subclass that represents a vt...
Definition: pqServer.h:35