VTK
dox/GUISupport/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 "QVTKWin32Header.h"
00055 #include "vtkDataRepresentation.h"
00056 
00057 class vtkDoubleArray;
00058 class vtkLookupTable;
00059 class vtkQtTableModelAdapter;
00060 
00061 // ----------------------------------------------------------------------
00062 
00063 class QVTK_EXPORT vtkQtTableRepresentation : public vtkDataRepresentation
00064 {
00065 public:
00066   vtkTypeMacro(vtkQtTableRepresentation, vtkDataRepresentation);
00067   void PrintSelf(ostream &os, vtkIndent indent);
00068 
00070 
00072   void SetColorTable(vtkLookupTable *t);
00073   vtkGetObjectMacro(ColorTable, vtkLookupTable);
00075 
00077 
00079   void SetKeyColumn(const char* col);
00080   char* GetKeyColumn();
00082 
00084 
00086   vtkSetStringMacro(FirstDataColumn);
00087   vtkGetStringMacro(FirstDataColumn);
00089 
00091 
00093   vtkSetStringMacro(LastDataColumn);
00094   vtkGetStringMacro(LastDataColumn);
00096 
00097  protected:
00098   vtkQtTableRepresentation();
00099   ~vtkQtTableRepresentation();
00100 
00102   void UpdateTable();
00103 
00104   vtkSetStringMacro(KeyColumnInternal);
00105   vtkGetStringMacro(KeyColumnInternal);
00106 
00107   // ----------------------------------------------------------------------
00108   vtkQtTableModelAdapter *ModelAdapter;
00109   vtkLookupTable *ColorTable;
00110   vtkDoubleArray *SeriesColors;
00111   char *KeyColumnInternal;
00112   char *FirstDataColumn;
00113   char *LastDataColumn;
00114 
00116 
00117   virtual int RequestData(vtkInformation* request,
00118     vtkInformationVector** inputVector,
00119     vtkInformationVector* outputVector);
00121 
00122   virtual void ResetModel();
00123   virtual void CreateSeriesColors();
00124 
00127   virtual void SetModelType() { };
00128 
00129 private:
00130   vtkQtTableRepresentation(const vtkQtTableRepresentation &);
00131   void operator=(const vtkQtTableRepresentation &);
00132 
00133 };
00134 
00135 #endif