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 "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 //BTX 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 //ETX 00069 00071 00073 vtkGetMacro(FieldType, int); 00074 void SetFieldType(int); 00076 00077 vtkGetMacro(CurrentRow, int); 00078 vtkGetStringMacro(Text); 00079 00081 virtual void Update(); 00082 00083 protected: 00084 00085 vtkQtRecordView(); 00086 ~vtkQtRecordView(); 00087 00089 00091 virtual void AddInputConnection( 00092 vtkAlgorithmOutput* conn, 00093 vtkAlgorithmOutput* selectionConn); 00095 00097 00098 virtual void RemoveInputConnection( 00099 vtkAlgorithmOutput* conn, 00100 vtkAlgorithmOutput* selectionConn); 00102 00103 //BTX 00104 vtkSmartPointer<vtkDataObjectToTable> DataObjectToTable; 00105 //ETX 00106 00107 QPointer<QTextEdit> TextWidget; 00108 00109 char* Text; 00110 int FieldType; 00111 int CurrentRow; 00112 00113 00114 private: 00115 vtkQtRecordView(const vtkQtRecordView&); // Not implemented. 00116 void operator=(const vtkQtRecordView&); // Not implemented. 00117 00118 unsigned long CurrentSelectionMTime; 00119 unsigned long LastInputMTime; 00120 unsigned long LastMTime; 00121 }; 00122 00123 #endif