VTK
|
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 "vtkViewsQtModule.h" // For export macro 00037 #include "QVTKWin32Header.h" 00038 #include "vtkQtView.h" 00039 #include "vtkSmartPointer.h" 00040 #include <QPointer> 00041 00042 class QTextEdit; 00043 class vtkDataObjectToTable; 00044 00045 class VTKVIEWSQT_EXPORT vtkQtRecordView : public vtkQtView 00046 { 00047 Q_OBJECT 00048 00049 public: 00050 static vtkQtRecordView *New(); 00051 vtkTypeMacro(vtkQtRecordView, vtkQtView); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00053 00057 virtual QWidget* GetWidget(); 00058 00059 enum 00060 { 00061 FIELD_DATA = 0, 00062 POINT_DATA = 1, 00063 CELL_DATA = 2, 00064 VERTEX_DATA = 3, 00065 EDGE_DATA = 4, 00066 ROW_DATA = 5, 00067 }; 00068 00070 00072 vtkGetMacro(FieldType, int); 00073 void SetFieldType(int); 00075 00076 vtkGetMacro(CurrentRow, int); 00077 vtkGetStringMacro(Text); 00078 00080 virtual void Update(); 00081 00082 protected: 00083 00084 vtkQtRecordView(); 00085 ~vtkQtRecordView(); 00086 00087 virtual void AddRepresentationInternal(vtkDataRepresentation* rep); 00088 virtual void RemoveRepresentationInternal(vtkDataRepresentation* rep); 00089 00090 vtkSmartPointer<vtkDataObjectToTable> DataObjectToTable; 00091 00092 QPointer<QTextEdit> TextWidget; 00093 00094 char* Text; 00095 int FieldType; 00096 int CurrentRow; 00097 00098 00099 private: 00100 vtkQtRecordView(const vtkQtRecordView&); // Not implemented. 00101 void operator=(const vtkQtRecordView&); // Not implemented. 00102 00103 unsigned long CurrentSelectionMTime; 00104 unsigned long LastInputMTime; 00105 unsigned long LastMTime; 00106 }; 00107 00108 #endif