ParaView
vtkSMChartSeriesSelectionDomain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: $RCSfile$
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
36 #ifndef vtkSMChartSeriesSelectionDomain_h
37 #define vtkSMChartSeriesSelectionDomain_h
38 
39 #include "vtkPVServerManagerRenderingModule.h" // needed for exports
40 #include "vtkSMStringListDomain.h"
41 
42 #include <set> // For std::set
43 
47 
48 class VTKPVSERVERMANAGERRENDERING_EXPORT vtkSMChartSeriesSelectionDomain
49  : public vtkSMStringListDomain
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
60  virtual void Update(vtkSMProperty*);
61 
63  {
68  VALUE
69  };
70 
75  virtual int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values);
76 
78 
81  vtkGetMacro(DefaultMode, int);
83 
87  static void AddSeriesVisibilityDefault(const char* regex, bool value);
88 
93  static void SetLoadNoChartVariables(bool choice)
94  {
96  }
98 
99 protected:
102 
106  vtkPVDataInformation* GetInputInformation();
107 
111  virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element);
112 
116  virtual bool GetDefaultSeriesVisibility(const char*);
117 
122  virtual std::vector<vtkStdString> GetDefaultValue(const char* series);
123 
129  virtual void PopulateAvailableArrays(const std::string& blockName,
130  std::vector<vtkStdString>& strings, vtkPVDataInformation* dataInfo, int fieldAssociation,
131  bool flattenTable);
132 
138  virtual void PopulateArrayComponents(vtkChartRepresentation* chartRepr,
139  const std::string& blockName, std::vector<vtkStdString>& strings,
140  std::set<vtkStdString>& unique_strings, vtkPVArrayInformation* dataInfo, bool flattenTable);
141 
147  virtual void SetDefaultVisibilityOverride(const vtkStdString& arrayname, bool visibility);
148 
150 
152 
156  vtkSetStringMacro(DefaultValue);
158 
162  bool FlattenTable;
163 
164  static bool LoadNoVariables;
165 
166 private:
168  void operator=(const vtkSMChartSeriesSelectionDomain&) VTK_DELETE_FUNCTION;
169 
170  class vtkInternals;
171  vtkInternals* Internals;
172 
173  // The EXPERIMENTAL feature: everytime domain is modified we update the
174  // property's value.
175  void OnDomainModified();
176  void UpdateDefaultValues(vtkSMProperty*, bool preserve_previous_values);
177 };
178 
179 #endif
Light object for holding data information.
char * DefaultValue
Value used when DefaultMode==VALUE.
extends vtkSMChartSeriesListDomain to add logic to better handle default values suitable for series-p...
superclass for all SM properties
void PrintSelf(ostream &os, vtkIndent indent)
static void SetLoadNoChartVariables(bool choice)
Global flag to toggle between (a) the default behavior and (b) setting default visibility to off...
virtual int SetDefaultValues(vtkSMProperty *, bool use_unchecked_values)
A vtkSMProperty is often defined with a default value in the XML itself.
virtual int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *element)
Set the appropriate ivars from the xml element.
Data array information like type.
virtual void Update(vtkSMProperty *)
Update self checking the "unchecked" values of all required properties.
vtkChartRepresentation is the base representation for charting representations.
static vtkSMStringListDomain * New()
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
bool FlattenTable
Specify if table components should be split.