VTK
dox/Views/Qt/vtkQtTableRepresentation.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtTableRepresentation.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00051 #ifndef __vtkQtTableRepresentation_h
00052 #define __vtkQtTableRepresentation_h
00053 
00054 #include "vtkViewsQtModule.h" // For export macro
00055 #include "QVTKWin32Header.h"
00056 #include "vtkDataRepresentation.h"
00057 
00058 class vtkDoubleArray;
00059 class vtkLookupTable;
00060 class vtkQtTableModelAdapter;
00061 
00062 // ----------------------------------------------------------------------
00063 
00064 class VTKVIEWSQT_EXPORT vtkQtTableRepresentation : public vtkDataRepresentation
00065 {
00066 public:
00067   vtkTypeMacro(vtkQtTableRepresentation, vtkDataRepresentation);
00068   void PrintSelf(ostream &os, vtkIndent indent);
00069 
00071 
00073   void SetColorTable(vtkLookupTable *t);
00074   vtkGetObjectMacro(ColorTable, vtkLookupTable);
00076 
00078 
00080   void SetKeyColumn(const char* col);
00081   char* GetKeyColumn();
00083 
00085 
00087   vtkSetStringMacro(FirstDataColumn);
00088   vtkGetStringMacro(FirstDataColumn);
00090 
00092 
00094   vtkSetStringMacro(LastDataColumn);
00095   vtkGetStringMacro(LastDataColumn);
00097 
00098  protected:
00099   vtkQtTableRepresentation();
00100   ~vtkQtTableRepresentation();
00101 
00103   void UpdateTable();
00104 
00105   vtkSetStringMacro(KeyColumnInternal);
00106   vtkGetStringMacro(KeyColumnInternal);
00107 
00108   // ----------------------------------------------------------------------
00109   vtkQtTableModelAdapter *ModelAdapter;
00110   vtkLookupTable *ColorTable;
00111   vtkDoubleArray *SeriesColors;
00112   char *KeyColumnInternal;
00113   char *FirstDataColumn;
00114   char *LastDataColumn;
00115 
00117 
00118   virtual int RequestData(vtkInformation* request,
00119     vtkInformationVector** inputVector,
00120     vtkInformationVector* outputVector);
00122 
00123   virtual void ResetModel();
00124   virtual void CreateSeriesColors();
00125 
00128   virtual void SetModelType() { };
00129 
00130 private:
00131   vtkQtTableRepresentation(const vtkQtTableRepresentation &);
00132   void operator=(const vtkQtTableRepresentation &);
00133 
00134 };
00135 
00136 #endif