VTK  9.3.20240418
vtkQtTableRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 
37 #ifndef vtkQtTableRepresentation_h
38 #define vtkQtTableRepresentation_h
39 
40 #include "vtkDataRepresentation.h"
41 #include "vtkViewsQtModule.h" // For export macro
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkDoubleArray;
45 class vtkLookupTable;
47 
48 // ----------------------------------------------------------------------
49 
50 class VTKVIEWSQT_EXPORT vtkQtTableRepresentation : public vtkDataRepresentation
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
62  vtkGetObjectMacro(ColorTable, vtkLookupTable);
64 
66 
70  void SetKeyColumn(const char* col);
71  char* GetKeyColumn();
73 
75 
79  vtkSetStringMacro(FirstDataColumn);
80  vtkGetStringMacro(FirstDataColumn);
82 
84 
88  vtkSetStringMacro(LastDataColumn);
89  vtkGetStringMacro(LastDataColumn);
91 
92 protected:
95 
99  void UpdateTable();
100 
101  vtkSetStringMacro(KeyColumnInternal);
102  vtkGetStringMacro(KeyColumnInternal);
103 
104  // ----------------------------------------------------------------------
111 
115  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
116  vtkInformationVector* outputVector) override;
117 
118  virtual void ResetModel();
119  virtual void CreateSeriesColors();
120 
125  virtual void SetModelType() {}
126 
127 private:
129  void operator=(const vtkQtTableRepresentation&) = delete;
130 };
131 
132 VTK_ABI_NAMESPACE_END
133 #endif
The superclass for all representations.
dynamic, self-adjusting array of double
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
map scalar values into colors via a lookup table
Adapts a table to a Qt item model.
set up a vtkTable in a Qt model
void SetKeyColumn(const char *col)
Set/get the name of the column that contains series names.
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Prepare the input connections to this representation.
virtual void CreateSeriesColors()
void SetColorTable(vtkLookupTable *t)
Set/get the lookup table that will be used to determine colors for each series.
char * GetKeyColumn()
Set/get the name of the column that contains series names.
~vtkQtTableRepresentation() override
vtkQtTableModelAdapter * ModelAdapter
virtual void SetModelType()
This should set the model type to DATA, METADATA or FULL depending on what you want.
void UpdateTable()
Update the table representation.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ResetModel()