VTK  9.0.3
vtkQtView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkQtView.h
5 
6 =========================================================================*/
7 /*-------------------------------------------------------------------------
8  Copyright 2009 Sandia Corporation.
9  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
10  the U.S. Government retains certain rights in this software.
11 -------------------------------------------------------------------------*/
23 #ifndef vtkQtView_h
24 #define vtkQtView_h
25 
26 #include "vtkView.h"
27 #include "vtkViewsQtModule.h" // For export macro
28 
29 #include <QObject> // Needed to hook into Qt
30 
31 class VTKVIEWSQT_EXPORT vtkQtView
32  : public QObject
33  , public vtkView
34 {
35  Q_OBJECT
36 public:
37  vtkTypeMacro(vtkQtView, vtkView);
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
46  virtual QWidget* GetWidget() = 0;
47 
53  virtual void ProcessQtEvents();
54 
60 
66  virtual bool SaveImage(const char* fileName);
67 
68 protected:
70  ~vtkQtView() override;
71 
72 private:
73  vtkQtView(const vtkQtView&) = delete;
74  void operator=(const vtkQtView&) = delete;
75 };
76 
77 #endif
78 // VTK-HeaderTest-Exclude: vtkQtView.h
a simple class to control print indentation
Definition: vtkIndent.h:34
Superclass for Qt widget-based views.
Definition: vtkQtView.h:34
~vtkQtView() override
virtual void ProcessQtEventsNoUserInput()
Calls QApplication::processEvents(QEventLoop::ExcludeUserInputEvents).
virtual QWidget * GetWidget()=0
Get the main container of this view (a QWidget).
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ProcessQtEvents()
Calls QApplication::processEvents().
virtual bool SaveImage(const char *fileName)
Save an image.
The superclass for all views.
Definition: vtkView.h:64