VTK
dox/GUISupport/Qt/vtkQtRecordView.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkQtRecordView.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 2008 Sandia Corporation.
00017   Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
00018   the U.S. Government retains certain rights in this software.
00019 -------------------------------------------------------------------------*/
00033 #ifndef __vtkQtRecordView_h
00034 #define __vtkQtRecordView_h
00035 
00036 #include "QVTKWin32Header.h"
00037 #include "vtkQtView.h"
00038 #include "vtkSmartPointer.h"
00039 #include <QPointer>
00040 
00041 class QTextEdit;
00042 class vtkDataObjectToTable;
00043 
00044 class QVTK_EXPORT vtkQtRecordView : public vtkQtView
00045 {
00046 Q_OBJECT
00047 
00048 public:
00049   static vtkQtRecordView *New();
00050   vtkTypeMacro(vtkQtRecordView, vtkQtView);
00051   void PrintSelf(ostream& os, vtkIndent indent);
00052 
00056   virtual QWidget* GetWidget();
00057 
00058   enum
00059     {
00060     FIELD_DATA = 0,
00061     POINT_DATA = 1,
00062     CELL_DATA = 2,
00063     VERTEX_DATA = 3,
00064     EDGE_DATA = 4,
00065     ROW_DATA = 5,
00066     };
00067   
00069 
00071   vtkGetMacro(FieldType, int);
00072   void SetFieldType(int);
00074 
00075   vtkGetMacro(CurrentRow, int);
00076   vtkGetStringMacro(Text);
00077 
00079   virtual void Update();
00080   
00081 protected:
00082   
00083   vtkQtRecordView();
00084   ~vtkQtRecordView();
00085     
00086   virtual void AddRepresentationInternal(vtkDataRepresentation* rep);
00087   virtual void RemoveRepresentationInternal(vtkDataRepresentation* rep);
00088     
00089   vtkSmartPointer<vtkDataObjectToTable> DataObjectToTable;
00090 
00091   QPointer<QTextEdit> TextWidget;
00092 
00093   char* Text;
00094   int FieldType;
00095   int CurrentRow;
00096 
00097 
00098 private:
00099   vtkQtRecordView(const vtkQtRecordView&);  // Not implemented.
00100   void operator=(const vtkQtRecordView&);  // Not implemented.
00101   
00102   unsigned long CurrentSelectionMTime;
00103   unsigned long LastInputMTime;
00104   unsigned long LastMTime;
00105 };
00106 
00107 #endif