vtkPVGeneralSettings.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
14 #ifndef vtkPVGeneralSettings_h
15 #define vtkPVGeneralSettings_h
16 
17 #include "vtkObject.h"
18 #include "vtkParaViewDeprecation.h" // for PARAVIEW_DEPRECATED_IN_5_12_0
19 #include "vtkRemotingSettingsModule.h" //needed for exports
20 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
21 
22 #include <string>
23 
25 {
26 public:
27  static vtkPVGeneralSettings* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
34  static vtkPVGeneralSettings* GetInstance();
35 
37 
43  void SetAutoConvertProperties(bool val);
44  bool GetAutoConvertProperties();
46 
48 
54  vtkGetMacro(BlockColorsDistinctValues, int);
55  vtkSetMacro(BlockColorsDistinctValues, int);
57 
59 
63  vtkGetMacro(AutoApply, bool);
64  vtkSetMacro(AutoApply, bool);
66 
68 
73  vtkGetMacro(AutoApplyDelay, int);
74  vtkSetMacro(AutoApplyDelay, int);
76 
78 
82  vtkGetMacro(AutoApplyActiveOnly, bool);
83  vtkSetMacro(AutoApplyActiveOnly, bool);
85 
87 
90  vtkGetMacro(DefaultViewType, std::string);
91  vtkSetMacro(DefaultViewType, std::string);
93 
95 
99  vtkGetMacro(InterfaceLanguage, std::string);
100  vtkSetMacro(InterfaceLanguage, std::string);
102 
106  enum
107  {
110  DEFAULT_TIME_STEP_LAST
111  };
112 
114 
117  enum
118  {
119  AUTOMATICALLY_SHOW_AND_HIDE_SCALAR_BARS = 0,
120  AUTOMATICALLY_HIDE_SCALAR_BARS = 1,
121  MANUAL_SCALAR_BARS = 2
122  };
123  vtkGetMacro(ScalarBarMode, int);
124  void SetScalarBarMode(int);
126 
128 
131  void SetCacheGeometryForAnimation(bool val);
132  bool GetCacheGeometryForAnimation();
134 
136 
139  void SetAnimationGeometryCacheLimit(unsigned long val);
140  vtkGetMacro(AnimationGeometryCacheLimit, unsigned long);
142 
144  {
145  MIXED = 0,
148  FULL
149  };
150 
152 
156  vtkSetMacro(AnimationTimeNotation, int);
157  vtkGetMacro(AnimationTimeNotation, int);
159 
161 
164  vtkSetMacro(AnimationTimeShortestAccuratePrecision, bool);
165  vtkGetMacro(AnimationTimeShortestAccuratePrecision, bool);
167 
169 
172  vtkSetMacro(AnimationTimePrecision, int);
173  vtkGetMacro(AnimationTimePrecision, int);
175 
177 
180  vtkSetMacro(ShowAnimationShortcuts, bool);
181  vtkGetMacro(ShowAnimationShortcuts, bool);
182  vtkBooleanMacro(ShowAnimationShortcuts, bool);
184 
186 
190  vtkSetMacro(ResetDisplayEmptyViews, bool);
191  vtkGetMacro(ResetDisplayEmptyViews, bool);
192  vtkBooleanMacro(ResetDisplayEmptyViews, bool);
194 
196 
199  vtkSetMacro(RealNumberDisplayedNotation, int);
200  vtkGetMacro(RealNumberDisplayedNotation, int);
202 
204 
207  vtkSetMacro(RealNumberDisplayedShortestAccuratePrecision, bool);
208  vtkGetMacro(RealNumberDisplayedShortestAccuratePrecision, bool);
210 
212 
215  vtkSetMacro(RealNumberDisplayedPrecision, int);
216  vtkGetMacro(RealNumberDisplayedPrecision, int);
218 
220 
223  vtkSetMacro(FullNotationLowExponent, int);
224  vtkGetMacro(FullNotationLowExponent, int);
226 
228 
231  vtkSetMacro(FullNotationHighExponent, int);
232  vtkGetMacro(FullNotationHighExponent, int);
234 
238  void SetInheritRepresentationProperties(bool val);
239 
240  // Description:
241  // When plotting data with nonpositive values, ignore the standard warning
242  // and draw only the data with positive values.
243  void SetIgnoreNegativeLogAxisWarning(bool val);
244  bool GetIgnoreNegativeLogAxisWarning();
245 
246  enum
247  {
248  ALL_IN_ONE = 0,
249  SEPARATE_DISPLAY_PROPERTIES = 1,
250  SEPARATE_VIEW_PROPERTIES = 2,
251  ALL_SEPARATE = 3
252  };
254 
257  vtkSetMacro(PropertiesPanelMode, int);
258  vtkGetMacro(PropertiesPanelMode, int);
260 
262 
265  vtkSetMacro(LockPanels, bool);
266  vtkGetMacro(LockPanels, bool);
268 
270 
273  void SetLoadAllVariables(bool val);
274  bool GetLoadAllVariables();
276 
278 
281  void SetLoadNoChartVariables(bool val);
282  bool GetLoadNoChartVariables();
284 
286 
289  vtkSetClampMacro(GUIFontSize, int, 8, VTK_INT_MAX);
290  vtkGetMacro(GUIFontSize, int);
292 
294 
297  vtkSetMacro(GUIOverrideFont, bool);
298  vtkGetMacro(GUIOverrideFont, bool);
300 
302 
305  PARAVIEW_DEPRECATED_IN_5_12_0("SetConsoleFontSize has no effect, do not use it.")
306  void SetConsoleFontSize(int vtkNotUsed(val)){};
307  PARAVIEW_DEPRECATED_IN_5_12_0("GetConsoleFontSize has no effect, do not use it.")
308  int GetConsoleFontSize() { return 0; };
310 
312 
315  vtkSetMacro(ColorByBlockColorsOnApply, bool);
316  vtkGetMacro(ColorByBlockColorsOnApply, bool);
318 
320 
323  void SetEnableStreaming(bool);
324  vtkGetMacro(EnableStreaming, bool);
325  vtkBooleanMacro(EnableStreaming, bool);
327 
329 
332  void SetUseAcceleratedFilters(bool);
333  bool GetUseAcceleratedFilters();
334  vtkBooleanMacro(UseAcceleratedFilters, bool);
336 
338 
342  vtkGetMacro(SelectOnClickMultiBlockInspector, bool);
343  vtkSetMacro(SelectOnClickMultiBlockInspector, bool);
345 
347 
350  static int GetNumberOfCallbackThreads();
351  static void SetNumberOfCallbackThreads(int);
353 
354 protected:
355  vtkPVGeneralSettings() = default;
356  ~vtkPVGeneralSettings() override = default;
357 
358  int BlockColorsDistinctValues = 7;
359  bool AutoApply = false;
360  int AutoApplyDelay = 0;
361  bool AutoApplyActiveOnly = false;
362  std::string DefaultViewType = "RenderView";
363  std::string InterfaceLanguage = "en";
364  int ScalarBarMode = AUTOMATICALLY_HIDE_SCALAR_BARS;
365  bool CacheGeometryForAnimation = false;
366  unsigned long AnimationGeometryCacheLimit = 0;
367  int AnimationTimeNotation = MIXED;
368  bool AnimationTimeShortestAccuratePrecision = false;
369  int AnimationTimePrecision = 6;
370  bool ShowAnimationShortcuts = false;
371  int RealNumberDisplayedNotation = MIXED;
372  bool RealNumberDisplayedShortestAccuratePrecision = false;
373  int RealNumberDisplayedPrecision = 6;
374  int FullNotationLowExponent = -6;
375  int FullNotationHighExponent = 20;
376  bool ResetDisplayEmptyViews = false;
377  int PropertiesPanelMode = ALL_IN_ONE;
378  bool LockPanels = false;
379  int GUIFontSize = 0;
380  bool GUIOverrideFont = false;
381  bool ColorByBlockColorsOnApply = true;
382  bool EnableStreaming = false;
383  bool SelectOnClickMultiBlockInspector = true;
384 
385 private:
387  void operator=(const vtkPVGeneralSettings&) = delete;
388 
390 };
391 
392 #endif
#define PARAVIEW_DEPRECATED_IN_5_12_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
#define VTKREMOTINGSETTINGS_EXPORT
static vtkObject * New()
void operator=(const vtkObjectBase &)
object for general options.