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 "vtkQtView.h"
38 #include "vtkSmartPointer.h" // Needed for data table member
39 #include <QPointer> // Needed for the text widget member
40 
41 class QTextEdit;
43 
45 {
46 Q_OBJECT
47 
48 public:
49  static vtkQtRecordView *New();
50  vtkTypeMacro(vtkQtRecordView, vtkQtView);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
56  virtual QWidget* GetWidget();
57 
58  enum
59  {
60  FIELD_DATA = 0,
61  POINT_DATA = 1,
62  CELL_DATA = 2,
63  VERTEX_DATA = 3,
64  EDGE_DATA = 4,
65  ROW_DATA = 5,
66  };
67 
69 
71  vtkGetMacro(FieldType, int);
72  void SetFieldType(int);
74 
75  vtkGetMacro(CurrentRow, int);
76  vtkGetStringMacro(Text);
77 
79  virtual void Update();
80 
81 protected:
82 
84  ~vtkQtRecordView();
85 
88 
90 
91  QPointer<QTextEdit> TextWidget;
92 
93  char* Text;
94  int FieldType;
96 
97 
98 private:
99  vtkQtRecordView(const vtkQtRecordView&); // Not implemented.
100  void operator=(const vtkQtRecordView&); // Not implemented.
101 
102  unsigned long CurrentSelectionMTime;
103  unsigned long LastInputMTime;
104  unsigned long LastMTime;
105 };
106 
107 #endif
static vtkView * New()
Superclass for QAbstractItemView-based views.
virtual void Update()
extract field data as a table
virtual QWidget * GetWidget()=0
#define VTKVIEWSQT_EXPORT
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:30
virtual void RemoveRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Definition: vtkView.h:204