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 -------------------------------------------------------------------------*/
34 #ifndef vtkQtRecordView_h
35 #define vtkQtRecordView_h
36 
37 #include "vtkViewsQtModule.h" // For export macro
38 #include "vtkQtView.h"
39 #include "vtkSmartPointer.h" // Needed for data table member
40 #include <QPointer> // Needed for the text widget member
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) override;
53 
60  QWidget* GetWidget() override;
61 
62  enum
63  {
64  FIELD_DATA = 0,
65  POINT_DATA = 1,
66  CELL_DATA = 2,
67  VERTEX_DATA = 3,
68  EDGE_DATA = 4,
69  ROW_DATA = 5,
70  };
71 
73 
77  vtkGetMacro(FieldType, int);
78  void SetFieldType(int);
80 
81  vtkGetMacro(CurrentRow, int);
82  vtkGetStringMacro(Text);
83 
87  void Update() override;
88 
89 protected:
90 
92  ~vtkQtRecordView() override;
93 
96 
98 
99  QPointer<QTextEdit> TextWidget;
100 
101  char* Text;
104 
105 
106 private:
107  vtkQtRecordView(const vtkQtRecordView&) = delete;
108  void operator=(const vtkQtRecordView&) = delete;
109 
110  vtkMTimeType CurrentSelectionMTime;
111  vtkMTimeType LastInputMTime;
112  vtkMTimeType LastMTime;
113 };
114 
115 #endif
static vtkView * New()
Superclass for QAbstractItemView-based views.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
virtual void Update()
Update the view.
extract field data as a table
virtual QWidget * GetWidget()=0
Get the main container of this view (a QWidget).
virtual void AddRepresentationInternal(vtkDataRepresentation *vtkNotUsed(rep))
Subclass "hooks" for notifying subclasses of vtkView when representations are added or removed...
Definition: vtkView.h:237
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition: vtkIndent.h:39
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))
Meant for use by subclasses and vtkRepresentation subclasses.
Definition: vtkView.h:238