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 =========================================================================*/
41 #ifndef vtkSMChartSeriesSelectionDomain_h
42 #define vtkSMChartSeriesSelectionDomain_h
43 
44 #include "vtkRemotingViewsModule.h" // needed for exports
45 #include "vtkSMStringListDomain.h"
46 
47 #include <set> // For std::set
48 
52 
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
64  void Update(vtkSMProperty*) override;
65 
67  {
72  VALUE
73  };
74 
79  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
80 
82 
85  vtkGetMacro(DefaultMode, int);
87 
91  static void AddSeriesVisibilityDefault(const char* regex, bool value);
92 
97  static void SetLoadNoChartVariables(bool choice)
98  {
100  }
102 
103  vtkSetStringMacro(DefaultValue);
104 
105 protected:
108 
112  vtkPVDataInformation* GetInputInformation();
113 
117  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
118 
122  virtual bool GetDefaultSeriesVisibility(const char*);
123 
128  virtual std::vector<std::string> GetDefaultValue(const char* series);
129 
135  virtual void PopulateAvailableArrays(const std::string& blockName,
136  std::vector<std::string>& strings, vtkPVDataInformation* dataInfo, int fieldAssociation,
137  bool flattenTable);
138 
144  virtual void PopulateArrayComponents(vtkChartRepresentation* chartRepr,
145  const std::string& blockName, std::vector<std::string>& strings,
146  std::set<std::string>& unique_strings, vtkPVArrayInformation* dataInfo, bool flattenTable);
147 
153  virtual void SetDefaultVisibilityOverride(const std::string& arrayname, bool visibility);
154 
156 
158 
163 
168 
173 
174  static bool LoadNoVariables;
175 
176 private:
178  void operator=(const vtkSMChartSeriesSelectionDomain&) = delete;
179 
180  class vtkInternals;
181  vtkInternals* Internals;
182 
183  // The EXPERIMENTAL feature: everytime domain is modified we update the
184  // property's value.
185  void OnDomainModified();
186  void UpdateDefaultValues(vtkSMProperty*, bool preserve_previous_values);
187 };
188 
189 #endif
provides meta data about a vtkDataObject subclass.
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) override
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
static void SetLoadNoChartVariables(bool choice)
Global flag to toggle between (a) the default behavior and (b) setting default visibility to off...
int ReadXMLAttributes(vtkSMProperty *prop, vtkPVXMLElement *element) override
Set the appropriate ivars from the xml element.
bool HidePartialArrays
Specify if Partial Arrays should be hidden.
void Update(vtkSMProperty *) override
Update self checking the "unchecked" values of all required properties.
vtkSMDomainInternals * Internals
Definition: vtkSMDomain.h:285
provides meta data about arrays.
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.
int SetDefaultValues(vtkSMProperty *, bool use_unchecked_values) override
A vtkSMProperty is often defined with a default value in the XML itself.