vtkSMChartSeriesSelectionDomain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
29 #ifndef vtkSMChartSeriesSelectionDomain_h
30 #define vtkSMChartSeriesSelectionDomain_h
31 
32 #include "vtkRemotingViewsModule.h" // needed for exports
33 #include "vtkSMStringListDomain.h"
34 
35 #include <map> // For std::map
36 
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52  void Update(vtkSMProperty*) override;
53 
55  {
60  VALUE
61  };
62 
67  int SetDefaultValues(vtkSMProperty*, bool use_unchecked_values) override;
68 
70 
73  vtkGetMacro(DefaultMode, int);
75 
76  vtkSetStringMacro(DefaultValue);
77 
78 protected:
81 
85  vtkPVDataInformation* GetInputInformation();
86 
90  int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
91 
95  virtual bool GetDefaultSeriesVisibility(const char*);
96 
100  std::string GetDefaultSeriesLegend(const char*);
101 
106  virtual std::vector<std::string> GetDefaultValue(const char* series);
107 
113  virtual std::map<std::string, bool> CollectAvailableArrays(const std::string& blockName,
114  vtkPVDataInformation* dataInfo, int fieldAssociation, bool flattenTable,
115  bool skipPartialArrays = false);
116 
122  virtual void CollectArrayComponents(vtkChartRepresentation* chartRepr,
123  const std::string& blockName, std::map<std::string, bool>& stringOverrides,
124  vtkPVArrayInformation* dataInfo, bool flattenTable, bool skipPartialArrays = false);
125 
131  virtual void SetDefaultVisibilityOverrides(
132  const std::map<std::string, bool>& arrayNames, bool visibility);
133 
140  virtual void SetDefaultLegendOverrides(
141  const std::vector<std::string>& arrayNames, const std::vector<std::string>& labels);
142 
144 
146 
151 
156 
161 
162 private:
164  void operator=(const vtkSMChartSeriesSelectionDomain&) = delete;
165 
166  class vtkInternals;
167  vtkInternals* Internals;
168 
169  // The EXPERIMENTAL feature: everytime domain is modified we update the
170  // property's value.
171  void OnDomainModified();
172  void UpdateDefaultValues(
173  vtkSMProperty*, bool preserve_previous_values, bool use_unchecked_values);
174 };
175 
176 #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
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:278
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.