VTK
vtkQtRecordView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtRecordView.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
33 #ifndef vtkQtRecordView_h
34 #define vtkQtRecordView_h
35 
36 #include "vtkViewsQtModule.h" // For export macro
37 #include "QVTKWin32Header.h"
38 #include "vtkQtView.h"
39 #include "vtkSmartPointer.h"
40 #include <QPointer>
41 
42 class QTextEdit;
44 
45 class VTKVIEWSQT_EXPORT vtkQtRecordView : public vtkQtView
46 {
47 Q_OBJECT
48 
49 public:
50  static vtkQtRecordView *New();
51  vtkTypeMacro(vtkQtRecordView, vtkQtView);
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
57  virtual QWidget* GetWidget();
58 
59  enum
60  {
61  FIELD_DATA = 0,
62  POINT_DATA = 1,
63  CELL_DATA = 2,
64  VERTEX_DATA = 3,
65  EDGE_DATA = 4,
66  ROW_DATA = 5,
67  };
68 
70 
72  vtkGetMacro(FieldType, int);
73  void SetFieldType(int);
75 
76  vtkGetMacro(CurrentRow, int);
77  vtkGetStringMacro(Text);
78 
80  virtual void Update();
81 
82 protected:
83 
85  ~vtkQtRecordView();
86 
89 
91 
92  QPointer<QTextEdit> TextWidget;
93 
94  char* Text;
95  int FieldType;
97 
98 
99 private:
100  vtkQtRecordView(const vtkQtRecordView&); // Not implemented.
101  void operator=(const vtkQtRecordView&); // Not implemented.
102 
103  unsigned long CurrentSelectionMTime;
104  unsigned long LastInputMTime;
105  unsigned long LastMTime;
106 };
107 
108 #endif
static vtkView * New()
Superclass for QAbstractItemView-based views.
virtual void Update()
extract field data as a table
virtual QWidget * GetWidget()=0
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:203
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)
QPointer< QTextEdit > TextWidget
The superclass for all representations.
vtkSmartPointer< vtkDataObjectToTable > DataObjectToTable
Superclass for Qt widget-based views.
Definition: vtkQtView.h:31
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:204